/* AUTONOMOUS WAR V2 — Three.js build. Styles extracted (no inline <style>). */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #000;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    color: #00ff88;
    user-select: none;
}

/* ── Header ── */
.aw-header {
    position: fixed; top: 0; left: 0; right: 0; height: 38px;
    background: rgba(0,0,0,0.7);
    border-bottom: 1px solid rgba(0,255,80,0.15);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; z-index: 100; backdrop-filter: blur(4px);
}
.aw-header-left { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.08em; }
.aw-header-title { color: #00ff88; font-weight: bold; letter-spacing: 0.15em; }
.aw-header-badge { background: #0066cc; color: #fff; font-size: 9px; font-weight: bold; letter-spacing: 0.1em; padding: 1px 5px; border-radius: 2px; }
.aw-header-engine { font-size: 9px; color: rgba(0,255,80,0.4); letter-spacing: 0.15em; }
.aw-btn {
    font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: 0.15em;
    color: rgba(0,255,80,0.5); border: 1px solid rgba(0,255,80,0.2); background: transparent;
    padding: 4px 10px; cursor: pointer; text-decoration: none; transition: all 0.2s;
}
.aw-btn:hover { color: #00ff88; border-color: rgba(0,255,80,0.6); background: rgba(0,255,80,0.05); }

/* ── Viewport ── */
#aw-canvas { position: fixed; top: 38px; left: 0; width: 100%; height: calc(100% - 38px); display: block; outline: none; }

/* ── Loading ── */
#aw-loading {
    position: fixed; top: 38px; left: 0; right: 0; bottom: 0; background: #000;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; z-index: 90;
}
.aw-loading-title { font-size: clamp(18px, 3vw, 28px); letter-spacing: 0.3em; color: #0088ff; text-shadow: 0 0 20px rgba(0,120,255,0.8); }
.aw-loading-sub { font-size: 11px; letter-spacing: 0.2em; color: rgba(0,255,80,0.5); }
.aw-loading-bar-wrap { width: 280px; height: 2px; background: rgba(0,255,80,0.1); border: 1px solid rgba(0,255,80,0.2); }
.aw-loading-bar-fill { height: 100%; width: 0%; background: #00ff88; transition: width 0.1s linear; box-shadow: 0 0 8px rgba(0,255,80,0.8); }
.aw-loading-hint { font-size: 10px; letter-spacing: 0.15em; color: rgba(255,255,255,0.2); margin-top: 10px; }

/* ── Overlays ── */
.aw-overlay {
    position: fixed; top: 38px; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    z-index: 80; backdrop-filter: blur(2px);
}
.aw-overlay.hidden { display: none; }
.aw-overlay-title { font-size: clamp(24px, 5vw, 48px); letter-spacing: 0.25em; text-transform: uppercase; text-shadow: 0 0 30px currentColor; }
.aw-overlay-title.red { color: #cc2200; }
.aw-overlay-title.green { color: #00ff88; }
.aw-overlay-title.white { color: #ffffff; }
.aw-overlay-title.blue { color: #00aaff; }
.aw-overlay-sub { font-size: 12px; letter-spacing: 0.2em; color: rgba(255,255,255,0.4); text-align: center; line-height: 1.8; }
.aw-overlay-score { font-size: 16px; letter-spacing: 0.2em; color: rgba(0,255,80,0.8); }
.aw-play-btn {
    margin-top: 10px; font-family: 'Courier New', monospace; font-size: 13px; letter-spacing: 0.25em;
    color: #000; background: #00ff88; border: none; padding: 12px 32px; cursor: pointer;
    text-transform: uppercase; transition: all 0.2s; box-shadow: 0 0 20px rgba(0,255,80,0.4);
}
.aw-play-btn:hover { background: #fff; box-shadow: 0 0 30px rgba(255,255,255,0.5); }
.aw-controls-hint { font-size: 10px; letter-spacing: 0.12em; color: rgba(255,255,255,0.2); }

/* ── Scene Picker ── */
.aw-scene-picker { display: flex; gap: 10px; margin: 8px 0; flex-wrap: wrap; justify-content: center; max-width: 680px; }
.aw-scene-card { width: 150px; padding: 12px 10px; border: 1px solid rgba(0,255,80,0.15); border-radius: 4px; cursor: pointer; transition: all 0.2s; text-align: center; background-size: cover; }
.aw-scene-card:hover { border-color: rgba(0,255,80,0.5); box-shadow: 0 0 12px rgba(0,255,80,0.15); }
.aw-scene-card.selected { border-color: #00ff88; box-shadow: 0 0 20px rgba(0,255,80,0.3); }
.aw-scene-card-name { font-size: 10px; letter-spacing: 0.15em; color: #00ff88; margin-bottom: 4px; }
.aw-scene-card-desc { font-size: 8px; letter-spacing: 0.08em; color: rgba(255,255,255,0.35); line-height: 1.4; }
.aw-scene-picker-label { font-size: 9px; letter-spacing: 0.2em; color: rgba(255,255,255,0.25); text-transform: uppercase; width: 100%; text-align: center; }

/* ── Settings ── */
.aw-settings-grid { display: grid; grid-template-columns: 160px 200px; gap: 12px 16px; align-items: center; }
.aw-settings-grid label { font-size: 10px; letter-spacing: 0.15em; color: rgba(0,255,80,0.6); text-align: right; }
.aw-settings-grid input[type="range"] { -webkit-appearance: none; appearance: none; width: 200px; height: 4px; background: rgba(0,255,80,0.15); outline: none; border-radius: 2px; }
.aw-settings-grid input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: #00ff88; border-radius: 50%; cursor: pointer; box-shadow: 0 0 8px rgba(0,255,80,0.5); }
.aw-settings-grid select { width: 200px; height: 28px; background: rgba(0,0,0,0.55); color: #00ff88; border: 1px solid rgba(0,255,80,0.3); font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: 0.1em; padding: 0 8px; outline: none; }

/* ── FX overlays ── */
#hud-damage-flash { position: fixed; top: 38px; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(200,0,0,0.7) 100%); pointer-events: none; opacity: 0; z-index: 70; transition: opacity 0.08s ease-in; }
#hud-muzzle { position: fixed; top: 38px; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at center, rgba(255,200,80,0.25) 0%, transparent 60%); pointer-events: none; opacity: 0; z-index: 65; }
.aw-scanlines { position: fixed; top: 38px; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 4px); pointer-events: none; z-index: 60; }
.aw-vignette { position: fixed; top: 38px; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 61; box-shadow: inset 0 0 200px rgba(0,0,0,0.7); }

#aw-click-hint { display: none; position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: #00ff88; font-family: monospace; font-size: 12px; letter-spacing: 0.2em; padding: 8px 20px; border: 1px solid rgba(0,255,80,0.3); z-index: 95; pointer-events: none; }

/* ── HUD (DOM) ── */
#hud { position: fixed; inset: 38px 0 0 0; pointer-events: none; z-index: 75; font-family: 'Courier New', monospace; }
#hud.hidden { display: none; }
#hud-reticle { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; }
#hud-reticle .ring { position: absolute; inset: 0; border: 1px solid rgba(0,255,100,0.55); border-radius: 50%; animation: reticlePulse 1.6s ease-in-out infinite; }
#hud-reticle .dot { position: absolute; top: 50%; left: 50%; width: 3px; height: 3px; margin: -1.5px; background: rgba(0,255,100,0.9); border-radius: 50%; }
#hud-reticle .tick { position: absolute; background: rgba(0,255,100,0.8); }
#hud-reticle .tick.t { top: -10px; left: 50%; width: 1px; height: 10px; margin-left: -0.5px; }
#hud-reticle .tick.b { bottom: -10px; left: 50%; width: 1px; height: 10px; margin-left: -0.5px; }
#hud-reticle .tick.l { left: -10px; top: 50%; height: 1px; width: 10px; margin-top: -0.5px; }
#hud-reticle .tick.r { right: -10px; top: 50%; height: 1px; width: 10px; margin-top: -0.5px; }
@keyframes reticlePulse { 0%,100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.06); opacity: 0.8; } }

.hud-corner { position: absolute; width: 60px; height: 60px; }
.hud-corner::before, .hud-corner::after { content: ''; position: absolute; background: rgba(0,255,100,0.35); }
.hud-corner::before { width: 60px; height: 1px; }
.hud-corner::after { width: 1px; height: 60px; }
.hud-corner.tl { top: 24px; left: 24px; }
.hud-corner.tr { top: 24px; right: 24px; }
.hud-corner.tr::before, .hud-corner.tr::after { right: 0; }
.hud-corner.bl { bottom: 24px; left: 24px; }
.hud-corner.bl::before { bottom: 0; }
.hud-corner.br { bottom: 24px; right: 24px; }
.hud-corner.br::before { bottom: 0; right: 0; }
.hud-corner.br::after { right: 0; }

#hud-hp-wrap { position: absolute; bottom: 60px; left: 28px; }
#hud-hp-label { font-size: 9px; letter-spacing: 0.1em; color: rgba(0,255,100,0.45); margin-bottom: 4px; }
#hud-hp-track { width: 200px; height: 6px; background: rgba(0,255,100,0.08); border: 1px solid rgba(0,255,100,0.15); }
#hud-hp-fill { height: 100%; width: 200px; background: rgba(0,255,100,0.8); }
#hud-hp-val { position: absolute; left: 210px; bottom: -4px; font-size: 13px; color: rgba(0,255,100,0.9); }

#hud-ammo-wrap { position: absolute; bottom: 36px; right: 28px; text-align: right; }
#hud-reload { font-size: 12px; color: rgba(255,200,0,0.9); opacity: 0; transition: opacity 0.15s; margin-bottom: 6px; }
#hud-weapon { font-size: 10px; color: rgba(0,255,100,0.6); margin-bottom: 6px; }
#hud-ammo { font-size: 18px; color: rgba(0,255,100,0.85); }
#hud-ammo-label { font-size: 9px; color: rgba(0,255,100,0.35); }

#hud-score { position: absolute; top: 16px; left: 28px; font-size: 14px; color: rgba(0,255,100,0.7); }
#hud-wave { position: absolute; top: 16px; right: 28px; font-size: 12px; color: rgba(0,255,100,0.7); text-align: right; }
#hud-kills { position: absolute; top: 34px; right: 28px; font-size: 10px; color: rgba(0,255,100,0.45); text-align: right; }

#hud-banner { position: absolute; top: calc(50% - 60px); left: 0; right: 0; text-align: center; font-size: 28px; color: rgba(200,30,0,0.95); opacity: 0; transition: opacity 0.25s; text-shadow: 0 0 20px currentColor; }
#hud-combo { position: absolute; top: calc(50% + 40px); left: 0; right: 0; text-align: center; font-size: 20px; color: rgba(255,200,0,0.95); opacity: 0; transition: opacity 0.2s; text-shadow: 0 0 16px rgba(255,200,0,0.6); }

#hud-radar { position: absolute; bottom: 100px; left: 20px; width: 120px; height: 120px; border: 1px solid rgba(0,255,80,0.25); border-radius: 50%; background: rgba(0,0,0,0.6); }
#hud-damage-dir { position: absolute; width: 40px; height: 40px; top: 50%; left: 50%; opacity: 0; transition: opacity 0.3s; transform-origin: center; }
