* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #00ff88;
    --secondary-color: #0066ff;
    --dark-bg: #0a0e27;
    --card-bg: #1a1f3a;
    --text-color: #e0e0e0;
    --accent-orange: #ff6b35;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Welcome Overlay */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.welcome-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
}

.welcome-content {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.welcome-title {
    font-size: 120px;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

.welcome-content h2 {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 0 0 20px var(--primary-color);
}

.welcome-content p {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 40px;
    opacity: 0.8;
}

.enter-btn {
    padding: 15px 50px;
    font-size: 20px;
    font-weight: bold;
    color: var(--dark-bg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

.enter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.6);
}

.enter-btn:active {
    transform: translateY(-1px);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Music Control Button */
.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
    transition: all 0.3s ease;
    animation: musicPulse 2s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.music-control:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.6);
}

.music-control.playing {
    animation: musicPulse 1s ease-in-out infinite, rotate 4s linear infinite;
}

.music-control .music-icon {
    font-size: 28px;
    line-height: 1;
    transition: transform 0.3s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.music-control.playing .music-icon {
    transform: scale(1.1);
}

.music-control .music-text {
    position: absolute;
    right: 70px;
    background: var(--card-bg);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.music-control:hover .music-text {
    opacity: 1;
}

@keyframes musicPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 255, 136, 0.7);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Binary Rain Background */
.binary-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.1;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    opacity: 0.1;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero h1 {
    font-size: 120px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Glitch Effect */
.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitchTop 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    color: #ff00de;
}

.glitch::after {
    animation: glitchBottom 2.5s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    color: #00fff9;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitchTop {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-3px, -3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, 3px); }
}

@keyframes glitchBottom {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(3px, 3px); }
    40% { transform: translate(3px, 3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(-3px, -3px); }
}

.hero h2 {
    font-size: 48px;
    color: var(--text-color);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.date {
    display: inline-block;
    padding: 15px 40px;
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
    animation: pulse 2s infinite;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
    animation: fadeInUp 1s ease-out 1s backwards;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateX(-50%) scale(1.1);
}

.scroll-indicator span {
    color: var(--text-color);
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover span {
    opacity: 1;
}

.scroll-arrow {
    width: 30px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.scroll-arrow span {
    display: block;
    width: 20px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 0;
    animation: scrollArrow 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-color);
}

.scroll-arrow span:nth-child(1) {
    animation-delay: 0s;
}

.scroll-arrow span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-arrow span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scrollArrow {
    0% {
        opacity: 0;
        transform: translateY(-10px) rotate(45deg);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(10px) rotate(45deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Sections */
section {
    position: relative;
    padding: 80px 0;
    z-index: 1;
}

h2 {
    font-size: 42px;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

/* Card Styles */
.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 136, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.3);
}

.card h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.card ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.card ul li {
    font-size: 18px;
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
}

.card ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.highlight {
    color: var(--accent-orange);
    font-size: 20px;
    font-weight: bold;
}

/* Badge Styles */
.manifesto-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.badge {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    color: var(--dark-bg);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.5);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-item .year {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
    margin: 0 40px;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4);
    z-index: 2;
}

.timeline-item .content {
    flex: 1;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.timeline-item .content h4 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Manifesto Grid */
.manifesto {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
}

.manifesto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.manifesto-item {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.manifesto-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.3);
}

.manifesto-item .icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.manifesto-item h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Code Display */
.code-display {
    background: var(--dark-bg);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.lang-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.5);
}

.language-disclaimer {
    text-align: center;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 30px;
    font-style: italic;
    letter-spacing: 0.5px;
}

.code-block {
    background: #0d1117;
    border-radius: 10px;
    padding: 30px;
    overflow-x: auto;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.code-container {
    position: relative;
    min-height: 400px;
}

.code-item {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.8;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.code-item.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}

.code-item.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.code-block pre {
    margin: 0;
}

.keyword { color: #ff79c6; }
.function { color: #50fa7b; }
.string { color: #f1fa8c; }
.comment { color: #6272a4; font-style: italic; }
.number { color: #bd93f9; }
.boolean { color: #ff6b35; }

/* Stats Section */
.stats {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 2px solid rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.stat-number {
    font-size: 64px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 0 0 20px var(--primary-color);
}

.stat-label {
    font-size: 18px;
    color: var(--text-color);
}

/* Celebration Section */
.celebration {
    background: var(--dark-bg);
    padding: 80px 0;
}

.celebration h2 {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

/* Hero Repeat Section */
.hero-repeat {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
    overflow: hidden;
    padding-bottom: 0;
    margin-bottom: 0;
}

.hero-repeat::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--secondary-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite reverse;
    opacity: 0.1;
}

.hero-repeat h1 {
    font-size: 120px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.hero-repeat h2 {
    font-size: 48px;
    color: var(--text-color);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.hero-repeat .subtitle {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.hero-repeat .date {
    display: inline-block;
    padding: 15px 40px;
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent-orange), #ff8c35);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    animation: pulse 2s infinite;
    position: relative;
    z-index: 1;
    margin-bottom: 30px;
}

.hero-message {
    font-size: 28px;
    color: var(--text-color);
    margin-top: 30px;
    font-weight: 300;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Footer */
footer {
    background: var(--card-bg);
    padding: 40px 0;
    text-align: center;
    margin-top: 0;
    border-top: 2px solid var(--primary-color);
    position: relative;
    z-index: 1;
}

/* Activities */
.activities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.activity-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.3);
}

.activity-card h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.activity-card h4 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.activity-card p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
}

/* Year Section for Historical Events */
.year-section {
    margin-bottom: 50px;
}

.activity-year {
    font-size: 28px;
    color: var(--accent-orange);
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid var(--accent-orange);
}

/* Footer */
footer {
    background: var(--card-bg);
    padding: 40px 0;
    text-align: center;
    margin-top: 80px;
    border-top: 2px solid var(--primary-color);
    position: relative;
    z-index: 1;
}

.footer-code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    margin: 10px 0;
    color: var(--primary-color);
}

.copyright {
    font-size: 20px;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 80px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .scroll-indicator > span {
        font-size: 12px;
    }

    .scroll-arrow {
        width: 25px;
        height: 40px;
    }

    .scroll-arrow span {
        width: 15px;
        height: 2px;
    }

    /* 移动端音乐控制按钮 */
    .music-control {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .music-control .music-icon {
        width: 24px;
        height: 24px;
    }

    .music-control .music-text {
        display: none; /* 移动端隐藏提示文字 */
    }

    /* 移动端欢迎界面 */
    .welcome-title {
        font-size: 80px;
    }

    .welcome-content h2 {
        font-size: 32px;
    }

    .welcome-content p {
        font-size: 18px;
    }

    .enter-btn {
        padding: 12px 40px;
        font-size: 18px;
    }

    .hero-repeat h1 {
        font-size: 80px;
    }

    .hero-repeat h2 {
        font-size: 32px;
    }

    .hero-repeat .subtitle {
        font-size: 18px;
    }

    .hero-repeat .date {
        font-size: 24px;
        padding: 12px 30px;
    }

    .hero-message {
        font-size: 20px;
        padding: 0 20px;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column !important;
    }

    .timeline-item .year {
        margin: 0 0 20px 0;
        align-self: flex-start;
    }

    h2 {
        font-size: 32px;
    }

    .card {
        padding: 25px;
    }

    .manifesto-inline {
        justify-content: center;
    }
}