/* ========================================
   玻璃拟态设计系统 - 现代化UI
   Glassmorphism Design System
   ======================================== */

:root {
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-bg-dark: rgba(60, 40, 20, 0.15);
    --glass-bg-light: rgba(255, 255, 255, 0.18);
    --blur-light: blur(10px);
    --blur-medium: blur(20px);
    --blur-heavy: blur(30px);
    --border-glass: 1px solid rgba(255, 255, 255, 0.25);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.18);
    --shadow-glow: 0 0 40px rgba(251, 191, 36, 0.2);
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-display: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
    --font-body: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    line-height: 1.7;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(183, 110, 121, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(15, 52, 96, 0.5) 0%, transparent 70%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

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

.flex-wrapper {
    display: flex;
    flex: 1;
    animation: fadeIn 0.6s ease-out;
}

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-smooth);
}

.page-header.scrolled {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.header-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 20px;
    background: rgba(251, 191, 36, 0.15);
    border-radius: var(--radius-full);
    border: 1px solid rgba(251, 191, 36, 0.25);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(251, 191, 36, 0.2);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-smooth);
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.back-to-home:hover {
    transform: translateY(-2px);
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: var(--shadow-glow);
}

.sidebar {
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-medium);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 16px;
    height: calc(100vh - 64px);
    position: fixed;
    top: 64px;
    left: 0;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
    z-index: 50;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(251, 191, 36, 0.5) 0%, 
        rgba(183, 110, 121, 0.5) 50%,
        rgba(251, 191, 36, 0.5) 100%);
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
}

.sidebar-toggle {
    display: none;
    position: fixed;
    left: 16px;
    top: 76px;
    z-index: 60;
    background: rgba(251, 191, 36, 0.25);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(251, 191, 36, 0.4);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
    font-family: var(--font-body);
}

.sidebar-toggle:hover {
    transform: translateY(-2px);
    background: rgba(251, 191, 36, 0.35);
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: var(--shadow-lg);
}

.close-btn {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(251, 191, 36, 0.3);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 30, 0.6);
    backdrop-filter: blur(4px);
    z-index: 45;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.overlay.active {
    opacity: 1;
}

.chapter-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-btn {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-weight: 500;
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.chapter-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.8) 0%, rgba(183, 110, 121, 0.8) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.chapter-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.chapter-btn:hover::before {
    opacity: 1;
}

.chapter-btn.active {
    background: rgba(251, 191, 36, 0.25);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: var(--shadow-glow);
}

.chapter-btn.active::before {
    opacity: 1;
}

.main-container {
    flex: 1;
    margin-left: 280px;
    padding: 84px 24px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.timeline {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-medium);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    border: var(--border-glass);
    position: relative;
    overflow: hidden;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
}

.timeline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(251, 191, 36, 0.6) 0%, 
        rgba(183, 110, 121, 0.6) 50%, 
        rgba(251, 191, 36, 0.6) 100%);
}

.timeline-track {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.timeline-years {
    display: flex;
    gap: 24px;
}

.timeline-years span {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.timeline-years span:hover {
    color: rgba(251, 191, 36, 0.9);
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.timeline-years span.active {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: var(--shadow-glow);
}

.timeline-marker {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(251, 191, 36, 0.3) 0%, 
        rgba(183, 110, 121, 0.3) 50%, 
        rgba(251, 191, 36, 0.3) 100%);
    border-radius: 3px;
    position: relative;
}

.content-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-medium);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    border: var(--border-glass);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
}

.content-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(251, 191, 36, 0.6) 0%, 
        rgba(183, 110, 121, 0.6) 50%, 
        rgba(251, 191, 36, 0.6) 100%);
}

.events-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.danmaku-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    background: rgba(251, 191, 36, 0.25);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-smooth);
    z-index: 55;
    font-family: var(--font-body);
}

.danmaku-btn:hover {
    transform: translateY(-3px);
    background: rgba(251, 191, 36, 0.35);
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: var(--shadow-glow);
}

.danmaku-container {
    position: fixed;
    top: 80px;
    left: 280px;
    right: 0;
    height: 200px;
    pointer-events: none;
    overflow: hidden;
    z-index: 30;
}

@media (max-width: 900px) {
    .danmaku-container {
        left: 0;
        height: 150px;
    }
}

footer {
    text-align: center;
    padding: 40px 24px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: var(--blur-heavy);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    margin-top: auto;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
}

footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(251, 191, 36, 0.5) 0%, 
        rgba(183, 110, 121, 0.5) 50%, 
        rgba(251, 191, 36, 0.5) 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo img {
    height: 36px;
    width: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-logo h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.footer-text p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        top: 0;
        height: 100vh;
        padding-top: 140px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        left: auto;
        right: 24px;
        top: auto;
        bottom: 100px;
    }

    .close-btn {
        display: block;
    }

    .overlay {
        display: block;
    }

    .main-container {
        margin-left: 0;
        padding-top: 84px;
    }

    .events-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 0 16px;
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }

    .header-left {
        font-size: 0.95rem;
    }

    .logo-img {
        height: 32px;
    }

    .header-title {
        font-size: 1rem;
        padding: 6px 14px;
    }

    .back-to-home {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .main-container {
        padding: 100px 16px 32px;
    }

    .timeline {
        padding: 16px;
    }

    .timeline-years {
        gap: 12px;
    }

    .timeline-years span {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .content-card {
        padding: 24px;
    }

    .events-container {
        gap: 16px;
    }

    .danmaku-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        bottom: 16px;
        right: 16px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.6);
}

::selection {
    background: rgba(251, 191, 36, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

.chapter-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.chapter-subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.chapter-intro {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.event-item {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.event-item:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(251, 191, 36, 0.3);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.event-header:hover {
    background: rgba(251, 191, 36, 0.08);
}

.event-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.event-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251, 191, 36, 0.15);
    border-radius: var(--radius-sm);
    color: rgba(251, 191, 36, 0.9);
}

.event-title span {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.expand-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(251, 191, 36, 0.2);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-smooth);
}

.expand-btn:hover {
    transform: translateY(-2px);
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: var(--shadow-glow);
}

.expand-btn .btn-arrow {
    transition: transform var(--transition-fast);
}

.expand-btn.open .btn-arrow {
    transform: rotate(180deg);
}

.event-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all var(--transition-smooth);
}

.event-content.show {
    max-height: 2000px;
    opacity: 1;
}

.event-desc {
    padding: 0 24px 24px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
}

.event-desc p {
    margin-bottom: 12px;
}

.event-desc strong {
    color: rgba(251, 191, 36, 0.9);
    font-weight: 600;
}

.event-img-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
    justify-content: flex-start;
}

.event-img {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-img:hover {
    transform: scale(1.05);
}

.danmaku-item {
    position: absolute;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 100;
    background: rgba(251, 191, 36, 0.85);
    color: rgba(255, 255, 255, 0.95);
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    right: -420px;
    will-change: right;
}

@keyframes danmaku-scroll {
    from {
        right: -420px;
    }
    to {
        right: 110%;
    }
}

.content-card h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.content-card h2 span {
    color: rgba(251, 191, 36, 0.9);
}

.content-card p {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    margin-bottom: 12px;
}
