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

body {
    background: #000;
    color: #a0ffb0;
    font-family: 'IBM Plex Mono', monospace;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    cursor: crosshair;
}

/* Landing Screen */
#landing-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 1.5s ease;
}

.landing-glow {
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(ellipse, rgba(30,120,50,0.15) 0%, rgba(0,80,20,0.05) 40%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.landing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    padding: 20px;
}

.landing-classification {
    font-size: 10px;
    letter-spacing: 4px;
    color: rgba(160,255,176,0.4);
    margin-bottom: 40px;
    text-transform: uppercase;
}

.landing-title {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: clamp(20px, 4vw, 36px);
    letter-spacing: 6px;
    line-height: 1.4;
    color: #c0ffd0;
    text-shadow: 0 0 40px rgba(30,200,80,0.3), 0 0 80px rgba(30,200,80,0.1);
    margin-bottom: 20px;
}

.landing-subtitle {
    font-size: 13px;
    color: rgba(160,255,176,0.6);
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.landing-flavor {
    font-family: 'Crimson Pro', serif;
    font-size: 16px;
    color: rgba(160,255,176,0.5);
    margin-bottom: 50px;
    line-height: 1.6;
}

.enter-button {
    position: relative;
    background: transparent;
    border: 1px solid rgba(80,255,120,0.4);
    color: #80ff90;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
    padding: 18px 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.enter-button:hover {
    border-color: rgba(80,255,120,0.8);
    color: #a0ffb0;
    box-shadow: 0 0 30px rgba(30,200,80,0.3), inset 0 0 30px rgba(30,200,80,0.05);
}

.btn-glow {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(80,255,120,0.1), transparent);
    animation: btnSweep 3s ease-in-out infinite;
}

@keyframes btnSweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.landing-controls-hint {
    margin-top: 40px;
    font-size: 11px;
    color: rgba(160,255,176,0.3);
    letter-spacing: 1px;
    line-height: 2;
}

/* App Container */
#app-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#scene-container {
    width: 100%; height: 100%;
}

#scene-container canvas {
    display: block;
}

/* HUD Panel */
#hud-panel {
    position: fixed;
    top: 16px; left: 16px;
    background: rgba(0,10,5,0.85);
    border: 1px solid rgba(80,255,120,0.2);
    padding: 14px 18px;
    font-size: 11px;
    z-index: 10;
    min-width: 220px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.hud-header {
    font-size: 9px;
    letter-spacing: 3px;
    color: rgba(160,255,176,0.4);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(80,255,120,0.15);
}

.hud-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.hud-label {
    color: rgba(160,255,176,0.5);
    font-size: 10px;
}

.hud-value {
    color: #a0ffb0;
    font-weight: 500;
}

.arrow-up {
    animation: arrowBob 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes arrowBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.schumann-row {
    margin-top: 4px;
    align-items: center;
}

#schumann-canvas {
    image-rendering: auto;
}

/* Discovery Panel */
#discovery-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(0);
    width: 340px;
    max-height: 80vh;
    background: rgba(0,10,5,0.92);
    border: 1px solid rgba(80,255,120,0.3);
    border-right: none;
    padding: 24px;
    z-index: 15;
    overflow-y: auto;
    backdrop-filter: blur(8px);
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: all;
}

#discovery-panel.hidden {
    transform: translateY(-50%) translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    color: rgba(160,255,176,0.5);
    font-size: 18px;
    cursor: pointer;
}

.close-btn:hover {
    color: #a0ffb0;
}

.discovery-title {
    font-family: 'Crimson Pro', serif;
    font-size: 22px;
    font-weight: 700;
    color: #c0ffd0;
    margin-bottom: 4px;
}

.discovery-scientific {
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    font-size: 14px;
    color: rgba(160,255,176,0.6);
    margin-bottom: 14px;
}

.discovery-description {
    font-family: 'Crimson Pro', serif;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(200,255,210,0.8);
    margin-bottom: 16px;
}

.discovery-stats {
    font-size: 10px;
    color: rgba(160,255,176,0.6);
    border-top: 1px solid rgba(80,255,120,0.15);
    padding-top: 10px;
    line-height: 1.8;
}

/* Mini Map */
#mini-map {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,10,5,0.8);
    border: 1px solid rgba(80,255,120,0.2);
    padding: 6px;
    z-index: 10;
    cursor: pointer;
    pointer-events: all;
}

#minimap-canvas {
    display: block;
}

/* Clock Drift */
#clock-drift {
    position: fixed;
    bottom: 46px; left: 16px;
    background: rgba(0,10,5,0.8);
    border: 1px solid rgba(80,255,120,0.15);
    padding: 6px 12px;
    font-size: 11px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: all;
    cursor: help;
}

.clock-icon {
    font-size: 16px;
    filter: grayscale(0.6);
}

.clock-time {
    color: #a0ffb0;
    font-weight: 500;
}

.clock-drift-label {
    font-size: 9px;
    color: rgba(160,255,176,0.4);
}

/* Crosshair */
#crosshair {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(160,255,176,0.3);
    font-size: 20px;
    z-index: 5;
    pointer-events: none;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
}

/* Footer */
#footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 28px;
    background: rgba(0,8,4,0.9);
    border-top: 1px solid rgba(80,255,120,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 9px;
    letter-spacing: 1px;
    color: rgba(160,255,176,0.3);
    z-index: 10;
}

#footer a {
    color: rgba(160,255,176,0.4);
    text-decoration: none;
}

#footer a:hover {
    color: #a0ffb0;
}

/* Mobile Controls */
#mobile-controls {
    display: none;
}

#joystick-area {
    position: fixed;
    bottom: 60px; left: 30px;
    z-index: 20;
    pointer-events: all;
}

#joystick-base {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(0,20,10,0.6);
    border: 1px solid rgba(80,255,120,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#joystick-knob {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(80,255,120,0.3);
    border: 1px solid rgba(80,255,120,0.5);
    position: absolute;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #hud-panel {
        top: 8px; left: 8px;
        font-size: 9px;
        min-width: 180px;
        padding: 10px 12px;
    }

    #discovery-panel {
        width: 280px;
        padding: 18px;
    }

    #clock-drift {
        bottom: 36px;
        font-size: 9px;
    }

    #mini-map {
        bottom: 34px;
    }

    #mobile-controls {
        display: block;
    }

    .landing-title {
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    #hud-panel {
        max-width: 160px;
    }

    #discovery-panel {
        width: 240px;
        padding: 14px;
    }

    .discovery-title {
        font-size: 18px;
    }
}

/* Scrollbar for discovery panel */
#discovery-panel::-webkit-scrollbar {
    width: 4px;
}
#discovery-panel::-webkit-scrollbar-track {
    background: transparent;
}
#discovery-panel::-webkit-scrollbar-thumb {
    background: rgba(80,255,120,0.2);
    border-radius: 2px;
}