/* ═══ BASE ═══ */
:root {
    --bg: #0a0608;
    /* Muted horror palette — desaturated versions of original neons */
    --green: #4a8a6a;
    --purple: #5a3a55;
    --red: #8a2a3a;
    --cyan: #4a6a7a;
    --yellow: #8a7a3a;
    --text: #b8b8b8;
    --text-dim: #5a5a5a;
    --font-pixel: 'Press Start 2P', 'Courier New', monospace;
    --font-body: 'VT323', 'Courier New', monospace;
}

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

html, body {
    background: #000;
    color: var(--text);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100%;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 0v16M0 8h16' stroke='%2353A89B' stroke-width='1'/%3E%3Crect x='6' y='6' width='4' height='4' fill='none' stroke='%2353A89B' stroke-width='1'/%3E%3C/svg%3E") 8 8, crosshair;
}

/* ═══ HORIZONTAL WRAPPER ═══ */
.horizontal-wrapper {
    display: flex;
    height: 100vh;
    width: 600vw;
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
}

.section {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.scene-bg {
    width: 100%;
    height: 100%;
    position: relative;
}

/* ═══ SECTION TITLES ═══ */
.section-title {
    font-family: var(--font-pixel);
    font-size: clamp(16px, 3vw, 28px);
    color: #fff;
    text-align: center;
    letter-spacing: 4px;
    text-shadow: 3px 3px 0 #000;
    position: relative;
    z-index: 10;
    padding-top: 60px;
}

/* ═══ BAND LOGO ═══ */
.band-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.logo-text {
    font-family: var(--font-pixel);
    font-size: clamp(32px, 7vw, 72px);
    color: #fff;
    letter-spacing: 6px;
    text-shadow: 4px 4px 0 var(--green), 8px 8px 0 rgba(0, 0, 0, 0.8);
    margin-bottom: 16px;
    animation: logo-glow 3s ease-in-out infinite;
}

.logo-subtitle {
    font-family: var(--font-pixel);
    font-size: clamp(9px, 1.8vw, 14px);
    color: var(--green);
    letter-spacing: 6px;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 8px;
}

.logo-est {
    font-family: var(--font-body);
    font-size: 20px;
    color: var(--text-dim);
    letter-spacing: 8px;
}

/* ═══ SOCIAL LINKS ═══ */
.social-links {
    position: absolute;
    top: 40px;
    left: 60px;
    display: flex;
    gap: 40px;
    z-index: 20;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s;
}

.social-link:hover { transform: translateY(-4px); }

.pixel-icon {
    width: 40px;
    height: 40px;
    border: 2px solid var(--green);
    background: rgba(0, 255, 136, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pixel-icon::after {
    content: '';
    width: 16px;
    height: 16px;
    background: var(--green);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.icon-x::after { clip-path: polygon(10% 0%, 40% 45%, 70% 0%, 100% 0%, 60% 50%, 100% 100%, 70% 100%, 40% 55%, 10% 100%, 0% 100%, 40% 50%); }
.icon-discord::after { clip-path: polygon(10% 20%, 90% 20%, 90% 80%, 70% 80%, 60% 90%, 40% 90%, 30% 80%, 10% 80%); background: #5865F2; }
.icon-opensea::after { border-radius: 50%; clip-path: none; background: #2081E2; }

.social-label {
    font-family: var(--font-pixel);
    font-size: 8px;
    color: var(--text-dim);
    letter-spacing: 2px;
}

/* ═══ UI OVERLAYS ═══ */
.ui-sound, .ui-secrets {
    position: fixed;
    z-index: 1000;
    font-family: var(--font-pixel);
    font-size: 9px;
    padding: 10px 16px;
    border: 2px solid var(--green);
    background: rgba(10, 6, 8, 0.9);
    color: var(--green);
    cursor: pointer;
    letter-spacing: 1px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ui-sound:hover, .ui-secrets:hover {
    box-shadow: 0 0 12px rgba(74, 138, 106, 0.3);
    border-color: #88EED8;
}

.ui-sound { bottom: 20px; left: 20px; }
.ui-sound.active { border-color: #88EED8; box-shadow: 0 0 8px rgba(136, 238, 216, 0.3); }
.ui-sound.active .sound-label { color: #88EED8; }
.ui-secrets { bottom: 20px; right: 20px; }
.ui-secrets[data-found]:not([data-found="0"]) {
    border-color: #88EED8;
    animation: secretsPulse 3s ease-in-out infinite;
}
@keyframes secretsPulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 10px rgba(136, 238, 216, 0.25); }
}

.sound-icon, .secrets-icon { margin-right: 6px; }

.scroll-hint {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    font-size: 24px;
    color: var(--green);
    animation: hint-pulse 2s ease-in-out infinite;
    opacity: 0.6;
}

/* ═══ FLOOR — continuous metal grating ═══ */
.floor {
    position: absolute;
    bottom: 0;
    height: 60px;
    z-index: 5;
    background: #0d0d14;
    border-top: 2px solid #1a1a2e;
}

/* Shared grating pattern across all floors */
.floor::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 20px),
                repeating-linear-gradient(0deg, rgba(255,255,255,0.01) 0 1px, transparent 1px 10px);
}

/* Subtle color shift per section (very gentle, not jarring) */
.floor-lab { left: 0; width: 100vw; border-top-color: rgba(0, 255, 136, 0.15); }
.floor-specimens { left: 100vw; width: 100vw; border-top-color: rgba(160, 255, 208, 0.12); }
.floor-observatory { left: 200vw; width: 100vw; border-top-color: rgba(0, 229, 255, 0.12); }
.floor-team { left: 300vw; width: 100vw; border-top-color: rgba(255, 255, 255, 0.08); }
.floor-agent { left: 400vw; width: 100vw; border-top-color: rgba(136, 204, 170, 0.18); }
.floor-command { left: 500vw; width: 100vw; border-top-color: rgba(170, 42, 42, 0.20); }

/* Glow line on top of floor — connects visually */
.floor::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: inherit;
    filter: blur(3px);
    opacity: 0.5;
}

/* ═══ CEILING PIPES & CABLES ═══ */
/* Continuous horizontal pipe spanning all 6 sections */
.ceiling-pipe {
    position: absolute;
    top: 20px;
    left: 0;
    width: 600vw;
    height: 6px;
    background: linear-gradient(180deg, #2a2a3e, #1a1a2e);
    border-top: 1px solid #3a3a5e;
    border-bottom: 1px solid #0a0a1a;
    z-index: 3;
}

.ceiling-pipe::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(90deg, rgba(0, 255, 136, 0.1) 0 2px, transparent 2px 80px);
}

/* Pipe joints every section width */
.ceiling-pipe::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 600vw;
    height: 12px;
    background: repeating-linear-gradient(90deg, 
        transparent 0, transparent calc(100vw - 6px), 
        #3a3a5e calc(100vw - 6px), #3a3a5e calc(100vw + 6px),
        transparent calc(100vw + 6px));
    pointer-events: none;
}

/* Hanging cables */
.ceiling-cable {
    position: absolute;
    top: 26px;
    width: 600vw;
    height: 30px;
    z-index: 2;
    pointer-events: none;
}

.cable-1 {
    left: 0;
    border-bottom: 1px solid rgba(0, 255, 136, 0.06);
    background: repeating-linear-gradient(90deg, 
        transparent 0, transparent 200px,
        rgba(0, 255, 136, 0.03) 200px, rgba(0, 255, 136, 0.03) 201px);
}

.cable-2 {
    left: 0;
    top: 30px;
    height: 20px;
    border-bottom: 1px solid rgba(123, 47, 255, 0.05);
    background: repeating-linear-gradient(90deg, 
        transparent 0, transparent 300px,
        rgba(123, 47, 255, 0.03) 300px, rgba(123, 47, 255, 0.03) 301px);
}

/* ═══ SCIENTIST WALKER ═══ */
.scientist-walker {
    position: absolute;
    bottom: 62px;
    left: 80px;
    z-index: 50;
    transition: left 0.15s linear;
}

.scientist-sprite {
    width: 24px;
    height: 40px;
    position: relative;
    image-rendering: pixelated;
}

/* Pixel scientist using box-shadow */
.scientist-sprite::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    background: transparent;
    box-shadow:
        /* Head */
        8px 0 0 #ffd5a0, 12px 0 0 #ffd5a0,
        8px 4px 0 #ffd5a0, 12px 4px 0 #ffd5a0,
        /* Goggles */
        4px 4px 0 #333, 16px 4px 0 #333,
        4px 8px 0 var(--cyan), 8px 8px 0 var(--cyan), 12px 8px 0 var(--cyan), 16px 8px 0 var(--cyan),
        /* Lab coat */
        4px 12px 0 #fff, 8px 12px 0 #fff, 12px 12px 0 #fff, 16px 12px 0 #fff,
        4px 16px 0 #fff, 8px 16px 0 #eee, 12px 16px 0 #eee, 16px 16px 0 #fff,
        4px 20px 0 #fff, 8px 20px 0 #ddd, 12px 20px 0 #ddd, 16px 20px 0 #fff,
        4px 24px 0 #fff, 8px 24px 0 #fff, 12px 24px 0 #fff, 16px 24px 0 #fff,
        /* Legs */
        4px 28px 0 #333, 8px 28px 0 #333, 12px 28px 0 #333, 16px 28px 0 #333,
        4px 32px 0 #222, 8px 32px 0 #222, 12px 32px 0 #222, 16px 32px 0 #222,
        /* Shoes */
        4px 36px 0 #111, 8px 36px 0 #111, 12px 36px 0 #111, 16px 36px 0 #111;
}

/* ═══ FOOTER ═══ */
.site-footer {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.footer-text {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.footer-sub {
    font-family: var(--font-body);
    font-size: 16px;
    color: #444;
    letter-spacing: 4px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .logo-text { font-size: 28px; }
    .social-links { gap: 20px; top: 20px; }
    .pixel-icon { width: 32px; height: 32px; }
    .section-title { font-size: 14px; padding-top: 30px; }
}
@media (max-width: 768px) {
    .kbd-hint { display: none; }
}

/* ═══ MOBILE CONTROLS ═══ */
.mob-controls {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 16px;
    z-index: 999;
}
@media (max-width: 768px) {
    .mob-controls { display: flex; }
}
.mob-btn {
    width: 56px;
    height: 56px;
    border: 2px solid var(--green);
    border-radius: 0;
    background: rgba(0,0,0,0.8);
    color: var(--green);
    font-family: var(--font-pixel);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.mob-btn:active {
    background: var(--green);
    color: #000;
}

/* ═══ KEYBOARD HINT ═══ */
.kbd-hint {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 999;
    opacity: 0.7;
    animation: hint-fade 5s ease forwards;
    pointer-events: none;
}
.kbd-key {
    width: 30px;
    height: 30px;
    border: 1px solid var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--green);
}
.kbd-text {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-dim);
    letter-spacing: 2px;
}
@keyframes hint-fade {
    0%, 60% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* ═══ WORLD CANVAS Z-INDEX ═══ */
/* HTML overlay wrapper sits above world canvas (z-index 0) */
.horizontal-wrapper {
    z-index: 5;
    background: transparent;
    pointer-events: none;
}
.horizontal-wrapper .section {
    pointer-events: auto;
}

/* ═══ BOOT SEQUENCE ═══ */
#boot-screen {
    position: fixed;
    inset: 0;
    background: #0a0608;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'VT323', monospace;
    transition: opacity 0.6s ease-out;
}
#boot-screen.boot-fade { opacity: 0; pointer-events: none; }
.boot-terminal {
    width: 90%;
    max-width: 600px;
    max-height: 60vh;
    overflow: hidden;
    color: #33ff88;
    font-size: 14px;
    line-height: 1.8;
    text-shadow: 0 0 4px #33ff8844;
}
.boot-line {
    opacity: 0;
    animation: bootFadeIn 0.15s forwards;
    white-space: pre;
}
.boot-highlight {
    color: #ffffff;
    text-shadow: 0 0 8px #ffffff66;
    font-weight: bold;
}
.boot-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    pointer-events: none;
}
@keyframes bootFadeIn {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══ SECTION NAV DOTS ═══ */
.section-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.section-nav.visible { opacity: 1; }
.section-nav .nav-dot {
    width: 10px;
    height: 10px;
    border: 1px solid rgba(0, 255, 136, 0.4);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.section-nav .nav-dot:hover {
    border-color: var(--green);
    background: rgba(0, 255, 136, 0.15);
}
.section-nav .nav-dot.active {
    background: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.4);
}
.section-nav .nav-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-pixel);
    font-size: 7px;
    color: var(--green);
    letter-spacing: 1px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.section-nav .nav-dot:hover::after {
    opacity: 1;
}

/* ═══ WALK HINT (first visit) ═══ */
.walk-hint {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-pixel);
    font-size: 8px;
    color: rgba(0, 255, 136, 0.6);
    letter-spacing: 2px;
    z-index: 100;
    animation: walkHintPulse 3s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
.walk-hint.hidden { opacity: 0; }
@keyframes walkHintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ═══ WHITELIST FORM HINTS ═══ */
.wl-field-hint {
    font-family: var(--font-pixel);
    font-size: 7px;
    color: rgba(255, 100, 100, 0.7);
    letter-spacing: 1px;
    margin-top: 4px;
    min-height: 12px;
    transition: opacity 0.2s ease;
    opacity: 0;
}
.wl-field-hint.show { opacity: 1; }
.wl-task.incomplete .wl-task-text {
    color: rgba(255, 200, 200, 0.6);
}
.wl-submit-btn:disabled::after {
    content: attr(data-hint);
    display: block;
    font-size: 6px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
    letter-spacing: 1px;
}
