:root {
  --bg: #02070f;
  --bg2: #081226;
  --panel: rgba(7, 20, 40, 0.86);
  --panel2: rgba(3, 10, 22, 0.8);
  --border: rgba(43, 102, 167, 0.45);
  --cyan: #00e6ff;
  --cyan2: #2bd6ff;
  --red: #ff3463;
  --green: #00ff9a;
  --yellow: #ffd84e;
  --text: #cfe7ff;
  --muted: #7ea2c2;
  --mono: "Share Tech Mono", monospace;
  --hud: "Orbitron", monospace;
  --ui: "Rajdhani", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: var(--bg); color: var(--text); font-family: var(--ui); overflow: hidden; }
button, input, select { font: inherit; }
.hidden { display: none !important; }

.hud-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 230, 255, 0.08) inset;
  backdrop-filter: blur(6px);
}
.title {
  font-family: var(--hud);
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
}
.small { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.label { display: block; font-family: var(--hud); font-size: 9px; letter-spacing: 2px; color: var(--muted); margin: 10px 0 5px; }
.row { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0; }

.btn {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 230, 255, 0.08);
  color: var(--text);
  padding: 11px 14px;
  text-align: left;
  font-family: var(--hud);
  letter-spacing: 1.4px;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.15s ease;
}
.btn:hover { border-color: var(--cyan2); color: var(--cyan2); background: rgba(0, 230, 255, 0.14); }
.btn.red { border-color: rgba(255, 52, 99, 0.65); color: var(--red); background: rgba(255, 52, 99, 0.08); }
.btn.green { border-color: rgba(0, 255, 154, 0.65); color: var(--green); background: rgba(0, 255, 154, 0.08); }

select, .input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  padding: 10px 12px;
}
.input {
  text-align: center;
  font-family: var(--hud);
  letter-spacing: 3px;
  font-size: 18px;
  text-transform: uppercase;
}

body.admin-body {
  overflow: auto;
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 230, 255, 0.08), transparent 35%),
    radial-gradient(circle at 80% 85%, rgba(255, 52, 99, 0.08), transparent 42%),
    linear-gradient(180deg, #040b16 0%, #02070f 100%);
  padding: 16px;
}
.admin-wrap { max-width: 1200px; margin: 0 auto; display: grid; gap: 12px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.chip { display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.admin-grid { display: grid; gap: 12px; grid-template-columns: 1.4fr 1fr 1fr; }
.admin-card { padding: 14px; }
.admin-card h3 { font-family: var(--hud); font-size: 11px; letter-spacing: 2px; color: var(--cyan2); margin-bottom: 12px; }
.admin-controls { display: grid; gap: 8px; }
.admin-list { max-height: 290px; overflow: auto; display: grid; gap: 6px; }
.player-item { background: var(--panel2); border: 1px solid rgba(35, 75, 125, 0.45); border-radius: 6px; padding: 7px 9px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.player-item.att { border-left: 3px solid var(--red); }
.player-item.def { border-left: 3px solid var(--cyan); }
.join-req-item { border-left: 3px solid var(--yellow); align-items: center; gap: 8px; }
.join-req-name { font-family: var(--hud); letter-spacing: 0.8px; }
.join-req-time { color: var(--muted); font-size: 11px; font-family: var(--mono); margin-top: 1px; }
.join-req-actions { display: inline-flex; gap: 6px; }
.admin-log { max-height: 220px; overflow: auto; display: grid; gap: 4px; }
.admin-log div { font-family: var(--mono); font-size: 11px; color: var(--muted); background: rgba(0, 0, 0, 0.2); padding: 5px 7px; border-radius: 4px; }
#adminCode { font-family: var(--hud); font-size: 34px; text-align: center; letter-spacing: 8px; color: var(--cyan); }
#qrAdmin { width: 146px; height: 146px; margin: 8px auto; background: #fff; border-radius: 8px; padding: 8px; display: grid; place-items: center; }
.gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.86);
}
.gate-box {
  width: min(440px, 92vw);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #071225;
}
.gate-err { min-height: 18px; color: var(--red); font-family: var(--mono); font-size: 12px; margin-top: 8px; text-align: center; }
@media (max-width: 1040px) { .admin-grid { grid-template-columns: 1fr; } }

body.map-body { width: 100%; height: 100%; overflow: hidden; background: #040b16; }
#mapBase { width: 100%; height: 100%; }
#mapBase .leaflet-tile-pane {
  filter: saturate(1.1) contrast(1.15) brightness(0.8) hue-rotate(195deg);
}
.leaflet-control-container { display: none; }
#countryLayer, #fxCanvas, #networkLayer, #nodeLayer, #hotNodeLayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#countryLayer { z-index: 405; }
#nodeLayer { z-index: 412; }
#fxCanvas { z-index: 416; }
#networkLayer { z-index: 418; }
#hotNodeLayer { z-index: 424; }
#mapCyber {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 255, 0.015) 2px, rgba(0, 255, 255, 0.015) 4px),
    radial-gradient(circle at 50% 20%, rgba(0, 198, 255, 0.15), transparent 45%);
  z-index: 410;
}
.map-end-overlay {
  position: absolute;
  inset: 0;
  z-index: 470;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  pointer-events: none;
  background: rgba(2, 7, 15, 0.34);
}
.map-end-title {
  font-family: var(--hud);
  font-size: clamp(34px, 6.4vw, 92px);
  letter-spacing: 4px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 1), 0 0 18px rgba(0, 0, 0, 0.8);
}
.map-end-sub {
  font-family: var(--hud);
  font-size: clamp(14px, 2vw, 28px);
  color: #e9f7ff;
  text-shadow: 0 1px 0 #000;
}
.map-end-list {
  margin-top: 8px;
  width: min(720px, 84vw);
  background: rgba(3, 9, 18, 0.85);
  border: 1px solid rgba(132, 188, 224, 0.36);
  border-radius: 10px;
  padding: 10px 14px;
  display: grid;
  gap: 4px;
}
.map-end-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: clamp(12px, 1.6vw, 20px);
  color: #e0f1ff;
}
.map-end-row.att { color: #ffd5df; border-left: 3px solid rgba(255, 88, 125, 0.9); padding-left: 8px; }
.map-end-row.def { color: #d8fbff; border-left: 3px solid rgba(104, 240, 255, 0.9); padding-left: 8px; }
.map-end-role { font-family: var(--hud); letter-spacing: 0.7px; }
body.map-ended #mapBase,
body.map-ended #countryLayer,
body.map-ended #fxCanvas,
body.map-ended #networkLayer,
body.map-ended #nodeLayer,
body.map-ended #hotNodeLayer,
body.map-ended #mapCyber,
body.map-ended .map-top,
body.map-ended #mapContrib,
body.map-ended .map-bottom,
body.map-ended #mapQrBox {
  filter: blur(2.8px) saturate(0.86) brightness(0.78);
}
body.map-ended #mapEndOverlay { filter: none; }
.map-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(2, 7, 15, 0.97), rgba(2, 7, 15, 0.15));
  z-index: 430;
  pointer-events: none;
}
.map-title { font-family: var(--hud); letter-spacing: 3px; color: var(--cyan); font-size: 20px; }
.map-phase { font-family: var(--hud); color: var(--yellow); font-size: 10px; letter-spacing: 2px; margin-top: 4px; }
#mapTimer { font-family: var(--hud); color: var(--cyan2); font-size: 28px; letter-spacing: 1px; }
.map-side-events {
  position: absolute;
  right: 14px;
  top: 86px;
  width: min(340px, 38vw);
  max-height: 48vh;
  overflow: hidden;
  z-index: 430;
  pointer-events: none;
  display: grid;
  gap: 6px;
}
.map-event { background: rgba(3, 11, 24, 0.88); border-left: 3px solid var(--cyan); border-radius: 4px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; animation: slide .25s ease; }
.map-event.att { border-left-color: var(--red); }
.map-contrib-row { background: rgba(3, 11, 24, 0.9); border-left: 3px solid rgba(148, 160, 176, 0.75); border-radius: 4px; padding: 7px 9px; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; }
.map-contrib-row.att { border-left-color: var(--red); }
.map-contrib-row.def { border-left-color: var(--cyan); }
.map-contrib-name { color: #d7ebff; }
.map-contrib-score { color: #b7d5f2; }
@keyframes slide { from { transform: translateX(18px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.map-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 430;
  padding: 10px 14px 12px;
  background: linear-gradient(0deg, rgba(2, 7, 15, 0.97), rgba(2, 7, 15, 0.2));
  pointer-events: none;
}
.objective { text-align: center; font-family: var(--hud); letter-spacing: 1.5px; color: var(--yellow); font-size: 11px; margin-bottom: 9px; }
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bar-title { font-family: var(--hud); font-size: clamp(12px, 1.25vw, 19px); letter-spacing: 1.5px; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.bar-title > span:last-child { font-size: clamp(15px, 1.55vw, 25px); letter-spacing: 1.2px; font-weight: 700; }
.bar-track { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar-fill { height: 100%; width: 0; transition: width 0.4s ease; }
.bar-fill.att { background: linear-gradient(90deg, #7d1734, var(--red)); }
.bar-fill.def { background: linear-gradient(90deg, #00638e, var(--cyan)); }
#mapQrBox {
  position: absolute;
  left: 16px;
  top: 84px;
  z-index: 430;
  width: clamp(164px, 18vw, 220px);
  text-align: center;
  padding: 10px;
  pointer-events: none;
}
#mapQrBox.lobby-join-mode {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(300px, 46vw, 520px);
  padding: 18px 16px 14px;
  z-index: 455;
  background: rgba(3, 10, 21, 0.88);
  border: 1px solid rgba(132, 188, 224, 0.45);
  border-radius: 12px;
}
#mapQrLabel { font-family: var(--hud); font-size: 9px; letter-spacing: 1.8px; color: var(--muted); margin-bottom: 7px; }
#mapQrCanvas { width: 120px; height: 120px; margin: 0 auto; background: #fff; border-radius: 8px; padding: 8px; display: grid; place-items: center; }
#mapQrCode { margin-top: 7px; font-family: var(--hud); color: var(--cyan); font-size: 22px; letter-spacing: 5px; }
#mapQrBox.lobby-join-mode #mapQrLabel { font-size: 13px; letter-spacing: 2.5px; margin-bottom: 10px; color: #d8ecff; }
#mapQrBox.lobby-join-mode #mapQrCanvas { width: 212px; height: 212px; padding: 12px; border-radius: 12px; }
#mapQrBox.lobby-join-mode #mapQrCode { font-size: 36px; letter-spacing: 9px; margin-top: 10px; }
.node-dot { position: absolute; transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 10px currentColor; }
.node-dot.target { width: 18px; height: 18px; }
.node-label { position: absolute; transform: translate(-50%, -145%); font-family: var(--hud); font-size: 10px; letter-spacing: 1px; white-space: nowrap; text-shadow: 0 0 10px rgba(1, 3, 8, 0.98), 0 0 2px rgba(1, 3, 8, 1); display: grid; justify-items: center; gap: 1px; z-index: 3; }
.node-label.is-hot { z-index: 12; }
.node-main { font-size: 10px; }
.node-points { font-size: 8px; letter-spacing: 0.8px; color: #d2d8df; background: rgba(3, 8, 18, 0.74); border: 1px solid rgba(148, 160, 176, 0.45); border-radius: 999px; padding: 1px 6px; }
.node-points.points-att { color: #ffd4de; border-color: rgba(255, 98, 132, 0.88); background: rgba(60, 10, 24, 0.82); box-shadow: 0 0 10px rgba(255, 82, 118, 0.36); }
.node-points.points-def { color: #d8fbff; border-color: rgba(122, 246, 255, 0.92); background: rgba(6, 32, 48, 0.82); box-shadow: 0 0 10px rgba(93, 242, 255, 0.36); }
.node-points.points-neutral { color: #d2d8df; border-color: rgba(148, 160, 176, 0.45); background: rgba(3, 8, 18, 0.74); box-shadow: none; }
.node-label.under-attack .node-main {
  color: #fff2ae;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 1), 0 0 10px rgba(255, 232, 140, 0.96), 0 0 20px rgba(255, 206, 88, 0.72), 0 0 3px rgba(0, 0, 0, 1);
  animation: labelAttackGlow 0.56s ease-in-out infinite;
}
.node-label.under-attack .node-points {
  color: #fff8d7;
  background: rgba(52, 33, 3, 0.84);
  border-color: rgba(255, 214, 106, 0.98);
  box-shadow: 0 0 14px rgba(255, 205, 92, 0.64);
  animation: pointsAttackPulse 0.6s ease-in-out infinite;
}
.node-label.under-defense .node-main {
  color: #fff2ae;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 1), 0 0 10px rgba(255, 232, 140, 0.96), 0 0 20px rgba(255, 206, 88, 0.72), 0 0 3px rgba(0, 0, 0, 1);
  animation: labelAttackGlow 0.56s ease-in-out infinite;
}
.node-label.under-defense .node-points {
  color: #fff8d7;
  background: rgba(52, 33, 3, 0.84);
  border-color: rgba(255, 214, 106, 0.98);
  box-shadow: 0 0 14px rgba(255, 205, 92, 0.64);
  animation: pointsAttackPulse 0.6s ease-in-out infinite;
}
.node-dot.hot-att { animation: hotAtt 0.36s steps(2, end) infinite; }
.node-dot.hot-def { animation: hotDef 0.36s steps(2, end) infinite; }
@keyframes hotAtt {
  0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 6px rgba(255, 54, 98, 0.6); }
  50% { transform: translate(-50%, -50%) scale(1.24); box-shadow: 0 0 16px rgba(255, 54, 98, 1); }
  100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 8px rgba(255, 54, 98, 0.8); }
}
@keyframes hotDef {
  0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 6px rgba(39, 236, 255, 0.6); }
  50% { transform: translate(-50%, -50%) scale(1.24); box-shadow: 0 0 16px rgba(39, 236, 255, 1); }
  100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 8px rgba(39, 236, 255, 0.8); }
}
@keyframes labelAttackGlow {
  0% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.14); transform: scale(1.08); }
  100% { filter: brightness(1); transform: scale(1); }
}
@keyframes pointsAttackPulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.09); opacity: 1; }
  100% { transform: scale(1); opacity: 0.92; }
}
.backbone-line { stroke: rgba(73, 132, 178, 0.18); stroke-width: 1.1; fill: none; }
.action-line.att { stroke: rgba(255, 54, 98, 1); stroke-width: 4.6; fill: none; stroke-linecap: round; stroke-dasharray: 10 6; filter: drop-shadow(0 0 10px rgba(255,54,98,0.95)) drop-shadow(0 0 16px rgba(255,90,130,0.58)); animation: electricLinePulse 0.46s linear infinite, electricDash 0.42s linear infinite; }
.action-line.def { stroke: rgba(39, 236, 255, 1); stroke-width: 4.8; fill: none; stroke-linecap: round; stroke-dasharray: 10 6; filter: drop-shadow(0 0 10px rgba(39,236,255,1)) drop-shadow(0 0 16px rgba(109,244,255,0.58)); animation: electricLinePulse 0.46s linear infinite, electricDash 0.42s linear infinite; }
.action-line.tap-att { stroke: rgba(255, 138, 162, 1); stroke-width: 4.2; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(255,138,162,0.95)); }
.action-line.tap-def { stroke: rgba(135, 248, 255, 1); stroke-width: 4; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 12px rgba(135,248,255,1)); }
@keyframes electricLinePulse {
  0% { opacity: 0.72; }
  50% { opacity: 1; }
  100% { opacity: 0.74; }
}
@keyframes electricDash {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -16; }
}
.country-label {
  color: rgba(173, 221, 255, 0.55);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.4px;
  text-shadow: 0 0 8px rgba(2, 7, 15, 0.8);
}

body.client-body {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 230, 255, 0.12), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(255, 52, 99, 0.12), transparent 45%),
    #02070f;
}
body.client-body * { -webkit-user-drag: none; }
body.client-body button,
body.client-body .action,
body.client-body .opt { touch-action: manipulation; }
body.client-body input,
body.client-body select,
body.client-body textarea {
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}
.client-wrap { max-width: 460px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; padding: 20px 16px; }
.hero { text-align: center; margin-top: 30px; margin-bottom: 22px; }
.hero h1 { font-family: var(--hud); font-size: 40px; letter-spacing: 5px; color: var(--cyan); text-shadow: 0 0 25px rgba(0, 230, 255, 0.45); }
.hero p { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; }
.join-box, .panel-box { padding: 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); }
.cta {
  width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(0, 230, 255, 0.75);
  background: rgba(0, 230, 255, 0.13);
  color: var(--cyan2);
  border-radius: 8px;
  padding: 13px;
  font-family: var(--hud);
  letter-spacing: 2px;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
}
.cta-tap {
  margin-top: 4px;
  margin-bottom: 18px;
  border-color: rgba(255, 216, 78, 0.8);
  background: rgba(255, 216, 78, 0.16);
  color: #ffe57b;
}
.cta-tap:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cta-tap.demo-lock {
  border-color: rgba(116, 194, 232, 0.8);
  box-shadow: 0 0 0 1px rgba(116, 194, 232, 0.3), inset 0 0 0 1px rgba(116, 194, 232, 0.28);
}
.err { min-height: 18px; margin-top: 8px; text-align: center; color: var(--red); font-family: var(--mono); font-size: 12px; }
.wait { text-align: center; margin-top: 26px; }
.spinner { width: 48px; height: 48px; margin: 12px auto; border: 2px solid rgba(126, 162, 194, 0.35); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.game-top { padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); margin-bottom: 10px; }
.role-tag { font-family: var(--hud); letter-spacing: 2px; font-size: 10px; }
.objective-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.objective-mobile { flex: 1; min-width: 0; padding: 7px 8px; border-radius: 8px; margin: 0; background: rgba(255, 216, 78, 0.1); border: 1px solid rgba(255, 216, 78, 0.24); color: #ffe8a8; font-size: 12px; line-height: 1.35; }
.mini-tutorial-btn {
  border: 1px solid rgba(118, 196, 236, 0.5);
  background: rgba(8, 24, 40, 0.78);
  color: #cfeaff;
  font-family: var(--hud);
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 999px;
  width: 68px;
  min-height: 38px;
  padding: 0 10px;
  margin-top: 0;
  white-space: nowrap;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.feature-tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 990;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(6, 12, 22, 0.08), rgba(3, 8, 16, 0.18));
}
.feature-tutorial-line { position: absolute; inset: 0; pointer-events: none; }
.feature-tutorial-line line {
  stroke: rgba(110, 238, 255, 0.9);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
  filter: drop-shadow(0 0 6px rgba(110, 238, 255, 0.55));
}
.feature-tutorial-line polyline {
  fill: none;
  stroke: rgba(110, 238, 255, 0.9);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
  filter: drop-shadow(0 0 6px rgba(110, 238, 255, 0.55));
}
.feature-tutorial-tip {
  position: fixed;
  width: 280px;
  border: 1px solid rgba(128, 197, 239, 0.62);
  border-radius: 10px;
  background: rgba(5, 13, 24, 0.92);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.42);
  padding: 10px;
  pointer-events: auto;
}
.feature-tutorial-title { font-family: var(--hud); letter-spacing: 1.5px; font-size: 11px; color: #ffe28e; margin-bottom: 4px; }
.feature-tutorial-text { font-family: var(--mono); font-size: 12px; line-height: 1.35; color: #d6e8f8; }
.feature-tutorial-controls { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.feature-tutorial-nav { display: inline-flex; align-items: center; gap: 6px; }
.feature-tutorial-control {
  border: 1px solid rgba(126, 197, 238, 0.55);
  background: rgba(8, 26, 44, 0.84);
  color: #d3ecff;
  border-radius: 6px;
  min-width: 34px;
  height: 30px;
  font-family: var(--hud);
  font-size: 11px;
}
#featureTutorialIndex { font-family: var(--mono); color: #bfe3ff; font-size: 12px; margin-left: auto; margin-right: 8px; }
.feature-tutorial-control.close { min-width: 38px; }
.feature-focus {
  position: relative;
  z-index: 985;
  box-shadow: 0 0 0 2px rgba(110, 238, 255, 0.95), 0 0 14px rgba(110, 238, 255, 0.55);
  border-radius: 8px;
}
@media (max-width: 900px) {
  .feature-tutorial-tip { border-radius: 12px; padding: 11px; }
  .feature-tutorial-title { font-size: 12px; }
  .feature-tutorial-text { font-size: 13px; }
  .feature-focus { box-shadow: 0 0 0 2px rgba(110, 238, 255, 0.9), 0 0 12px rgba(110, 238, 255, 0.5); }
}
.point-ghost {
  position: fixed;
  z-index: 980;
  pointer-events: none;
  font-family: var(--hud);
  letter-spacing: 1.2px;
  font-size: clamp(14px, 1.9vw, 24px);
  color: #d7ecff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.65);
  opacity: 0;
  animation: pointGhostFloat 1.45s ease-out forwards;
}
.point-ghost.quick { color: #ffe28e; }
.point-ghost.quiz-ok { color: #aaf7ff; }
.point-ghost.quiz-bad { color: #ffb3c4; }
@keyframes pointGhostFloat {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.86); }
  15% { opacity: 0.92; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1.04); }
}
.actions { display: grid; gap: 8px; }
.target-pick { margin-bottom: 10px; }
.demo-role-switch {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 981;
  display: flex;
  align-items: center;
  gap: 6px;
}
.demo-role-btn {
  border: 1px solid rgba(126, 197, 238, 0.5);
  background: rgba(8, 20, 36, 0.85);
  color: #d3ebff;
  font-family: var(--hud);
  font-size: 9px;
  letter-spacing: 1px;
  border-radius: 999px;
  padding: 7px 10px;
}
.demo-role-btn.attacker.active { border-color: rgba(255, 102, 136, 0.85); color: #ffc2d1; }
.demo-role-btn.defender.active { border-color: rgba(102, 240, 255, 0.85); color: #ccf8ff; }
.cta-tap.demo-press {
  transform: scale(0.98);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 0 14px rgba(255, 226, 142, 0.5);
}
@media (max-width: 900px) {
  .demo-role-switch { bottom: 10px; }
  .demo-role-btn { font-size: 8px; padding: 6px 8px; }
}
.action {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 11px;
  cursor: pointer;
  transition: 0.15s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.action:hover { border-color: var(--cyan2); }
.action.att:hover { border-color: rgba(255, 52, 99, 0.75); }
.action.disabled { opacity: 0.45; cursor: not-allowed; }
.action.demo-lock { position: relative; }
.action.demo-lock::after {
  content: "🔒";
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  opacity: 0.72;
  filter: drop-shadow(0 0 5px rgba(116, 194, 232, 0.45));
  pointer-events: none;
}
.action.demo-blocked-flash {
  border-color: rgba(116, 194, 232, 0.95);
  box-shadow: 0 0 0 1px rgba(116, 194, 232, 0.42), 0 0 14px rgba(104, 207, 255, 0.5);
  animation: demoBlockedPulse 0.35s ease;
}
.act-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.act-name { font-family: var(--hud); font-size: 11px; letter-spacing: 1px; }
.act-desc { color: var(--muted); font-size: 13px; line-height: 1.3; }
.act-badge { border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; font-family: var(--hud); font-size: 9px; white-space: nowrap; }
.quiz-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); z-index: 999; display: none; align-items: center; justify-content: center; padding: 16px; }
.quiz-box { width: 100%; max-width: 460px; padding: 16px; border-radius: 10px; border: 1px solid var(--border); background: #061225; }
.quiz-q { margin: 13px 0; font-size: 18px; line-height: 1.3; }
.opt { width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 8px; padding: 11px; background: rgba(0, 0, 0, 0.23); color: var(--text); margin-bottom: 8px; cursor: pointer; }
.opt:hover { border-color: var(--cyan2); color: var(--cyan2); }
.opt.ok { border-color: rgba(0, 255, 154, 0.8); color: var(--green); }
.opt.bad { border-color: rgba(255, 52, 99, 0.8); color: var(--red); }
@keyframes demoBlockedPulse {
  0% { transform: scale(1); }
  40% { transform: scale(0.985); }
  100% { transform: scale(1); }
}
#toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  min-width: 220px;
  max-width: 90vw;
  text-align: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(3, 11, 24, 0.96);
  display: none;
}
.end-title { font-family: var(--hud); letter-spacing: 3px; font-size: 28px; margin: 14px 0 8px; text-align: center; }
