* { margin: 0; padding: 0; box-sizing: border-box; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.buildings-btn { position: fixed; right: 12px; top: 150px; z-index: 14; display: inline-flex; align-items: center; gap: 7px; background: var(--panel-solid); border: 1.5px solid var(--border); color: var(--text); border-radius: 12px; padding: 9px 13px; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: var(--ring), var(--shadow); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.buildings-btn .icon { width: 16px; height: 16px; color: var(--accent); }
.buildings-panel { position: fixed; right: 12px; top: 190px; z-index: 14; width: min(360px, 92vw); max-height: 66vh; overflow-y: auto; background: var(--panel-solid); border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: var(--ring), var(--shadow); color: var(--text); font-size: 12.5px; }
.bp-cols { display: flex; gap: 14px; }
.bp-col { flex: 1; min-width: 0; }
.bp-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 6px; }
.bp-workers { display: flex; align-items: center; gap: 7px; font-weight: 700; margin-bottom: 9px; color: var(--accent); }
.bp-workers .bp-ic { color: var(--accent); }
.bp-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-radius: 5px; }
.bp-clk { cursor: pointer; padding: 3px 5px; margin: 0 -5px; transition: background .12s; }
.bp-clk:hover { background: rgba(255,255,255,.12); }
.bp-clk:active { background: rgba(255,255,255,.2); }
.bp-row .nm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.bp-row .bp-lbl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bp-ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
.bp-clk:hover .bp-ic { color: var(--accent); }
.bp-row .st { font-weight: 800; font-size: 11px; white-space: nowrap; flex: none; }
.bp-ok { color: #6fd88a; } .bp-dead { color: #ff7a70; } .bp-build { color: #ffce54; }
.bp-hpbar { width: 46px; height: 6px; border-radius: 4px; background: rgba(255,255,255,0.14); overflow: hidden; }
.bp-hpfill { height: 100%; background: linear-gradient(90deg, #ff5a4d, #ffce54 55%, #62d07a); }

:root {
  --panel: rgba(18,22,31,0.52);         /* koel glas (modern) */
  --panel-2: rgba(30,36,48,0.5);        /* iets lichter glas voor nesting */
  --panel-solid: rgba(16,20,29,0.82);   /* dichter glas voor kaarten/overlays */
  --border: rgba(255,255,255,0.12);     /* haarlijn */
  --border-strong: rgba(255,255,255,0.22);
  --text: #eef2f8;                       /* koel wit */
  --muted: #9aa6b8;
  --accent: #ffd15c;                     /* warm amber (coins/highlights) */
  --accent-soft: rgba(255,209,92,0.16);
  --fire: #ff7a45;
  --good: #4fd08a;
  --player: #4aa8ff;
  --ai: #ff5d6c;
  --gold: #ffd15c;
  --gold-hi: #ffe9a8;
  --gold-dk: #9a6b1c;
  --blur: blur(18px) saturate(150%);
  --ring: inset 0 1px 0 rgba(255,255,255,0.10);   /* subtiele glas-highlight i.p.v. gouden ornament-rand */
  --shadow: 0 10px 34px rgba(0,0,0,0.40);
  --r: 16px;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #0e1413;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  font-weight: 500;
  color: var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  letter-spacing: 0.1px;
  -webkit-user-select: none; user-select: none; touch-action: none;
}
#game-wrap { position: fixed; inset: 0; }
#game { display: block; width: 100%; height: 100%; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Crosshair */
#crosshair { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; pointer-events: none; z-index: 5; }
#crosshair::before, #crosshair::after { content: ""; position: absolute; background: rgba(255,255,255,0.85); box-shadow: 0 0 4px rgba(0,0,0,0.7); border-radius: 2px; }
#crosshair::before { left: 50%; top: 0; width: 2px; height: 100%; margin-left: -1px; }
#crosshair::after  { top: 50%; left: 0; height: 2px; width: 100%; margin-top: -1px; }

/* HUD top pills */
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 14px; padding: 14px 16px; z-index: 10; pointer-events: none; flex-wrap: wrap; }
.hud-box {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 12px;
  font-weight: 800; font-size: 15px; letter-spacing: .2px;
  color: var(--text); font-variant-numeric: tabular-nums;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--ring), var(--shadow);
}
.hud-box .icon { width: 17px; height: 17px; }
#coins-box .icon, #level-box .icon, #score-box .icon { color: var(--accent); }
#moves-box, #moves-box .icon { color: var(--good); }
#moves-box { display: none; }   /* stappen-pill niet tonen */

/* Wind */
.hud-wind {
  position: absolute; top: 125px; left: 50%; transform: translateX(-50%); z-index: 10; pointer-events: none;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 12px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 7px;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.wind-ic { width: 16px; height: 16px; color: var(--muted); }
.wind-arrow { font-size: 17px; line-height: 1; display: inline-block; transition: transform .3s; color: var(--accent); }

/* HUD bottom controls */
/* Vaste footer: kogel-kiezer + bediening naast elkaar */
.footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: flex; align-items: flex-end; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.footer > * { pointer-events: auto; }
.hud-bottom { display: flex; flex-direction: column; align-items: stretch; gap: 10px; flex: 0 0 auto; }
.ctrl-row { display: flex; gap: 12px; align-items: stretch; }
.ctrl { flex: 1 1 0; min-width: 150px; min-height: 68px; display: flex; flex-direction: column; justify-content: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--ring), var(--shadow); }
.ctrl-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.ctrl-label span { color: var(--text); float: right; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; outline: none; background: linear-gradient(90deg, rgba(255,255,255,0.18), var(--accent)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,0.5); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; }

.fire-btn {
  background: linear-gradient(180deg, #ff8a4c, #f2611b);
  color: #fff; border: 1px solid rgba(255,255,255,0.18); border-radius: var(--r); padding: 14px 30px;
  font-size: 16px; font-weight: 800; letter-spacing: .3px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(242,97,27,0.35), 0 0 0 1px rgba(242,97,27,0.18), inset 0 1px 0 rgba(255,255,255,0.30);
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .14s ease, filter .14s ease;
}
.fire-btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 30px rgba(242,97,27,0.5), inset 0 1px 0 rgba(255,255,255,0.30); }
.fire-btn:active { transform: translateY(1px) scale(.99); box-shadow: 0 4px 12px rgba(242,97,27,0.3); }
.fire-btn:disabled { filter: grayscale(.6) brightness(.7); cursor: default; box-shadow: none; }
.fire-btn.big { padding: 15px 34px; font-size: 17px; margin-top: 8px; border-radius: var(--r); }
.fire-btn.rebuild { background: linear-gradient(180deg, #5aa8ff, #2f7bd6); box-shadow: 0 6px 20px rgba(47,123,214,0.38), inset 0 1px 0 rgba(255,255,255,0.28); white-space: nowrap; }
.fire-btn.rebuild:hover { box-shadow: 0 10px 30px rgba(47,123,214,0.5), inset 0 1px 0 rgba(255,255,255,0.28); }
.fire-btn.rebuild.disabled { filter: grayscale(.6) brightness(.7); cursor: default; pointer-events: none; box-shadow: none; }

/* Kogel-kiezer */
.ammo-select {
  display: flex; gap: 7px; padding: 8px 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 15px;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--ring), var(--shadow);
  flex: 1 1 auto; min-width: 0; max-width: min(70vw, 780px); overflow-x: auto; scrollbar-width: thin;
}
.ammo-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 66px; padding: 7px 6px; cursor: pointer;
  background: transparent; border: 1.5px solid transparent; border-radius: 12px;
  color: var(--muted); transition: background .12s, border-color .12s;
}
.depot-badge {
  position: absolute; top: -6px; right: -3px; z-index: 3;
  background: var(--ai); color: #fff; font-size: 10px; font-weight: 800;
  padding: 1px 5px; border-radius: 9px; line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,.5); pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.ammo-btn.depot-down { opacity: 0.55; filter: grayscale(0.55); }
.ammo-btn.depot-down .ammo-ic { background: rgba(255,90,77,0.2); }
.ammo-ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,0.07); color: var(--text); transition: background .12s, color .12s; }
.ammo-ic .icon { width: 20px; height: 20px; }
.ammo-name { font-size: 11px; font-weight: 700; color: var(--text); }
.ac { font-size: 10.5px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.ac.free { color: var(--good); font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; }
.ammo-btn:hover { background: rgba(255,255,255,0.06); }
.ammo-btn.active { border-color: var(--accent); background: var(--accent-soft); }
.ammo-btn.active .ammo-ic { background: rgba(242,193,78,0.28); color: #fff; }
.ammo-btn.unaffordable { opacity: 0.42; }
.ammo-btn.unaffordable .ac { color: var(--ai); }
.ammo-btn.locked { opacity: 0.5; filter: grayscale(0.7); }
.ammo-btn.locked .ac::before { content: "🔒 "; }
/* Kogel-groepen: projectielen (goud), wall/raise (groen), sabotage (rood) */
.ammo-btn.grp-shell { border-color: rgba(255,206,84,0.45); }
.ammo-btn.grp-util  { border-color: rgba(96,208,120,0.5); }
.ammo-btn.grp-sabo  { border-color: rgba(255,90,77,0.55); }
.ammo-btn.grp-util .ac { color: #6fd88a; }
.ammo-btn.grp-sabo .ac { color: #ff7a70; }
.ammo-btn.active.grp-shell { border-color: #ffce54; background: rgba(255,206,84,0.16); }
.ammo-btn.active.grp-util  { border-color: #62d07a; background: rgba(96,208,120,0.16); }
.ammo-btn.active.grp-sabo  { border-color: #ff5a4d; background: rgba(255,90,77,0.16); }
.ammo-btn.active.grp-util .ammo-ic { background: rgba(96,208,120,0.28); color: #fff; }
.ammo-btn.active.grp-sabo .ammo-ic { background: rgba(255,90,77,0.28); color: #fff; }

/* Kompas */
.compass { position: absolute; top: 42px; left: 12px; z-index: 11; width: 92px; height: 92px; pointer-events: none; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.compass-dial { position: absolute; inset: 0; background: url("../textures/compass_ui_en.png") center/contain no-repeat; }
.cp { display: none; }   /* labels zitten al in de kompas-afbeelding */
.compass-needle { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.compass-deg { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: 12px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0,0,0,.9); }

/* Healthbars (Street Fighter / Mortal Kombat-stijl) + beurt */
.health-hud { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 11; display: flex; align-items: flex-end; gap: 24px; pointer-events: none; width: min(720px, 96vw); }
.hp-side { flex: 1; }
.hp-side.right { text-align: right; }
.hp-name { font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--text); text-shadow: 0 2px 4px rgba(0,0,0,.75); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin: 0 6px; box-shadow: 0 0 7px currentColor; }
.dot-p { background: var(--player); color: var(--player); }
.dot-a { background: var(--ai); color: var(--ai); }
.hp-bar { position: relative; height: 12px; overflow: hidden; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.hp-fill { height: 100%; width: 100%; border-radius: 999px; transition: width .35s cubic-bezier(.2,.8,.2,1); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.hp-fill.player { background: linear-gradient(90deg, #63b6ff, #3a86ff); }
.hp-fill.ai { background: linear-gradient(90deg, #ff8a5c, #ff5d6c); float: right; }
.turn-label { font-size: 12px; font-weight: 800; color: var(--accent); white-space: nowrap; background: var(--panel); padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); text-shadow: 0 1px 2px rgba(0,0,0,.6); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--ring), var(--shadow); }
.shield-badge { display: inline-block; margin: 0 5px; padding: 1px 6px; border-radius: 9px; font-size: 11px; font-weight: 800; background: rgba(90,170,255,.22); border: 1px solid rgba(120,190,255,.55); color: #cfe6ff; white-space: nowrap; }
.shield-badge.hidden { display: none; }
.turn-label.urgent { color: #fff; background: rgba(214,40,40,.94); border-color: #ffd24d; font-size: 15px; box-shadow: 0 0 18px rgba(255,70,70,.85); animation: turnPulse .5s ease-in-out infinite; }
@keyframes turnPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.24); } }

/* Beweeg-D-pad */
.move-pad { position: absolute; left: 16px; top: 45%; transform: translateY(-50%); z-index: 12; width: 128px; height: 128px; }
.move-btn { position: absolute; width: 42px; height: 42px; background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--ring), var(--shadow); transition: background .12s; }
.move-btn::before { content: ""; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; }
.move-btn.up::before    { transform: rotate(-135deg); margin-top: 4px; }
.move-btn.down::before  { transform: rotate(45deg); margin-bottom: 4px; }
.move-btn.left::before  { transform: rotate(135deg); margin-left: 4px; }
.move-btn.right::before { transform: rotate(-45deg); margin-right: 4px; }
.move-btn:hover { background: rgba(242,193,78,0.22); }
.move-btn:active { background: rgba(242,193,78,0.4); }
.move-btn.disabled { opacity: 0.3; pointer-events: none; }
.move-btn.up { left: 43px; top: 0; }
.move-btn.left { left: 0; top: 43px; }
.move-btn.right { left: 86px; top: 43px; }
.move-btn.down { left: 43px; top: 86px; }

/* Overlay */
.overlay { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, rgba(20,26,38,0.5), rgba(6,9,14,0.86)); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.overlay.hidden { display: none; }

/* How to play */
.help-btn { position: fixed; left: 14px; top: 150px; z-index: 14; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-solid); border: 1.5px solid var(--border); color: var(--accent); font-size: 19px; font-weight: 900; cursor: pointer;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--ring), var(--shadow); }
.help-btn:hover { border-color: var(--accent); }
.howto { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(20,26,38,0.5), rgba(6,9,14,0.86)); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.howto.hidden { display: none; }
.howto-card { position: relative; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 20px;
  padding: 26px 26px 22px; width: min(560px, 96vw); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.howto-card h1 { font-size: 26px; margin-bottom: 12px; padding-right: 34px; }
.howto-close { position: absolute; right: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(255,255,255,0.06); color: var(--text); font-size: 15px; cursor: pointer; }
.howto-close:hover { background: rgba(255,255,255,0.14); }
.howto-body { overflow-y: auto; padding-right: 8px; margin-bottom: 14px; -webkit-overflow-scrolling: touch; }
.howto-body section { margin-bottom: 15px; }
.howto-body h3 { font-size: 15px; font-weight: 800; color: var(--accent); margin-bottom: 5px; letter-spacing: .2px; }
.howto-body p, .howto-body li { font-size: 13.5px; line-height: 1.5; color: var(--text); font-weight: 500; }
.howto-body ul { padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.howto-body b { color: #fff; font-weight: 700; }
.howto-card .fire-btn.big { align-self: center; }
.spec-wrap { overflow-x: auto; margin: 4px 0; border-radius: 8px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
table.spec th, table.spec td { text-align: left; padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); white-space: nowrap; }
table.spec th { color: var(--accent); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
table.spec td:first-child { font-weight: 700; color: #fff; }
table.spec tbody tr:hover { background: rgba(255,255,255,0.05); }
.spec-note { font-size: 11.5px; color: var(--muted); margin: 4px 0 2px; line-height: 1.45; }
.overlay-card { background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 20px; padding: 30px 34px; max-width: 440px; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,0.6); }
.overlay-card h1 { font-size: 32px; margin-bottom: 14px; }
.overlay-card p { color: var(--muted); margin-bottom: 14px; line-height: 1.5; }

/* Stats-scherm */
.stats { display: flex; flex-direction: column; gap: 8px; margin: 6px auto 4px; max-width: 300px; }
.stats > div { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 13px; background: rgba(255,255,255,0.05); border-radius: 10px; border: 1px solid var(--border); }
.stats span { color: var(--muted); font-size: 14px; }
.stats b { color: var(--accent); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
table.stats2 { width: 100%; max-width: 360px; margin: 10px auto 14px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.stats2 th, table.stats2 td { padding: 8px 10px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.08); }
table.stats2 th:first-child, table.stats2 td:first-child { text-align: left; color: var(--muted); font-weight: 600; }
table.stats2 thead th { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; font-weight: 800; }
table.stats2 tbody td { color: #fff; font-weight: 800; font-size: 16px; }
table.stats2 tbody td:first-child { color: var(--muted); font-weight: 600; font-size: 14px; }

/* Startmenu / lobby */
.menu { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(8,10,14,0.45), rgba(8,10,14,0.78)), url("../start.png") center/cover no-repeat; }
.menu.hidden { display: none; }
.menu-card { background: rgba(14,18,24,0.5); border: 1px solid var(--border-strong); border-radius: 22px;
  padding: 30px 34px; max-width: 440px; width: min(92vw, 440px); text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.menu-logo { display: block; max-width: min(84vw, 360px); width: 90%; height: auto; margin: 0 auto 16px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.6)); }
.menu-card h1 { font-size: 38px; letter-spacing: .5px; margin-bottom: 4px; }

/* Intro-splash */
.intro { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(rgba(8,10,14,0.45), rgba(8,10,14,0.78)), url("../start.png") center/cover no-repeat;
  transition: opacity .7s ease; }
.intro.hide { opacity: 0; pointer-events: none; }
.intro-logo { max-width: min(84vw, 360px); width: 90%; height: auto; filter: drop-shadow(0 8px 20px rgba(0,0,0,.6)); animation: introFade 1.1s ease both; }
.intro-fallback { font-size: clamp(34px, 9vw, 72px); font-weight: 900; letter-spacing: 1px; color: var(--accent); text-shadow: 0 4px 18px rgba(0,0,0,.6); animation: introFade 1.1s ease both; }
@keyframes introFade { from { opacity: 0; } to { opacity: 1; } }
.menu-sub { color: var(--muted); margin-bottom: 24px; font-size: 15px; }
#menu-main { display: flex; flex-direction: column; gap: 12px; }
.res-choice { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; }
.res-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-right: 4px; }
.res-btn { padding: 7px 16px; border-radius: 10px; font-size: 14px; font-weight: 800; cursor: pointer;
  background: var(--panel); color: var(--muted); border: 1px solid var(--border); }
.res-btn.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); box-shadow: var(--ring); }
.fire-btn.alt { background: linear-gradient(180deg, #3fb6a2, #1f8f7e); box-shadow: 0 8px 22px rgba(31,143,126,0.34), inset 0 1px 0 rgba(255,255,255,0.25); }
.fire-btn.alt:hover { box-shadow: 0 12px 28px rgba(31,143,126,0.44), inset 0 1px 0 rgba(255,255,255,0.25); }
.menu-online { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.menu-online.hidden { display: none; }
#net-status { color: var(--accent); font-weight: 700; font-size: 15px; }
#net-share p { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
#net-link { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: rgba(0,0,0,0.35); color: var(--text); font-size: 13px; text-align: center; margin-bottom: 8px; }
.net-wait { color: var(--muted); font-size: 13px; margin-top: 6px; }
.btn { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 10px 16px; font-weight: 700; font-size: 14px; cursor: pointer; }
.btn:hover { background: rgba(255,255,255,0.14); }
.btn.back { background: transparent; border-color: transparent; color: var(--muted); align-self: center; }

/* Gebruikersnaam-veld */
.name-field { display: flex; flex-direction: column; gap: 7px; text-align: left; margin-bottom: 2px; }
.name-field label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; padding-left: 2px; }
#username { width: 100%; padding: 13px 15px; border-radius: 13px; font-size: 15px; font-weight: 600; font-family: inherit;
  color: var(--text); background: rgba(255,255,255,0.06); border: 1.5px solid var(--border);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
#username::placeholder { color: rgba(255,255,255,0.34); font-weight: 500; }
#username:focus { border-color: var(--accent); background: rgba(255,255,255,0.1); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Instellingen */
.settings { display: flex; flex-direction: column; gap: 9px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.set-row label { font-size: 13px; font-weight: 700; color: var(--muted); }
.set-row input { width: 92px; padding: 9px 11px; border-radius: 10px; font-size: 15px; font-weight: 700; font-family: inherit; text-align: center;
  color: var(--text); background: rgba(255,255,255,0.06); border: 1.5px solid var(--border); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.set-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toggle { display: inline-flex; gap: 4px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 11px; padding: 3px; }
.tg-btn { padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 800; cursor: pointer; background: transparent; color: var(--muted); border: none; }
.tg-btn.active { background: var(--accent-soft); color: var(--accent); }

/* Online lobby-lijst */
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lobby-head #net-status { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.lobby-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.lobby-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 15px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,0.05); border: 1.5px solid var(--border); border-radius: 13px; color: var(--text); font-weight: 700; font-size: 15px;
  transition: background .12s ease, border-color .12s ease, transform .12s ease; }
.lobby-item:hover { background: rgba(255,255,255,0.11); border-color: var(--accent); transform: translateY(-1px); }
.lobby-item .lobby-join { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.lobby-empty { padding: 20px 12px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }
.lobby-wait { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 8px; }
.lobby-wait #net-status { color: var(--accent); font-weight: 800; font-size: 16px; }
.lobby-hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast { position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%) scale(.85); z-index: 20; pointer-events: none; opacity: 0; font-size: 34px; font-weight: 900; color: var(--accent); text-shadow: 0 2px 12px rgba(0,0,0,0.85); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

@media (max-width: 560px) {
  .ctrl { min-width: 104px; padding: 8px 10px; }
  .fire-btn { padding: 13px 18px; font-size: 16px; }
  .hud-box { font-size: 13px; padding: 6px 9px; }
  .hud-bottom { gap: 8px; }
  .ammo-select { bottom: 172px; gap: 5px; padding: 6px 7px; }
  .ammo-btn { min-width: 54px; padding: 6px 4px; }
  .ammo-ic { width: 28px; height: 28px; }
  .ammo-ic .icon { width: 17px; height: 17px; }
  .move-pad { width: 116px; height: 116px; top: auto; bottom: 92px; left: 10px; transform: none; }
  .move-btn { width: 37px; height: 37px; }
  .move-btn.up { left: 39px; } .move-btn.down { left: 39px; top: 78px; }
  .move-btn.left { top: 39px; } .move-btn.right { left: 78px; top: 39px; }
}
