:root {
    --bg: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.06);
    --text: #e8e6e3;
    --text-dim: #a8a5a0;
    --gold: #d4a853;
    --gold-light: #e8c87a;
    --purple: #6366f1;
    --purple-light: #818cf8;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'ZCOOL XiaoWei', cursive;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
}

::-webkit-scrollbar { display: none; }

#starfield, #particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}
#starfield { z-index: 0; }
#particles { z-index: 1; }

.container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hero */
.hero {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    padding-bottom: 6rem;
    min-height: 0;
}

.hero-content {
    opacity: 0;
    animation: fadeInUp 1.5s ease forwards;
}

.site-title {
    font-size: clamp(7rem, 22vw, 16rem);
    letter-spacing: 0.5em;
    margin-right: -0.5em;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 40%, var(--text) 70%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 60px rgba(212, 168, 83, 0.3));
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.subtitle {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: clamp(1.2rem, 4vw, 2.2rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--purple-light);
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease 0.8s forwards;
    text-shadow: 0 0 30px rgba(129, 140, 248, 0.3);
}

.cycling-text {
    height: 2em;
    position: relative;
    overflow: hidden;
}

.text-item {
    position: absolute;
    top: 0; left: 0; width: 100%;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text-dim);
    letter-spacing: 0.3em;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Traces */
.traces {
    padding: 2rem;
    flex-shrink: 0;
}

.trace-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.trace-card {
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    cursor: default;
}

.trace-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.trace-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.trace-icon {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
}

.trace-card h3 {
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 0.4rem;
    letter-spacing: 0.15em;
}

.trace-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.7;
}

/* Footer */
.footer {
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.copyright a {
    color: var(--purple-light);
    text-decoration: none;
}

.copyright a:hover {
    color: var(--gold);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 60px rgba(212, 168, 83, 0.2)); }
    to { filter: drop-shadow(0 0 80px rgba(212, 168, 83, 0.4)); }
}

/* 手机竖屏适配 */
@media (max-width: 768px) {
    html, body {
        overflow: auto;
        height: auto;
    }

    .container {
        height: auto;
        min-height: 100vh;
    }

    .hero {
        flex: none;
        min-height: 70vh;
        padding-bottom: 2rem;
    }

    .site-title {
        font-size: clamp(5rem, 18vw, 10rem);
    }

    .subtitle {
        font-size: clamp(1rem, 3.5vw, 1.6rem);
        margin-top: -1rem;
        margin-bottom: 1.5rem;
    }

    .trace-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .trace-card {
        padding: 1rem;
    }

    .trace-icon {
        font-size: 1.5rem;
    }

    .trace-card h3 {
        font-size: 0.95rem;
    }

    .trace-card p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 60vh;
        padding: 1.5rem;
        padding-bottom: 1rem;
    }

    .site-title {
        font-size: clamp(4rem, 20vw, 8rem);
    }

    .subtitle {
        font-size: 1rem;
        margin-top: -0.5rem;
        margin-bottom: 1rem;
    }

    .cycling-text {
        height: 1.8em;
    }

    .text-item {
        font-size: 0.9rem;
        letter-spacing: 0.15em;
    }

    .traces {
        padding: 1rem;
    }

    .trace-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .footer {
        padding: 1rem;
    }
}
