/* ============================================================
   X-TEAM GEN 2.0 — TREASURE HUNT STYLES
   TACTICAL SCHEMATIC GAME MAP & PLAYABLE GAME DEMO
   100% LOCAL — ZERO EXTERNAL DEPENDENCIES
   ============================================================ */

:root {
  --bg: #07101d;
  --panel: #0c1929;
  --card: #10233a;
  --line: #29435e;
  --line-light: #3a5b7e;
  --text: #edf6ff;
  --muted: #9cafc5;
  --accent: #38bdf8;
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #fb7185;
  --purple: #a78bfa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #06101c, #091523 55%, #07101b);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

button {
  font: inherit;
}

.app {
  max-width: 1520px;
  margin: auto;
  padding: 20px;
}

/* Header Section */
.header {
  text-align: center;
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  border: 1px solid #2d5270;
  background: #0c2034;
  color: #9cddff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.3px;
}

.sub-badge {
  display: inline-block;
  border: 1px solid #2d5270;
  background: rgba(12, 32, 52, 0.6);
  color: #38bdf8;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

h1 {
  font-size: clamp(28px, 3.8vw, 50px);
  letter-spacing: -2px;
  margin: 11px 0 6px;
}

.header p {
  max-width: 850px;
  margin: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.stat {
  background: #0c1b2c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 11px;
  color: var(--muted);
}

.stat b {
  color: var(--text);
  font-size: 16px;
  margin-right: 4px;
}

/* Common Panel */
.panel {
  background: rgba(10, 23, 39, 0.94);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-title h2 {
  font-size: 15px;
  margin: 0;
}

.panel-title span {
  font-size: 10px;
  color: var(--muted);
}

/* ============================================================
   SECTION 1: GAMEPLAY FLOW (30-60s Overview)
   ============================================================ */
.flow-panel {
  padding: 16px 20px;
  border-color: #24415e;
  background: linear-gradient(180deg, rgba(12, 25, 42, 0.95), rgba(9, 20, 34, 0.9));
}

.flow-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid rgba(41, 67, 94, 0.5);
  padding-bottom: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.flow-header h2 {
  font-size: 15px;
  margin: 0;
  letter-spacing: -0.3px;
}

.flow-time {
  font-size: 10.5px;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  padding: 3px 9px;
  font-weight: 700;
}

/* Pipeline Stepper */
.flow-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
}

.flow-step {
  flex: 1 1 0;
  min-width: 95px;
  background: #0d1e32;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 7px;
  text-align: center;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.flow-step:hover {
  transform: translateY(-2px);
  border-color: #4b7f9d;
  background: #112842;
}

.flow-step.highlight {
  background: linear-gradient(135deg, #1b3325, #0d261e);
  border-color: #34d399;
}

.flow-num {
  display: block;
  font-size: 9px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.flow-step.highlight .flow-num {
  color: var(--green);
}

.flow-step-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
}

.flow-desc {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.3;
}

.flow-arrow {
  color: #3d607e;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
  user-select: none;
}

/* Flow Details Subgrid: 5 Powers & Mechanics */
.flow-details-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(41, 67, 94, 0.4);
}

.flow-detail-box {
  background: #091727;
  border: 1px solid #1e354d;
  border-radius: 12px;
  padding: 10px 12px;
}

.detail-label {
  font-size: 9.5px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.power-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.power-pill {
  background: #0d2137;
  border: 1px solid #234768;
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 9.5px;
  color: #c9e0f5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.power-pill b {
  color: #edf6ff;
  font-weight: 800;
}

.rules-summary-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rule-mini-item {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}

.rule-mini-item b {
  color: #dbeaff;
}

/* ============================================================
   SECTION 2: PLAYABLE GAME DEMO & PLAYER HUD
   ============================================================ */

/* Player Command Bar (HUD) */
.player-hud-panel {
  background: linear-gradient(90deg, #0c2035, #0f2a47 50%, #0c2035);
  border: 1.5px solid #2c5983;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.hud-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.hud-team-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-team-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  color: #06111c;
}

.hud-team-name {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
}

.hud-team-sub {
  font-size: 10px;
  color: var(--muted);
}

.hud-location-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #091728;
  border: 1px solid #1f4265;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
}

.hud-timer-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 900;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
  padding: 4px 10px;
}

.hud-btn-switch {
  background: #11263d;
  border: 1px solid #32587f;
  color: #edf6ff;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.hud-btn-switch:hover {
  background: #1b3d63;
  border-color: #38bdf8;
}

/* Key Slots & Inventory Bar */
.hud-inventory-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.keys-slot-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inventory-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.key-slots {
  display: flex;
  gap: 6px;
}

.key-slot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #071524;
  border: 1.5px dashed #244365;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #3b5877;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.key-slot.acquired {
  background: linear-gradient(135deg, #38270a, #1a1505);
  border: 1.5px solid #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
  transform: scale(1.06);
}

.resources-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.res-chip {
  background: #0a1c30;
  border: 1px solid #23476d;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #edf6ff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.res-chip.token-chip {
  border-color: #fb7185;
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
}

.res-chip.hints-chip {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  cursor: pointer;
  transition: 0.15s;
}

.res-chip.hints-chip:hover {
  background: rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

/* Playable Area Grid */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 380px;
  gap: 16px;
  margin-bottom: 16px;
}

/* Tactical Map Container */
.game-map-container {
  position: relative;
  width: 100%;
  background: #050f1b;
  border: 1px solid #1f3d5c;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.55), 0 8px 30px rgba(0, 0, 0, 0.4);
}

#gameMapSvg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  min-height: 480px;
  user-select: none;
}

/* Tactical SVG Elements */
.map-field-line {
  stroke: #17324d;
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  fill: none;
}

.map-field-title {
  fill: #224364;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-anchor: middle;
}

.map-path {
  stroke: #18334e;
  stroke-width: 2.2;
  stroke-dasharray: 5 4;
  fill: none;
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.map-path.highlight-path {
  stroke: #31648f;
  stroke-width: 2.8;
}

.map-active-route {
  fill: none;
  stroke-width: 3.5;
  stroke-dasharray: 8 5;
  animation: routeDash 1s linear infinite;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
}

@keyframes routeDash {
  to {
    stroke-dashoffset: -26;
  }
}

/* SVG Nodes */
.map-node {
  cursor: pointer;
  transition: transform 0.18s ease;
}

.map-node:hover {
  filter: brightness(1.25);
}

.map-node.reachable {
  filter: drop-shadow(0 0 8px #38bdf8);
}

.node-rect {
  transition: stroke 0.2s, fill 0.2s;
}

.node-title {
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  fill: #edf6ff;
  text-anchor: middle;
  pointer-events: none;
}

.node-sub {
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  fill: #7da5c9;
  text-anchor: middle;
  pointer-events: none;
}

/* Team SVG Markers */
.map-team-token {
  cursor: pointer;
  transition: transform 0.25s ease;
}

.map-team-token circle.team-circle {
  stroke: #ffffff;
  stroke-width: 2.5;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.6));
  transition: r 0.2s ease, stroke 0.2s ease;
}

.map-team-token.player-token circle.team-circle {
  stroke: #38bdf8;
  stroke-width: 3.5;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.8));
}

.map-team-token text.team-label {
  fill: #06111c;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.map-team-token text.player-badge-text {
  fill: #38bdf8;
  font-size: 8px;
  font-weight: 900;
  text-anchor: middle;
}

.team-ring-pulse {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 2;
  animation: pulseRing 1.5s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    r: 16;
    opacity: 0.9;
  }
  100% {
    r: 30;
    opacity: 0;
  }
}

/* Player Action Bar (Dưới Map) */
.player-actions-panel {
  margin-top: 12px;
  background: #091a2d;
  border: 1px solid #204163;
  border-radius: 14px;
  padding: 12px 14px;
}

.actions-title {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.actions-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #355f88;
  background: #0f2742;
  color: #e9f6ff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.action-btn:hover:not(:disabled) {
  background: #183e66;
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.action-btn.primary-btn {
  background: linear-gradient(135deg, #134669, #0d324d);
  border-color: #38bdf8;
}

.action-btn.battle-btn {
  background: linear-gradient(135deg, #441826, #2d1019);
  border-color: #fb7185;
  color: #ffd2dc;
}

.action-btn.battle-btn:hover:not(:disabled) {
  border-color: #ff8598;
  box-shadow: 0 4px 14px rgba(251, 113, 133, 0.3);
}

.action-btn.final-btn {
  background: linear-gradient(135deg, #42300b, #2b1f07);
  border-color: #fbbf24;
  color: #fef08a;
  animation: finalGlow 1.8s ease-in-out infinite alternate;
}

@keyframes finalGlow {
  from {
    box-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
  }
  to {
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.7);
  }
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.6);
  border-color: #1f3750;
  background: #0a1928;
}

/* Interactive Map Tooltip */
.map-tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  background: rgba(10, 24, 40, 0.96);
  border: 1px solid #38bdf8;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  color: #edf6ff;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -125%);
  transition: opacity 0.15s ease;
  z-index: 30;
  max-width: 220px;
  text-align: center;
}

.map-tooltip.active {
  opacity: 1;
}

.map-tooltip-title {
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 3px;
  color: #38bdf8;
}

.map-tooltip-sub {
  color: #9cafc5;
  font-size: 10px;
  line-height: 1.4;
}

/* Legend */
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  align-items: center;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-badge {
  font-size: 12px;
}

/* Right Command Sidebar */
.current-location-card {
  background: #09192c;
  border: 1px solid #234568;
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 12px;
}

.loc-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.loc-card-header h3 {
  margin: 0;
  font-size: 13.5px;
  color: #ffffff;
}

.loc-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 8px;
}

.loc-teams-present {
  font-size: 10px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 6px;
  padding: 4px 8px;
}

/* Rivals Leaderboard */
.team-list {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.team-card {
  border: 1px solid var(--line);
  background: #0d1c2e;
  border-radius: 11px;
  padding: 9px 11px;
  transition: 0.15s;
}

.team-card.is-player {
  border-color: #38bdf8;
  background: #102a45;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.team-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.team-name {
  font-weight: 800;
  font-size: 11.5px;
}

.team-state {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
}

.bar {
  height: 4px;
  background: #1b2d42;
  border-radius: 8px;
  margin-top: 6px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
}

.team-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 9px;
  color: var(--muted);
}

/* Event Log */
.log {
  height: 200px;
  overflow: auto;
  background: #07131f;
  border: 1px solid #20364c;
  border-radius: 12px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  line-height: 1.55;
}

.log div {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 3px 0;
  color: #b9c9da;
}

.log .good {
  color: #8de7bf;
}

.log .warn {
  color: #ffd780;
}

.log .battle {
  color: #ff9daf;
}

.log .final {
  color: #aeb5ff;
}

/* ============================================================
   INTERACTIVE ACTION MODALS
   ============================================================ */
.game-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 18, 0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.game-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.game-modal {
  background: #0c1f33;
  border: 1.5px solid #28547f;
  border-radius: 20px;
  max-width: 580px;
  width: 100%;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.game-modal-backdrop.open .game-modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid #1e3f60;
  padding-bottom: 10px;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #edf6ff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e1;
}

.modal-options-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.modal-opt-card {
  border: 1px solid #23476d;
  background: #091728;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-opt-card:hover {
  border-color: #38bdf8;
  background: #112944;
  transform: translateX(4px);
}

.opt-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.opt-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Team Selection Cards */
.team-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.team-pick-card {
  border: 1.5px solid #244769;
  background: #08192a;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.18s;
}

.team-pick-card:hover,
.team-pick-card.active {
  border-color: #38bdf8;
  background: #102e4d;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.2);
}

.team-pick-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #06111c;
  font-size: 13px;
  border: 2px solid #ffffff;
}

/* Hint Backpack Cards */
.hint-item-card {
  background: #081626;
  border: 1px solid #234b71;
  border-left: 3px solid #38bdf8;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 11.5px;
  line-height: 1.5;
}

.hint-item-title {
  font-weight: 800;
  color: #7dd3fc;
  margin-bottom: 3px;
}

/* Mini Game Elements */
.mini-game-box {
  background: #071524;
  border: 1px solid #1d3d5f;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin-top: 10px;
}

.reflex-target-btn {
  width: 140px;
  height: 60px;
  border-radius: 12px;
  background: #ef4444;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  margin: 16px auto;
  display: grid;
  place-items: center;
  transition: 0.1s;
}

.reflex-target-btn.ready {
  background: #10b981;
  box-shadow: 0 0 20px #10b981;
  animation: pulseButton 0.8s infinite;
}

@keyframes pulseButton {
  50% {
    transform: scale(1.05);
  }
}

/* Victory Screen */
.victory-box {
  text-align: center;
  padding: 20px 10px;
}

.victory-icon {
  font-size: 54px;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  to {
    transform: translateY(-8px);
  }
}

.victory-title {
  font-size: 24px;
  font-weight: 900;
  color: #fbbf24;
  margin: 10px 0 6px;
  letter-spacing: -0.5px;
}

/* ============================================================
   SECTION 3: WHY THIS IDEA? (RECRUITMENT OBJECTIVES)
   ============================================================ */
.why-panel {
  padding: 22px;
  border-color: #274563;
  background: linear-gradient(180deg, rgba(12, 26, 43, 0.95), rgba(7, 18, 31, 0.95));
}

.why-header {
  text-align: center;
  margin-bottom: 20px;
}

.why-header h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 10px 0 6px;
}

.why-lead {
  max-width: 860px;
  margin: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.why-lead b {
  color: #7dd3fc;
}

/* 5 Cards Grid */
.why-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.why-card {
  background: #0c1c2e;
  border: 1px solid #233e59;
  border-radius: 14px;
  padding: 15px 12px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.why-card:hover {
  transform: translateY(-3px);
  border-color: #4f87ae;
  background: #10263d;
}

.why-card.highlight-card {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #102944, #0b1f34);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.12);
}

.why-icon {
  font-size: 22px;
  margin-bottom: 8px;
}

.why-card h3 {
  font-size: 13px;
  margin: 0 0 4px;
  color: var(--text);
  font-weight: 800;
}

.why-desc {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}

.why-detail {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
  flex-grow: 1;
}

.why-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(41, 67, 94, 0.45);
  border: 1px solid #294560;
  color: #b1cadf;
  text-align: center;
}

.why-tag.highlight-tag {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.4);
  color: #9fe2ff;
}

/* Principle Callout Box */
.principle-box {
  background: rgba(18, 38, 62, 0.65);
  border: 1px solid #335d84;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
}

.principle-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.principle-title h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #fbd38d;
}

.principle-text {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #d8e5f3;
}

.principle-text b {
  color: #ffffff;
}

.principle-text i {
  color: #94a9bf;
}

.criteria-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(41, 67, 94, 0.5);
}

.criteria-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.criteria-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.criteria-tags span {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: #091726;
  border: 1px solid #233f5b;
  color: #93c5fd;
}

/* Key Message Card */
.key-message-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #102a46 0%, #0d2035 100%);
  border: 1px solid #38bdf8;
  border-radius: 14px;
  padding: 14px 20px;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.1);
}

.quote-mark {
  font-size: 40px;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1;
  font-family: Georgia, serif;
}

.quote-content {
  flex: 1;
}

.quote-text {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.quote-sub {
  font-size: 10px;
  color: #7dd3fc;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1200px) {
  .why-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1050px) {
  .grid {
    grid-template-columns: 1fr;
  }
  #gameMapSvg {
    max-height: 540px;
  }
  .flow-details-grid {
    grid-template-columns: 1fr;
  }
  .why-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .app {
    padding: 10px;
  }
  .stats {
    justify-content: flex-start;
  }
  #gameMapSvg {
    max-height: 460px;
  }
  .actions-buttons-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hud-top-row,
  .hud-inventory-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .why-cards-grid {
    grid-template-columns: 1fr;
  }
  .key-message-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
