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

body {
    font-family: 'Share Tech Mono', monospace;
    background: #0a0a0f;
    color: #c0c0c0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Start Screen */
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: radial-gradient(ellipse at center, #0d1117 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease;
}

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

.start-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.foundation-logo {
    margin-bottom: 1.5rem;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.document-header {
    margin-bottom: 1.5rem;
}

.doc-class {
    display: inline-block;
    background: #1a3a2a;
    border: 1px solid #00ffcc;
    color: #00ffcc;
    padding: 0.2rem 0.8rem;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.document-header h1 {
    font-size: 2.5rem;
    color: #ffffff;
    letter-spacing: 4px;
    margin: 0.5rem 0;
}

.subtitle {
    color: #00ccaa;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.briefing {
    text-align: left;
    background: rgba(0, 255, 204, 0.03);
    border: 1px solid rgba(0, 255, 204, 0.15);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.8;
}

.briefing p {
    margin-bottom: 0.6rem;
}

.redacted {
    background: #ffffff;
    color: #ffffff;
    padding: 0 4px;
    user-select: none;
}

.warning-text {
    color: #ff4444;
    text-align: center;
    margin-top: 1rem !important;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.controls-info {
    margin-bottom: 1.5rem;
    font-size: 0.7rem;
    color: #666;
    line-height: 1.8;
}

#start-btn, #observe-btn {
    font-family: 'Share Tech Mono', monospace;
    background: transparent;
    border: 2px solid #00ffcc;
    color: #00ffcc;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.3s;
    margin: 0.3rem;
}

#start-btn:hover, #observe-btn:hover {
    background: #00ffcc;
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.4);
}

#observe-btn {
    border-color: #666;
    color: #888;
    font-size: 0.8rem;
    display: block;
    margin: 0.8rem auto 0;
}

#observe-btn:hover {
    border-color: #00ffcc;
    background: rgba(0, 255, 204, 0.1);
    color: #00ffcc;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

#hud.hidden, .hidden {
    display: none !important;
}

#speed-indicator {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 255, 204, 0.3);
    padding: 12px 16px;
    min-width: 120px;
}

#speed-value {
    font-size: 2rem;
    color: #00ffcc;
    transition: color 0.3s;
}

#speed-value.danger {
    color: #ff3333;
    animation: blink 0.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

#speed-bar-container {
    width: 100%;
    height: 4px;
    background: #1a1a2a;
    margin-top: 6px;
    position: relative;
}

#speed-bar {
    height: 100%;
    width: 0%;
    background: #ff3333;
    transition: width 0.2s, background 0.3s;
}

#speed-bar.safe {
    background: #00ffcc;
}

#speed-threshold {
    position: absolute;
    left: 50%;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: #ffaa00;
}

#altitude-indicator {
    position: absolute;
    bottom: 30px;
    left: 180px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 255, 204, 0.3);
    padding: 12px 16px;
}

#altitude-value {
    font-size: 1.4rem;
    color: #00ccaa;
}

#panic-indicator {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 50, 50, 0.3);
    padding: 12px 16px;
    min-width: 150px;
}

#panic-bar-container {
    width: 100%;
    height: 6px;
    background: #1a1a2a;
    margin-top: 6px;
}

#panic-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffaa00, #ff3333);
    transition: width 0.5s;
}

.hud-label {
    font-size: 0.6rem;
    color: #666;
    letter-spacing: 2px;
    margin-bottom: 2px;
}

.hud-unit {
    font-size: 0.6rem;
    color: #444;
    letter-spacing: 1px;
}

#status-text {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 50, 50, 0.5);
    padding: 8px 20px;
    font-size: 0.75rem;
    color: #ff6666;
    letter-spacing: 2px;
    white-space: nowrap;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { border-color: rgba(255, 50, 50, 0.5); }
    50% { border-color: rgba(255, 50, 50, 0.9); }
}

#look-up-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    pointer-events: all;
    font-family: 'Share Tech Mono', monospace;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 255, 204, 0.5);
    color: #00ffcc;
    padding: 12px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.2s;
}

#look-up-btn:hover, #look-up-btn:active {
    background: rgba(0, 255, 204, 0.15);
    border-color: #00ffcc;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

/* Mobile Controls */
#mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 15;
    pointer-events: none;
}

#joystick-zone {
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: 120px;
    height: 120px;
    pointer-events: all;
}

#joystick-base {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 255, 204, 0.1);
    border: 2px solid rgba(0, 255, 204, 0.3);
    position: relative;
}

#joystick-knob {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 255, 204, 0.4);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

#sprint-btn {
    position: absolute;
    bottom: 60px;
    right: 140px;
    pointer-events: all;
    font-family: 'Share Tech Mono', monospace;
    background: rgba(255, 150, 0, 0.2);
    border: 1px solid rgba(255, 150, 0, 0.5);
    color: #ffaa00;
    padding: 15px 20px;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

/* Game Over */
#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 2s ease;
}

#game-over-screen.caught {
    background: rgba(255, 255, 255, 0.95);
}

#game-over-screen.escaped {
    background: rgba(0, 30, 20, 0.95);
}

#game-over-content {
    text-align: center;
    padding: 2rem;
}

#game-over-screen.caught #game-over-title {
    color: #000;
    font-size: 1.5rem;
    letter-spacing: 4px;
}

#game-over-screen.caught #game-over-text {
    color: #333;
    font-size: 0.8rem;
    margin: 1rem 0 2rem;
}

#game-over-screen.escaped #game-over-title {
    color: #00ffcc;
    font-size: 1.5rem;
    letter-spacing: 4px;
}

#game-over-screen.escaped #game-over-text {
    color: #66aa88;
    font-size: 0.8rem;
    margin: 1rem 0 2rem;
}

#game-over-content button {
    font-family: 'Share Tech Mono', monospace;
    background: transparent;
    border: 2px solid currentColor;
    color: inherit;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    letter-spacing: 2px;
}

/* Observation HUD */
#observation-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.6);
}

.obs-info {
    font-size: 0.7rem;
    color: #00ccaa;
    letter-spacing: 2px;
}

#observation-hud button {
    font-family: 'Share Tech Mono', monospace;
    background: transparent;
    border: 1px solid #666;
    color: #999;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Footer */
#footer {
    position: fixed;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    font-size: 0.6rem;
}

#footer a {
    color: #333;
    text-decoration: none;
    letter-spacing: 1px;
}

#footer a:hover {
    color: #00ffcc;
}

/* Responsive */
@media (max-width: 768px) {
    .start-content {
        padding: 1rem;
    }
    
    .document-header h1 {
        font-size: 1.8rem;
    }
    
    .briefing {
        font-size: 0.7rem;
    }
    
    #speed-indicator {
        bottom: 220px;
        left: 15px;
    }
    
    #altitude-indicator {
        bottom: 220px;
        left: 150px;
    }
    
    #look-up-btn {
        display: none;
    }
    
    #panic-indicator {
        top: 80px;
        right: 15px;
    }
}