/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 配色方案 - 温暖治愈风 */
    --primary-beige: #f5f1eb;
    --secondary-beige: #e8ddd4;
    --accent-beige: #d4c4b0;
    --text-dark: #3a3a3a;
    --text-medium: #6b6b6b;
    --text-light: #9a9a9a;
    
    /* 莫兰迪色系 - 低饱和度 */
    --morandi-blue: #a8b5c8;
    --morandi-green: #b8c4b0;
    --morandi-pink: #d4b8c0;
    --morandi-yellow: #d4c8a8;
    --morandi-purple: #c0b8d4;
    
    /* 阴影和模糊 */
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 16px 48px rgba(0, 0, 0, 0.16);
    
    /* 动画曲线 */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--primary-beige) 0%, var(--secondary-beige) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(245, 241, 235, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s var(--ease-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
}

.nav-link:hover {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s var(--ease-smooth);
}

/* 主要内容区域 */
main {
    padding-top: 20px;
    min-height: 100vh;
}

.section {
    display: none;
    min-height: calc(100vh - 20px);
    padding: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--ease-smooth);
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* 首页英雄区域 */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 0;
}

.hero-content {
    max-width: 1200px;
}

.hero-title {
    font-family: 'Noto Serif SC', 'Playfair Display', 'Inter', serif;
    font-size: 3.75rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    letter-spacing: 0;
    line-height: 1.2;
    animation: fadeInUp 1s var(--ease-smooth);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 3rem;
    font-weight: 400;
    animation: fadeInUp 1s var(--ease-smooth) 0.2s both;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3.5rem;
    animation: fadeInUp 1s var(--ease-smooth) 0.4s both;
}

.feature-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 3.25rem;
    cursor: pointer;
    transition: all 0.4s var(--ease-smooth);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.card-icon {
    font-size: 5rem;
    margin-bottom: 1.25rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0;
}

.feature-card p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: var(--text-medium);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-tab:hover,
.filter-tab.active {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* 玻璃态选择框 */
.glass-select {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: var(--text-dark);
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
}

.glass-select:focus {
    outline: none;
    border-color: var(--accent-beige);
    box-shadow: 0 0 0 3px rgba(212, 196, 176, 0.2);
}

/* 按钮样式 */
.control-btn {
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0 0.5rem;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.download-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--morandi-green);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s var(--ease-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* 动画定义 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(245, 241, 235, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .filter-tabs {
        justify-content: center;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .control-btn {
        padding: 0.6rem 1.5rem;
        margin: 0.25rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) {
    .nav-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }
    .nav-logo { justify-self: start; }
    .nav-menu { justify-self: center; }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .hero-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .hero-cards { grid-template-columns: repeat(4, 1fr); }
}

.reading-progress-indicator {
    top: 0 !important;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.subject-btn {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow-light);
}

.subject-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

@media (max-width: 768px) {
    .subject-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.feature-card.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(closest-side, rgba(255,255,255,0.45), rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
}

.feature-card.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
}

.feature-card.glass-card:hover::before {
    opacity: 1;
}

.feature-card.glass-card:hover::after {
    animation: shineSweep 0.9s var(--ease-smooth);
}

@keyframes shineSweep {
    0% { left: -100%; }
    100% { left: 150%; }
}

.announcement-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1500;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.subject-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.subject-group-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}
