/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d4a373;
    --secondary-color: #8b7355;
    --text-dark: #2c2c2c;
    --text-light: #666;
    --bg-light: #faf9f7;
    --white: #ffffff;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 5px 30px rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 10px;
}

.author {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 15px;
    font-weight: 300;
}

.subtitle-large {
    font-size: 2rem;
    font-weight: 500;
    opacity: 0.95;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 300;
    font-style: italic;
    opacity: 0.95;
    letter-spacing: 3px;
}

/* 导航标签 */
.nav-tabs {
    background: var(--white);
    box-shadow: var(--shadow);
    position: relative; /* 不再吸顶 */
    z-index: 1;
    padding: 20px 0;
    overflow: visible;
    transition: padding 0.25s ease;
}

.episodes-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.more-episodes {
    margin-top: 12px;
    display: none;
    gap: 15px;
    flex-wrap: wrap;
}

.more-episodes.open {
    display: flex;
}

.nav-tabs .container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    min-height: 50px;
}

/* 默认隐藏更多集数（提升选择器优先级，覆盖上面的 container 规则） */
.nav-tabs .more-episodes {
    display: none !important;
}

.nav-tabs .more-episodes.open {
    display: flex !important;
}

/* 滚动条美化 */
.nav-tabs::-webkit-scrollbar {
    height: 6px;
}

.nav-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.nav-tabs::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.tab-btn {
    padding: 10px 30px;
    font-size: 1rem;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

/* 主内容区域 */
.main-content {
    padding: 50px 0;
    min-height: 70vh;
}

.outfit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 穿搭卡片 */
.outfit-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.outfit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.outfit-card::before {
    content: '🔍 点击查看大图';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.outfit-card:hover::before {
    opacity: 1;
}

.outfit-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    display: block;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.outfit-image:hover {
    opacity: 0.9;
}

.outfit-info {
    padding: 25px;
}

.outfit-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.items-list {
    list-style: none;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

/* 单品列表滚动条美化 */
.items-list::-webkit-scrollbar {
    width: 6px;
}

.items-list::-webkit-scrollbar-track {
    background: transparent;
}

.items-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.items-list::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.item {
    margin-bottom: 15px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.item:hover {
    background: linear-gradient(135deg, #fff5eb 0%, #f0ede8 100%);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(212, 163, 115, 0.2);
}

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-brand {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1rem;
    display: block;
    margin-bottom: 4px;
}

.item-name {
    color: var(--text-light);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 6px;
}

.item-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
}

.item-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary-color);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.item:hover .item-action {
    opacity: 1;
    transform: scale(1);
    background: var(--primary-color);
    color: var(--white);
}

.item:active {
    transform: translateX(5px) scale(0.98);
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.footer p {
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }
    
    .author {
        font-size: 0.8rem;
    }
    
    .subtitle-large {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .outfit-grid {
        grid-template-columns: repeat(2, 1fr); /* 平板/手机显示2列 */
        gap: 20px;
    }
    
    .tab-btn {
        padding: 10px 30px;
        font-size: 1rem;
    }
    
    .outfit-image {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }
    
    .nav-tabs .container {
        gap: 10px;
    }
    
    .tab-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    .outfit-grid {
        grid-template-columns: 1fr; /* 小屏显示1列 */
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: var(--text-light);
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 图片预览Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    animation: modalZoomIn 0.3s ease;
}

@keyframes modalZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-title {
    color: white;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: -10px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
    }
    
    .modal-close {
        top: -45px;
        right: 0;
        width: 36px;
        height: 36px;
        font-size: 26px;
    }
    
    .modal-image {
        max-height: 75vh;
    }
}

