
/* image_comparison_slider/frontend/css/tabs.css */
/* 标签样式 */
.tabs-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tabs-header {
    display: flex;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(to right, #f9fafb, #f3f4f6);
}

.tab-item {
    position: relative;
    padding: 16px 8px;
    flex: 1;
    text-align: center;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    user-select: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tab-item:hover {
    color: #3b82f6;
    background-color: rgba(249, 250, 251, 0.5);
}

.tab-item.active {
    color: #2563eb;
    font-weight: 600;
}

.tab-item.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 3px 3px 0 0;
    transition: all 0.3s ease;
}

.tab-item:active {
    transform: scale(0.97);
}

.tabs-content {
    position: relative;
    min-height: 150px;
}

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.4s ease forwards;
}

/* 底部导航样式 */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    flex: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    color: #666;
}

.nav-item.active {
    color: #0d8bf2;
    background: rgba(30, 159, 255, 0.1);
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 12px;
    font-weight: 500;
}

/* 动画效果 */
@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Tab 激活动画 */
.tab-pulse {
    animation: pulse 0.7s forwards;
}

/* 波纹效果 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Tab指示器 */
.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 3px 3px 0 0;
    transition: transform 0.3s ease;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }
    
    .container {
        padding-bottom: 0px;
    }
    
    .fixed.bottom-8 {
        bottom: 90px;
    }
    
    .tab-item {
        padding: 14px 8px;
        font-size: 15px;
    }
    
    .nav-item {
        padding: 6px 8px;
    }
    
    .nav-icon {
        font-size: 22px;
    }
    
    .nav-text {
        font-size: 11px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .tab-item {
        padding: 12px 6px;
        font-size: 14px;
    }
    
    .nav-item {
        padding: 4px 6px;
    }
    
    .nav-icon {
        font-size: 20px;
    }
    
    .nav-text {
        font-size: 10px;
    }
}

/* 触摸反馈 */
.nav-item:active {
    transform: scale(0.95);
    background: rgba(30, 159, 255, 0.15);
}

/* 超宽屏优化 */
@media (min-width: 1600px) {
    .tab-item {
        padding: 18px 10px;
        font-size: 17px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .tabs-container {
        background-color: #2d3748;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    
    .tabs-header {
        background: linear-gradient(to right, #2d3748, #1a202c);
        border-color: #4a5568;
    }
    
    .tab-item {
        color: #cbd5e0;
    }
    
    .tab-item:hover {
        color: #63b3ed;
        background-color: rgba(45, 55, 72, 0.7);
    }
    
    .tab-item.active {
        color: #90cdf4;
    }
    
    .tab-item.active::after {
        background: linear-gradient(90deg, #63b3ed, #4299e1);
    }
    
    .bottom-nav {
        background: rgba(45, 55, 72, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-item {
        color: #cbd5e0;
    }
    
    .nav-item.active {
        color: #4299e1;
        background: rgba(66, 153, 225, 0.15);
    }
    
    .ripple-effect {
        background-color: rgba(0, 0, 0, 0.3);
    }
}

/* 高对比度模式支持 */
@media (forced-colors: active) {
    .tab-item.active::after {
        background: CanvasText;
    }
    
    .nav-item.active {
        outline: 2px solid CanvasText;
    }
}
