@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Playfair+Display:wght@700;900&display=swap');
* { margin:0; padding:0; box-sizing:border-box; }
html,body { width:100%; height:100%; overflow:hidden; background:#05070b; }
body {
  color:#d4d0c8; font-family:'DM Mono',monospace;
  touch-action:none; -webkit-user-select:none; user-select:none;
}
canvas { display:block; }

/* ── HUD ── */
#hud {
  position:absolute; top:0; left:0; right:0; padding:12px 14px;
  display:none; justify-content:space-between; align-items:flex-start;
  pointer-events:none; z-index:10;
}
.hud-box {
  background:rgba(8,9,12,0.82); border:1px solid rgba(212,160,48,0.28);
  padding:8px 12px; backdrop-filter:blur(8px);
}
.hud-title { font-family:'Playfair Display',serif; font-size:15px; color:#d4a030; letter-spacing:2px; }
.hud-sub { color:rgba(212,208,200,0.45); font-size:8px; margin-top:1px; letter-spacing:1px; }
#hud-state { font-size:10px; margin-top:6px; line-height:1.7; }
#hud-state b { color:#d4a030; font-weight:500; }
.hud-right { text-align:right; }
#heatwrap { width:120px; height:5px; border:1px solid rgba(212,160,48,0.3); margin-top:4px; margin-left:auto; }
#heatfill { height:100%; width:0%; background:#d4a030; transition:width .1s, background .2s; }

/* ── Crosshair ── */
#cross {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:26px; height:26px; z-index:9; pointer-events:none; display:none; opacity:.0;
  transition:opacity .25s;
}
#cross::before, #cross::after {
  content:''; position:absolute; background:rgba(212,160,48,0.7);
}
#cross::before { left:50%; top:0; width:1px; height:100%; transform:translateX(-50%); }
#cross::after  { top:50%; left:0; height:1px; width:100%; transform:translateY(-50%); }

/* ── Prompt / info ── */
#prompt {
  position:absolute; bottom:84px; left:50%; transform:translateX(-50%);
  z-index:10; pointer-events:none; text-align:center;
  background:rgba(8,9,12,0.85); border:1px solid rgba(212,160,48,0.35);
  padding:8px 16px; font-size:11px; opacity:0; transition:opacity .25s; max-width:440px;
}
#prompt .hl { color:#d4a030; }
#hint {
  position:absolute; bottom:14px; left:50%; transform:translateX(-50%);
  z-index:10; font-size:9px; color:rgba(212,208,200,0.32);
  text-align:center; pointer-events:none; letter-spacing:.5px;
}

/* ── Splash ── */
#splash {
  position:absolute; inset:0; z-index:100;
  background:linear-gradient(rgba(5,7,11,0.66),rgba(5,7,11,0.86)), #05070b url('../assets/aerial_1945_ref.jpg') center/cover no-repeat;
  display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px;
}
#splash h1, #splash h2, #splash .desc { text-shadow:0 2px 12px rgba(0,0,0,0.8); }
#splash h1 { font-family:'Playfair Display',serif; font-size:clamp(28px,6vw,46px); color:#d4a030; letter-spacing:8px; }
#splash h2 { font-size:11px; color:rgba(212,208,200,0.42); letter-spacing:4px; text-transform:uppercase; font-weight:300; margin:8px 0 24px; text-align:center; }
#splash .desc { max-width:420px; text-align:center; font-size:11px; line-height:1.85; color:rgba(212,208,200,0.6); margin-bottom:26px; }
.btn {
  background:transparent; border:1px solid #d4a030; color:#d4a030;
  padding:11px 34px; font-family:'DM Mono',monospace; font-size:11px;
  letter-spacing:3px; text-transform:uppercase; cursor:pointer; transition:all .3s; margin:5px;
}
.btn:hover { background:#d4a030; color:#05070b; }
#vrbtn { display:none; }
#loadnote { font-size:9px; color:rgba(212,208,200,0.3); margin-top:18px; letter-spacing:1px; }

/* ── Flash overlay (bomb impact) ── */
#flash { position:absolute; inset:0; z-index:8; pointer-events:none; background:#fff; opacity:0; }

/* ── Radar (unten rechts) ── */
#radar {
  position:absolute; right:12px; bottom:12px; z-index:10; display:none;
  border:1px solid rgba(120,200,140,0.3); border-radius:50%;
  background:rgba(6,12,8,0.45); backdrop-filter:blur(3px);
}
#sound, #vrback, #homebtn, #settingsbtn {
  position:absolute; right:14px; top:120px; z-index:11; display:none;
  background:rgba(8,9,12,0.82); border:1px solid rgba(212,160,48,0.28);
  color:#d4a030; font-family:'DM Mono',monospace; font-size:11px;
  padding:4px 8px; cursor:pointer;
}
#vrback { top:152px; }
#homebtn { top:184px; }
#settingsbtn { top:216px; }
/* ── Einstellungen (Musik/FX-Lautstärke) ── */
#settingsPanel { display:none; position:fixed; inset:0; z-index:70; background:rgba(4,6,10,0.85);
  align-items:center; justify-content:center; }
#settingsPanel.open { display:flex; }
#settingsCard { background:#0b0e14; border:1px solid rgba(212,160,48,0.4); padding:24px 30px; min-width:300px;
  font-family:'DM Mono',monospace; color:#d4a030; }
#settingsCard h3 { margin:0 0 16px; font-size:13px; letter-spacing:3px; text-transform:uppercase; font-weight:400; }
.setrow { display:flex; align-items:center; gap:12px; margin:14px 0; font-size:11px; }
.setrow label { width:62px; color:rgba(212,208,200,0.7); }
.setrow input[type=range]{ flex:1; accent-color:#d4a030; }
.setrow .val { width:32px; text-align:right; color:rgba(212,208,200,0.55); }
#settingsCard .btn { margin-top:16px; width:100%; }
/* Filmvorführung (Ausstellung im Zentralkern) */
#videoOverlay { display:none; position:fixed; inset:0; z-index:60; background:rgba(4,6,10,0.88);
  align-items:center; justify-content:center; }
#videoBox { width:min(86vw,1100px); }
#videoTitle { color:#d4d0c8; font:bold 13px/1.6 monospace; letter-spacing:0.12em; padding:6px 2px;
  display:flex; justify-content:space-between; align-items:center; }
#videoTitle button { background:#2a2e36; color:#d4d0c8; border:1px solid #555; font:bold 11px monospace;
  padding:4px 10px; cursor:pointer; }
#videoFrame { width:100%; aspect-ratio:16/9; border:2px solid #555; background:#000; }

/* ── Touch-Steuerung (nur auf Touch-Geräten, nach Spielstart) ── */
#touchUI { display:none; position:absolute; inset:0; z-index:12; pointer-events:none; }
body.touch.playing #touchUI { display:block; }
body.touch.playing #hint { display:none; }     /* Button-Reihe liegt sonst über dem Hinweistext */
#stick {
  position:absolute; left:22px; bottom:26px; width:124px; height:124px;
  border:1px solid rgba(212,160,48,0.35); border-radius:50%;
  background:rgba(8,9,12,0.35); pointer-events:auto; touch-action:none;
}
#stickKnob {
  position:absolute; left:50%; top:50%; width:52px; height:52px; margin:-26px 0 0 -26px;
  border:1px solid rgba(212,160,48,0.6); border-radius:50%;
  background:rgba(212,160,48,0.25);
}
#tbtns {
  position:absolute; left:16px; bottom:168px;     /* Spalte ÜBER dem Joystick — lief vorher links aus dem Bild */
  display:flex; flex-direction:column-reverse; gap:8px; align-items:flex-start;
}
body.touch .tbtn { padding:8px 12px; font-size:11px; }
/* Prompt auf Mobile: schmaler + in das freie Himmelsband oben, nicht über die Figur/HUD */
body.touch #prompt { top:23%; bottom:auto; max-width:72vw; font-size:10px; padding:6px 11px; }
.tbtn {
  pointer-events:auto; touch-action:none; border:1px solid rgba(212,160,48,0.55);
  background:rgba(8,9,12,0.55); color:#d4a030; font-family:'DM Mono',monospace;
  letter-spacing:1px; border-radius:8px; padding:10px 14px; font-size:12px;
}
.tbtn:active { background:rgba(212,160,48,0.4); color:#05070b; }
#btnFire {
  position:absolute; right:48px; bottom:192px;   /* allein über dem Radar */
  font-size:15px; padding:22px 14px; border-radius:50%; border-width:2px;
}
