:root {
    --bg: #030508;
    --cyan: #00f3ff;
    --cyan-glow: rgba(0, 243, 255, 0.4);
    --magenta: #ff0055;
    --magenta-glow: rgba(255, 0, 85, 0.4);
    --text-bright: #ffffff;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --font-sans: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-mono: 'SF Mono', Monaco, Consolas, 'Liberation Mono', Menlo, monospace;
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-tech: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg);
    color: var(--text-bright);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.25) 0px,
        rgba(0, 0, 0, 0.25) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 10;
    opacity: 0.6;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at center,
        transparent 35%,
        rgba(3, 5, 8, 0.85) 85%,
        rgba(3, 5, 8, 0.98) 100%
    );
    pointer-events: none;
    z-index: 11;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.top-nav {
    position: fixed;
    top: 2rem;
    left: 2.5rem;
    z-index: 20;
}

.brand-link {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.brand-link:hover {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
}

.main-content {
    position: relative;
    z-index: 20;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-section {
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    background: transparent;
    border: none;
    padding: 0.2rem 0;
    animation: meta-flicker 6s infinite ease-in-out;
}

.meta-tag::before,
.meta-tag::after {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.6));
}

.meta-tag::after {
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.6), transparent);
}

.meta-code {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.meta-sep {
    color: rgba(0, 243, 255, 0.35);
    font-weight: 400;
}

.meta-desc {
    color: rgba(226, 232, 240, 0.85);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
}

@keyframes meta-flicker {
    0%, 100% { opacity: 0.88; }
    48% { opacity: 0.88; }
    50% { opacity: 0.65; }
    52% { opacity: 0.95; }
    82% { opacity: 0.88; }
    84% { opacity: 0.7; }
    86% { opacity: 0.92; }
}

.hero-title {
    position: relative;
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 5.8rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    word-spacing: -0.05em;
    white-space: nowrap;
    text-transform: uppercase;
    line-height: 1.1;
    color: #ffffff;
    cursor: default;
    user-select: none;
    text-shadow: 
        0 0 15px rgba(0, 243, 255, 0.5),
        0 0 35px rgba(0, 243, 255, 0.28),
        0 0 70px rgba(0, 243, 255, 0.12);
    animation: text-ambient-flicker 6s infinite;
}

.hero-title::before,
.hero-title::after {
    content: attr(data-value);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    mix-blend-mode: screen;
}

.hero-title::before {
    left: 0;
    text-shadow: -2px 0 var(--cyan);
    color: rgba(38, 235, 255, 0.95);
    animation: phantom-glitch-cyan 0.75s steps(1, end) infinite;
}

.hero-title::after {
    left: 0;
    text-shadow: 2px 0 var(--magenta);
    color: rgba(255, 41, 209, 0.95);
    animation: phantom-glitch-magenta 0.75s steps(1, end) infinite;
}

.hero-title.glitch-active {
    text-shadow: 
        -3.5px 0 var(--cyan),
        3.5px 0 var(--magenta),
        0 0 30px rgba(0, 243, 255, 0.85),
        0 0 60px rgba(255, 0, 85, 0.3);
}

.hero-title.glitch-active::before {
    transform: translate(-6px, 0);
    clip-path: inset(15% 0 40% 0);
    opacity: 1;
}

.hero-title.glitch-active::after {
    transform: translate(6px, 0);
    clip-path: inset(50% 0 10% 0);
    opacity: 1;
}

.hero-title:hover {
    text-shadow: 
        0 0 20px rgba(0, 243, 255, 0.8),
        0 0 45px rgba(0, 243, 255, 0.45),
        0 0 80px rgba(0, 243, 255, 0.25);
    letter-spacing: 0.04em;
    transition: text-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), letter-spacing 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-title:hover::before {
    transform: translate(-3.2px, 0);
    text-shadow: -3.2px 0 10px var(--cyan), 0 0 20px var(--cyan);
    opacity: 0.95;
    clip-path: inset(0 0 0 0);
    animation: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.hero-title:hover::after {
    transform: translate(3.2px, 0);
    text-shadow: 3.2px 0 10px var(--magenta), 0 0 20px var(--magenta);
    opacity: 0.95;
    clip-path: inset(0 0 0 0);
    animation: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

@keyframes text-ambient-flicker {
    0%, 100% { opacity: 1; }
    21% { opacity: 1; }
    22% { opacity: 0.88; }
    23% { opacity: 1; }
    68% { opacity: 1; }
    69% { opacity: 0.92; }
    70% { opacity: 1; }
}

@keyframes phantom-glitch-cyan {
    0%, 70% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    71% {
        clip-path: inset(10% 0 55% 0);
        transform: translate(-8px, 0);
        opacity: 1;
    }
    74% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    78% {
        clip-path: inset(60% 0 8% 0);
        transform: translate(-10px, 0);
        opacity: 1;
    }
    81% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    88% {
        clip-path: inset(30% 0 28% 0);
        transform: translate(-6px, 1px);
        opacity: 0.95;
    }
    91% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    95% {
        clip-path: inset(45% 0 20% 0);
        transform: translate(-9px, -1px);
        opacity: 1;
    }
    97% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
}

@keyframes phantom-glitch-magenta {
    0%, 72% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    73% {
        clip-path: inset(52% 0 12% 0);
        transform: translate(7px, 0);
        opacity: 1;
    }
    76% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    80% {
        clip-path: inset(15% 0 45% 0);
        transform: translate(10px, -1px);
        opacity: 1;
    }
    83% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    89% {
        clip-path: inset(68% 0 5% 0);
        transform: translate(12px, 1px);
        opacity: 0.95;
    }
    92% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    96% {
        clip-path: inset(35% 0 30% 0);
        transform: translate(8px, 0);
        opacity: 1;
    }
    98% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
        opacity: 0.85;
    }
}

.hero-tagline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.35rem;
}

.tagline-primary {
    font-family: var(--font-sans);
    font-size: clamp(1.0rem, 1.7vw, 1.3rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.95);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.hero-subtext {
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.3vw, 1.02rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
}

.site-footer {
    position: fixed;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 20;
    pointer-events: none;
}

.footer-text {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: rgba(100, 116, 139, 0.5);
}

.audio-switch {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(3, 12, 22, 0.65);
    border: 1px solid rgba(0, 243, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    cursor: pointer;
    z-index: 100;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.audio-switch:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.4);
    transform: scale(1.08);
}

.audio-switch:active {
    transform: scale(0.94);
}

.eq-bar {
    display: block;
    width: 2px;
    height: 12px;
    border-radius: 1px;
    background: var(--cyan);
    transition: height 0.25s ease, opacity 0.25s ease;
}

.audio-switch.is-playing .eq-bar:nth-child(1) {
    animation: eq-pulse-1 0.75s infinite ease-in-out alternate;
}

.audio-switch.is-playing .eq-bar:nth-child(2) {
    animation: eq-pulse-2 0.95s infinite ease-in-out alternate;
}

.audio-switch.is-playing .eq-bar:nth-child(3) {
    animation: eq-pulse-3 0.65s infinite ease-in-out alternate;
}

.audio-switch.is-paused {
    opacity: 0.55;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.audio-switch.is-paused:hover {
    opacity: 0.9;
    border-color: var(--cyan);
}

.audio-switch.is-paused .eq-bar {
    height: 3px;
    opacity: 0.45;
    animation: none;
}

@keyframes eq-pulse-1 {
    0% { height: 4px; }
    100% { height: 13px; }
}

@keyframes eq-pulse-2 {
    0% { height: 13px; }
    100% { height: 5px; }
}

@keyframes eq-pulse-3 {
    0% { height: 6px; }
    100% { height: 14px; }
}

.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #020408;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.intro-overlay.intro-dismissed {
    opacity: 0;
    transform: scale(1.06);
    filter: blur(10px);
    pointer-events: none;
}

.intro-grid {
    position: absolute;
    bottom: -30%;
    left: -50%;
    width: 200%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(400px) rotateX(72deg);
    transform-origin: center bottom;
    animation: intro-grid-move 12s linear infinite;
    pointer-events: none;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 80%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 80%);
}

@keyframes intro-grid-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

.intro-scanbeam {
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, var(--cyan) 50%, transparent 95%);
    box-shadow: 0 0 18px var(--cyan), 0 0 35px rgba(0, 243, 255, 0.6);
    animation: intro-beam-sweep 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes intro-beam-sweep {
    0% { top: 0%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.intro-hud-bracket {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(0, 243, 255, 0.4);
    pointer-events: none;
}

.intro-hud-tl { top: 2rem; left: 2rem; border-right: none; border-bottom: none; }
.intro-hud-tr { top: 2rem; right: 2rem; border-left: none; border-bottom: none; }
.intro-hud-bl { bottom: 2rem; left: 2rem; border-right: none; border-top: none; }
.intro-hud-br { bottom: 2rem; right: 2rem; border-left: none; border-top: none; }

.intro-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 90vw;
    padding: 2rem;
}

.intro-title-box {
    position: relative;
    display: inline-block;
}

.intro-title {
    position: relative;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.8vw, 4.4rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
    text-shadow: 
        0 0 20px rgba(0, 243, 255, 0.75),
        0 0 45px rgba(0, 243, 255, 0.4),
        0 0 80px rgba(0, 243, 255, 0.2);
}

.intro-title::before,
.intro-title::after {
    content: attr(data-value);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: screen;
}

.intro-title::before {
    text-shadow: -3px 0 var(--cyan);
    color: rgba(0, 243, 255, 0.9);
    animation: phantom-glitch-cyan 0.8s steps(1, end) infinite;
}

.intro-title::after {
    text-shadow: 3px 0 var(--magenta);
    color: rgba(255, 0, 85, 0.9);
    animation: phantom-glitch-magenta 0.8s steps(1, end) infinite;
}


.intro-skip {
    position: absolute;
    bottom: 2.2rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: rgba(100, 116, 139, 0.65);
    cursor: pointer;
    transition: color 0.25s ease, text-shadow 0.25s ease;
    animation: intro-skip-blink 2.2s ease-in-out infinite;
}

.intro-skip:hover {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

@keyframes intro-skip-blink {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 0.95; }
}

@media (max-width: 640px) {
    .intro-title {
        font-size: clamp(1.6rem, 7.2vw, 2.5rem);
    }

    .intro-hud-tl { top: 1rem; left: 1rem; }
    .intro-hud-tr { top: 1rem; right: 1rem; }
    .intro-hud-bl { bottom: 1rem; left: 1rem; }
    .intro-hud-br { bottom: 1rem; right: 1rem; }

    .intro-skip {
        bottom: 1.5rem;
        font-size: 0.65rem;
    }

    .top-nav {
        top: 1.5rem;
        left: 1.5rem;
    }

    .hero-inner {
        gap: 1rem;
    }

    .meta-tag {
        font-size: 0.62rem;
        letter-spacing: 0.18em;
        gap: 0.5rem;
        padding: 0.15rem 0;
    }

    .meta-tag::before,
    .meta-tag::after {
        width: 18px;
    }

    .hero-title {
        font-size: clamp(1.75rem, 7.2vw, 2.6rem);
        white-space: nowrap;
    }

    .tagline-primary {
        font-size: 0.92rem;
        letter-spacing: 0.14em;
    }

    .hero-subtext {
        font-size: 0.78rem;
        letter-spacing: 0.2em;
    }

    .site-footer {
        bottom: 1.25rem;
    }

    .audio-switch {
        right: 1.25rem;
        bottom: 3.75rem;
        width: 30px;
        height: 30px;
    }
}
