/* ════════════════════════════════════════════════════════════════════════
   BOEKEY: MISSION PUTT — Bluerydge Mission Systems
   Neon sci-fi UI styling
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-0: #05080f;
  --bg-1: #070b18;
  --bg-2: #0a1228;
  --panel: rgba(10, 18, 38, 0.72);
  --panel-solid: #0a1730;

  --cyan: #35c8ff;
  --cyan-bright: #7fe2ff;
  --cyan-deep: #1c8fd6;
  --pink: #ff2e74;
  --pink-bright: #ff6aa0;
  --pink-deep: #c81d5a;

  --text: #dCEBFF;
  --text-dim: #8aa6c8;
  --text-faint: #5b7196;

  --line: rgba(63, 156, 222, 0.28);
  --line-bright: rgba(111, 220, 255, 0.6);

  --glow-cyan: 0 0 18px rgba(53, 200, 255, 0.55);
  --glow-pink: 0 0 18px rgba(255, 46, 116, 0.5);

  --font-title: "Orbitron", system-ui, sans-serif;
  --font-ui: "Rajdhani", system-ui, sans-serif;
  --font-tech: "Chakra Petch", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body { position: fixed; inset: 0; }

.c-cyan { color: var(--cyan); }
.c-pink { color: var(--pink); }

/* ───────────────────────── Boot screen ───────────────────────── */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 50% 40%, #0b1630 0%, #05080f 70%);
  transition: opacity 0.6s ease;
}
.boot.hide { opacity: 0; pointer-events: none; }
.boot-logo { width: 92px; height: 92px; color: var(--cyan); filter: drop-shadow(var(--glow-cyan)); animation: pulse 2s ease-in-out infinite; }
.boot-title {
  font-family: var(--font-title); font-weight: 900; font-size: 56px; letter-spacing: 4px;
  background: linear-gradient(180deg, var(--cyan-bright), var(--cyan-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: skewX(-7deg); filter: drop-shadow(0 0 24px rgba(53,200,255,.45));
}
.boot-sub { font-family: var(--font-tech); letter-spacing: 10px; color: var(--text-dim); font-size: 15px; margin-top: -6px; }
.boot-bar { width: 240px; height: 4px; border-radius: 4px; background: rgba(53,200,255,.12); overflow: hidden; margin-top: 12px; }
.boot-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--pink)); animation: boot-load 1.6s ease forwards; }
.boot-status { font-family: var(--font-tech); font-size: 12px; letter-spacing: 2px; color: var(--text-faint); }
@keyframes boot-load { from { width: 0; } to { width: 100%; } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity:.85; } 50% { transform: scale(1.06); opacity:1; } }

/* ───────────────────────── App / screen system ───────────────────────── */
.app { position: fixed; inset: 0; }
.screen {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.35s ease;
}
.screen.is-active { opacity: 1; visibility: visible; pointer-events: auto; }

/* ════════════════════════════════════════════════════════════════════════
   MAIN MENU
   ════════════════════════════════════════════════════════════════════════ */
.screen-menu { background: var(--bg-0); }
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,8,15,.94) 0%, rgba(5,8,15,.72) 26%, rgba(5,8,15,0) 52%),
    radial-gradient(120% 100% at 50% 120%, rgba(5,8,15,.85) 0%, rgba(5,8,15,0) 55%),
    linear-gradient(0deg, rgba(5,8,15,.9) 0%, rgba(5,8,15,0) 22%);
}

.menu-overlay {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: min(560px, 46vw);
  padding: 34px 34px 0 46px;
  display: flex; flex-direction: column;
  z-index: 3;
}

/* Brand */
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 48px; height: 48px; color: var(--cyan); filter: drop-shadow(var(--glow-cyan)); }
.brand-logo .i-logo, .brand-logo path { }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-title); font-weight: 700; font-size: 22px; letter-spacing: 3px; color: #eaf4ff; }
.brand-tag { font-family: var(--font-tech); font-weight: 500; font-size: 11px; letter-spacing: 6px; color: var(--cyan); margin-top: 4px; }

/* Title */
.title-block { margin-top: 30px; }
.game-title {
  position: relative;
  font-family: var(--font-title); font-weight: 900;
  font-size: clamp(64px, 9vw, 134px); line-height: .9; letter-spacing: 1px;
  transform: skewX(-8deg);
  background: linear-gradient(176deg, #f0fbff 2%, #8fe3ff 26%, var(--cyan) 52%, #2188cf 84%, #155f97 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(130,215,255,.22);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)) drop-shadow(0 6px 30px rgba(53,200,255,.55));
  animation: title-pulse 4s ease-in-out infinite;
}
@keyframes title-pulse {
  0%, 100% { filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)) drop-shadow(0 6px 30px rgba(53,200,255,.5)); }
  50% { filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)) drop-shadow(0 6px 42px rgba(53,200,255,.78)); }
}
.game-subtitle {
  font-family: var(--font-tech); font-weight: 700;
  font-size: clamp(20px, 2.6vw, 34px); letter-spacing: clamp(6px, 1.2vw, 16px);
  margin-top: 6px; margin-left: 6px; transform: skewX(-6deg);
}
.game-subtitle span { color: var(--cyan-bright); }
.game-subtitle em { color: var(--pink); font-style: italic; }

.tagline {
  display: flex; align-items: center; gap: 9px;
  margin-top: 26px; font-family: var(--font-ui); font-weight: 500;
  font-size: clamp(15px, 1.5vw, 20px); color: #c4d7ee; letter-spacing: .5px;
}
.tagline b { font-weight: 700; }
.tagline-flag { width: 22px; height: 22px; color: var(--cyan); flex: none; }

/* Menu buttons */
.main-menu { display: flex; flex-direction: column; gap: 13px; margin-top: 34px; max-width: 470px; }
.menu-btn {
  position: relative;
  display: grid; grid-template-columns: 58px 1fr 26px; align-items: center;
  height: 60px; padding: 0; border: none; cursor: pointer;
  background: linear-gradient(100deg, rgba(12,26,52,.86), rgba(8,16,34,.72));
  color: var(--text);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  font-family: var(--font-tech);
  transition: transform .14s ease, background .2s ease, box-shadow .2s ease;
  outline: 1px solid var(--line);
  outline-offset: -1px;
}
.menu-btn::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cyan); box-shadow: var(--glow-cyan); opacity: .5;
}
.menu-btn:hover { transform: translateX(6px); background: linear-gradient(100deg, rgba(18,38,72,.95), rgba(10,22,46,.82)); box-shadow: -2px 0 22px rgba(53,200,255,.18); }
.menu-btn:hover::before { opacity: 1; }
.menu-btn:active { transform: translateX(3px) scale(.995); }
.menu-btn-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-left: 9px;
  border: 1px solid var(--line-bright); border-radius: 8px; color: var(--cyan);
  background: rgba(53,200,255,.08);
}
.menu-btn-icon svg { width: 22px; height: 22px; }
.menu-btn-label { font-weight: 700; font-size: 19px; letter-spacing: 3px; text-align: left; }
.menu-btn-chevron { width: 22px; height: 22px; color: var(--pink); margin-right: 8px; opacity: .9; }

.menu-btn.is-primary {
  height: 70px;
  background: linear-gradient(100deg, rgba(20,52,86,.95), rgba(10,28,56,.85));
  outline-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(53,200,255,.35), -3px 0 30px rgba(53,200,255,.22), inset 0 0 30px rgba(53,200,255,.08);
}
.menu-btn.is-primary::before { opacity: 1; width: 4px; }
.menu-btn.is-primary .menu-btn-icon { background: var(--cyan); color: #04111f; border-color: var(--cyan-bright); box-shadow: var(--glow-cyan); }
.menu-btn.is-primary .menu-btn-label { font-size: 22px; color: #f2faff; }
.menu-btn.is-primary .menu-btn-chevron { color: var(--cyan-bright); }

/* ───────────────────────── HUD bar ───────────────────────── */
.hud-bar {
  position: absolute; left: 22px; right: 22px; bottom: 18px; z-index: 4;
  height: 84px; padding: 0 22px;
  display: grid; grid-template-columns: minmax(280px, 1.4fr) auto auto; align-items: center; gap: 26px;
  background: linear-gradient(180deg, rgba(8,15,32,.6), rgba(8,15,32,.86));
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.hud-player { display: flex; align-items: center; gap: 16px; }
.hud-badge {
  width: 50px; height: 50px; flex: none; display: grid; place-items: center;
  color: var(--pink);
  filter: drop-shadow(var(--glow-pink));
}
.hud-badge svg { width: 46px; height: 46px; }
.hud-player-info { display: flex; flex-direction: column; line-height: 1.1; }
.hud-player-name { font-family: var(--font-title); font-weight: 700; font-size: 17px; letter-spacing: 2px; }
.hud-player-rank { font-family: var(--font-tech); font-size: 11px; letter-spacing: 3px; color: var(--cyan); margin-top: 3px; }
.hud-level {
  display: grid; place-items: center; width: 34px; height: 26px;
  font-family: var(--font-tech); font-weight: 700; font-size: 15px; color: #eaf4ff;
  border: 1px solid var(--line-bright); border-radius: 6px; background: rgba(53,200,255,.08);
}
.hud-xp { display: flex; flex-direction: column; gap: 5px; min-width: 180px; flex: 1; }
.hud-xp-bar { height: 7px; border-radius: 6px; background: rgba(53,200,255,.12); overflow: hidden; }
.hud-xp-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--cyan), var(--pink)); box-shadow: 0 0 12px rgba(53,200,255,.4); }
.hud-xp-text { font-family: var(--font-tech); font-size: 11px; color: var(--text-faint); letter-spacing: 1px; }
.hud-xp-text b { color: var(--text-dim); }

.hud-stats { display: flex; gap: 28px; padding: 0 6px; }
.hud-stat { display: flex; align-items: center; gap: 10px; }
.hud-stat-icon { width: 26px; height: 26px; }
.hud-stat div { display: flex; flex-direction: column; line-height: 1; }
.hud-stat b { font-family: var(--font-title); font-weight: 700; font-size: 21px; color: #eef6ff; }
.hud-stat span { font-family: var(--font-tech); font-size: 10px; letter-spacing: 2px; color: var(--text-faint); margin-top: 4px; }

.hud-actions { display: flex; gap: 10px; }
.hud-icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  color: var(--cyan); background: rgba(53,200,255,.06);
  border: 1px solid var(--line); border-radius: 10px;
  transition: all .16s ease;
}
.hud-icon-btn svg { width: 22px; height: 22px; }
.hud-icon-btn:hover { background: rgba(53,200,255,.16); border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--glow-cyan); }

.version { position: absolute; right: 26px; bottom: 2px; font-family: var(--font-tech); font-size: 11px; color: var(--text-faint); letter-spacing: 2px; z-index: 5; }

/* ════════════════════════════════════════════════════════════════════════
   SUB SCREENS (shared)
   ════════════════════════════════════════════════════════════════════════ */
.screen-sub { background: radial-gradient(120% 90% at 70% -10%, #0c1a38 0%, #05080f 60%); overflow: hidden; }
.sub-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(53,200,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,200,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 80% at 50% 30%, #000 30%, transparent 75%);
}
.sub-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 40px 0;
}
.sub-header-spacer { width: 120px; }
.sub-title {
  font-family: var(--font-title); font-weight: 700; font-size: clamp(22px, 3vw, 36px);
  letter-spacing: 6px; color: #eaf4ff; transform: skewX(-5deg);
}
.sub-title b { font-weight: 900; }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-tech); font-weight: 700; font-size: 14px; letter-spacing: 2px;
  color: var(--cyan); padding: 10px 18px;
  background: rgba(53,200,255,.06); border: 1px solid var(--line); border-radius: 9px;
  transition: all .16s ease; min-width: 120px; justify-content: center;
}
.ghost-btn svg { width: 18px; height: 18px; }
.ghost-btn:hover { background: rgba(53,200,255,.16); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.ghost-btn.small { min-width: auto; padding: 9px 11px; }
.ghost-btn.danger { color: var(--pink); border-color: rgba(255,46,116,.3); background: rgba(255,46,116,.06); }
.ghost-btn.danger:hover { background: rgba(255,46,116,.16); border-color: var(--pink); box-shadow: var(--glow-pink); }

.cta-btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--font-tech); font-weight: 700; font-size: 17px; letter-spacing: 3px;
  color: #04121f; padding: 15px 30px;
  background: linear-gradient(100deg, var(--cyan), var(--cyan-deep));
  border: none; border-radius: 11px;
  box-shadow: var(--glow-cyan); transition: all .16s ease;
}
.cta-btn svg { width: 20px; height: 20px; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(53,200,255,.5); }
.cta-btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.5); }
.cta-btn.ghost {
  color: var(--cyan); background: rgba(53,200,255,.06);
  border: 1px solid var(--line); box-shadow: none;
}
.cta-btn.ghost:hover { background: rgba(53,200,255,.16); border-color: var(--cyan); box-shadow: var(--glow-cyan); }

/* ───────────────────────── Character select ───────────────────────── */
.char-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding: 28px 40px; max-width: 1200px; margin: 0 auto; width: 100%;
  flex: 1;
}
.char-card {
  position: relative; cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 18px 20px;
  background: linear-gradient(180deg, rgba(12,24,48,.8), rgba(8,15,32,.7));
  border: 1px solid var(--line); border-radius: 16px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.char-card:hover { transform: translateY(-6px); border-color: var(--line-bright); }
.char-card.selected { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 10px 40px rgba(53,200,255,.25); }
.char-card.selected::after {
  content: "SELECTED"; position: absolute; top: 12px; right: -32px; transform: rotate(45deg);
  background: var(--cyan); color: #04121f; font-family: var(--font-tech); font-weight: 700;
  font-size: 10px; letter-spacing: 2px; padding: 4px 36px;
}
.char-avatar {
  width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center;
  margin-bottom: 16px; position: relative;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.12), rgba(0,0,0,.2));
  border: 2px solid var(--char-color, var(--cyan));
  box-shadow: 0 0 26px -4px var(--char-color, var(--cyan)), inset 0 0 24px rgba(0,0,0,.4);
}
.char-avatar svg { width: 100%; height: 100%; }
.char-name { font-family: var(--font-title); font-weight: 700; font-size: 18px; letter-spacing: 1px; text-align: center; color: #eef6ff; }
.char-role { font-family: var(--font-tech); font-size: 11px; letter-spacing: 2px; color: var(--char-color, var(--cyan)); margin-top: 5px; text-align: center; }
.char-stats { width: 100%; margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.char-stat { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 8px; }
.char-stat span { font-family: var(--font-tech); font-size: 10px; letter-spacing: 1px; color: var(--text-faint); }
.char-stat-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.char-stat-bar i { display: block; height: 100%; border-radius: 4px; background: var(--char-color, var(--cyan)); }
.char-ability {
  margin-top: 14px; width: 100%; padding: 10px 12px; text-align: left;
  border-left: 3px solid var(--char-color, var(--cyan));
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,0));
  border-radius: 4px;
}
.char-ability b { display: block; font-family: var(--font-tech); font-weight: 700; font-size: 12px; letter-spacing: 1.5px; color: var(--char-color, var(--cyan)); }
.char-ability span { display: block; font-family: var(--font-ui); font-size: 11.5px; line-height: 1.35; color: var(--text-dim); margin-top: 3px; }

.sub-footer {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px 30px; gap: 20px;
}
.char-selected-info { font-family: var(--font-ui); color: var(--text-dim); font-size: 15px; max-width: 60%; }
.char-selected-info b { color: var(--cyan); }

/* ───────────────────────── Course select ───────────────────────── */
.course-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px;
  padding: 30px 40px; max-width: 1180px; margin: 0 auto; width: 100%;
}
.course-card {
  position: relative; cursor: pointer; overflow: hidden; min-height: 230px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px; border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8,15,32,.2) 30%, rgba(5,8,15,.92) 100%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.course-card:hover { transform: translateY(-6px); border-color: var(--accent, var(--cyan)); box-shadow: 0 12px 44px -10px var(--accent, rgba(53,200,255,.4)); }
.course-card-canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.course-difficulty {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--font-tech); font-weight: 700; font-size: 10px; letter-spacing: 2px;
  padding: 5px 12px; border-radius: 20px; color: #04121f; background: var(--accent, var(--cyan));
}
.course-tag { font-family: var(--font-tech); font-size: 11px; letter-spacing: 3px; color: var(--accent, var(--cyan)); }
.course-name { font-family: var(--font-title); font-weight: 700; font-size: 25px; letter-spacing: 1px; margin: 6px 0; color: #fff; }
.course-desc { font-family: var(--font-ui); font-size: 14px; color: var(--text-dim); line-height: 1.4; }
.course-meta { display: flex; gap: 18px; margin-top: 14px; }
.course-meta div { font-family: var(--font-tech); font-size: 12px; color: var(--text-dim); }
.course-meta b { color: #fff; font-size: 15px; }
.course-card.locked { opacity: .55; cursor: not-allowed; }
.course-card.locked:hover { transform: none; }
.course-lock { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-tech); letter-spacing: 3px; color: var(--text-dim); background: rgba(5,8,15,.4); }

/* ════════════════════════════════════════════════════════════════════════
   GAMEPLAY
   ════════════════════════════════════════════════════════════════════════ */
.screen-game { background: #050a16; }
.game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }

.game-hud-top {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  max-width: 96vw;
}
.ghud-pill {
  display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 18px;
  background: rgba(8,15,32,.78); border: 1px solid var(--line); border-radius: 11px;
  backdrop-filter: blur(8px);
}
.ghud-label { font-family: var(--font-tech); font-size: 11px; letter-spacing: 2px; color: var(--text-faint); }
.ghud-value { font-family: var(--font-title); font-weight: 700; font-size: 20px; color: #eef6ff; display: flex; align-items: baseline; gap: 2px; }
.ghud-value i { color: var(--text-faint); font-style: normal; font-size: 14px; }
.ghud-value span { font-size: 14px; color: var(--text-dim); }
.ghud-score .ghud-value { font-size: 22px; }
.ghud-course-name {
  font-family: var(--font-tech); font-weight: 700; letter-spacing: 3px; font-size: 13px; color: var(--cyan);
  background: rgba(53,200,255,.08); border-color: var(--line-bright);
}

.power-meter {
  position: absolute; left: 26px; top: 50%; transform: translateY(-50%); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; transition: opacity .2s ease;
}
.power-meter.show { opacity: 1; }
.power-meter-label { font-family: var(--font-tech); font-size: 11px; letter-spacing: 3px; color: var(--text-dim); writing-mode: vertical-lr; }
.power-meter-track {
  width: 16px; height: 220px; border-radius: 10px; overflow: hidden;
  background: rgba(8,15,32,.8); border: 1px solid var(--line);
  display: flex; align-items: flex-end;
}
.power-meter-track span {
  display: block; width: 100%; height: 0%;
  background: linear-gradient(0deg, #36d97a, #ffd23f 55%, var(--pink));
  transition: height .04s linear;
}

.aim-hint {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 5;
  font-family: var(--font-tech); font-size: 13px; letter-spacing: 2px; color: var(--text-dim);
  background: rgba(8,15,32,.7); padding: 9px 20px; border-radius: 20px; border: 1px solid var(--line);
  transition: opacity .3s ease;
}

.hole-banner {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.85); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 26px 60px; text-align: center;
  background: rgba(6,11,24,.82); border: 1px solid var(--line-bright); border-radius: 16px;
  backdrop-filter: blur(10px); opacity: 0; pointer-events: none;
  box-shadow: 0 0 60px rgba(53,200,255,.2);
}
.hole-banner.show { animation: banner-in 2.1s ease forwards; }
@keyframes banner-in {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.8); }
  14%, 78% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.04); }
}
.hole-banner-num { font-family: var(--font-tech); letter-spacing: 6px; color: var(--cyan); font-size: 14px; }
.hole-banner-name { font-family: var(--font-title); font-weight: 900; font-size: 34px; color: #fff; letter-spacing: 1px; }
.hole-banner-par { font-family: var(--font-tech); letter-spacing: 3px; color: var(--text-dim); font-size: 13px; }
.hole-banner-par b { color: var(--pink); }

.sink-toast {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%,-50%) scale(.6); z-index: 7;
  display: flex; flex-direction: column; align-items: center; opacity: 0; pointer-events: none;
}
.sink-toast.show { animation: sink-pop 1.5s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes sink-pop {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.5); }
  18%, 70% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-58%) scale(1); }
}
.sink-toast-title { font-family: var(--font-title); font-weight: 900; font-size: 40px; color: var(--cyan); text-shadow: 0 0 30px rgba(53,200,255,.7); letter-spacing: 2px; }
.sink-toast-points { font-family: var(--font-tech); font-weight: 700; font-size: 28px; color: var(--pink); text-shadow: var(--glow-pink); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════════════════
   RESULTS
   ════════════════════════════════════════════════════════════════════════ */
.results-card {
  position: relative; z-index: 2; max-width: 620px; margin: 4vh auto 0; width: 92%;
  padding: 30px 34px 30px; text-align: center;
  background: linear-gradient(180deg, rgba(12,24,48,.86), rgba(8,15,32,.92));
  border: 1px solid var(--line-bright); border-radius: 20px;
  box-shadow: 0 24px 80px -20px rgba(0,0,0,.8), 0 0 60px rgba(53,200,255,.12);
  max-height: 92vh; overflow-y: auto;
}
.results-badge {
  width: 64px; height: 64px; margin: 0 auto 8px; display: grid; place-items: center; color: #04121f;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep)); border-radius: 16px;
  box-shadow: var(--glow-cyan);
}
.results-badge svg { width: 36px; height: 36px; }
.results-title { font-family: var(--font-title); font-weight: 900; font-size: 30px; letter-spacing: 3px; color: #fff; }
.results-course { font-family: var(--font-tech); letter-spacing: 4px; color: var(--cyan); font-size: 13px; margin-top: 4px; }
.results-score { margin: 22px 0 12px; display: flex; flex-direction: column; align-items: center; }
.results-score-label { font-family: var(--font-tech); letter-spacing: 4px; color: var(--text-faint); font-size: 12px; }
.results-score-value {
  font-family: var(--font-title); font-weight: 900; font-size: 68px; line-height: 1;
  background: linear-gradient(180deg, #cdf2ff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(53,200,255,.4));
}
.results-newbest { font-family: var(--font-tech); font-weight: 700; letter-spacing: 3px; color: var(--pink); font-size: 13px; margin-top: 8px; animation: pulse 1.2s infinite; }
.results-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.results-stat { padding: 14px 6px; background: rgba(53,200,255,.05); border: 1px solid var(--line); border-radius: 12px; }
.results-stat b { display: block; font-family: var(--font-title); font-weight: 700; font-size: 24px; color: #eef6ff; }
.results-stat span { font-family: var(--font-tech); font-size: 10px; letter-spacing: 2px; color: var(--text-faint); }
.results-card-rows { margin: 14px 0 18px; display: flex; flex-direction: column; gap: 5px; max-height: 180px; overflow-y: auto; }
.results-row { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 12px; padding: 8px 14px; background: rgba(255,255,255,.025); border-radius: 8px; font-family: var(--font-tech); font-size: 14px; }
.results-row .rr-hole { color: var(--text-faint); }
.results-row .rr-name { color: var(--text); text-align: left; }
.results-row .rr-strokes { color: var(--text-dim); }
.results-row .rr-pts { color: var(--cyan); font-weight: 700; }
.results-row.under .rr-pts { color: #36d97a; }
.results-row.hio { background: rgba(255,46,116,.08); }
.results-row.hio .rr-name { color: var(--pink); }
.results-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.results-actions .cta-btn { font-size: 14px; padding: 13px 22px; }

/* ════════════════════════════════════════════════════════════════════════
   LEADERBOARD
   ════════════════════════════════════════════════════════════════════════ */
.lb-tabs { position: relative; z-index: 2; display: flex; gap: 10px; justify-content: center; padding: 20px 40px 6px; flex-wrap: wrap; }
.lb-tab {
  font-family: var(--font-tech); font-weight: 700; font-size: 13px; letter-spacing: 2px; cursor: pointer;
  padding: 10px 20px; color: var(--text-dim); background: rgba(53,200,255,.05);
  border: 1px solid var(--line); border-radius: 20px; transition: all .16s ease;
}
.lb-tab.active { color: #04121f; background: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.lb-tab:hover:not(.active) { background: rgba(53,200,255,.14); color: var(--cyan); }
.lb-wrap {
  position: relative; z-index: 2; max-width: 760px; margin: 12px auto 0; width: 92%;
  background: rgba(8,15,32,.6); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.lb-head, .lb-row { display: grid; grid-template-columns: 60px 1fr 1fr 110px; align-items: center; gap: 10px; padding: 13px 22px; }
.lb-head { font-family: var(--font-tech); font-size: 11px; letter-spacing: 2px; color: var(--text-faint); border-bottom: 1px solid var(--line); }
.lb-head span:last-child, .lb-row .lb-score { text-align: right; }
.lb-list { max-height: 56vh; overflow-y: auto; }
.lb-row { font-family: var(--font-ui); font-size: 15px; border-bottom: 1px solid rgba(53,200,255,.05); transition: background .15s; }
.lb-row:hover { background: rgba(53,200,255,.04); }
.lb-rank { font-family: var(--font-title); font-weight: 700; color: var(--text-dim); }
.lb-row.top1 .lb-rank { color: #ffd23f; } .lb-row.top2 .lb-rank { color: #c9d8ee; } .lb-row.top3 .lb-rank { color: #e0935a; }
.lb-row.me { background: rgba(53,200,255,.08); }
.lb-player { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.lb-player .lb-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lb-course { font-family: var(--font-tech); font-size: 12px; letter-spacing: 1px; color: var(--text-dim); }
.lb-score { font-family: var(--font-title); font-weight: 700; color: var(--cyan); }
.lb-empty { padding: 40px; text-align: center; color: var(--text-faint); font-family: var(--font-tech); letter-spacing: 2px; }
.lb-note { position: relative; z-index: 2; text-align: center; margin-top: 14px; font-family: var(--font-tech); font-size: 12px; color: var(--text-faint); letter-spacing: 1px; }

/* ════════════════════════════════════════════════════════════════════════
   OPTIONS
   ════════════════════════════════════════════════════════════════════════ */
.options-panel {
  position: relative; z-index: 2; max-width: 560px; margin: 30px auto 0; width: 92%;
  background: rgba(8,15,32,.6); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.opt-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 26px; border-bottom: 1px solid rgba(53,200,255,.06); gap: 16px; }
.opt-row:last-child { border-bottom: none; }
.opt-label { font-family: var(--font-ui); font-weight: 600; font-size: 16px; color: var(--text); }
.opt-input {
  font-family: var(--font-tech); font-size: 15px; color: #fff; text-align: right;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 14px; width: 220px; outline: none; letter-spacing: 1px;
}
.opt-input:focus { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.opt-danger .opt-label { color: var(--pink); }
.toggle {
  width: 52px; height: 28px; border-radius: 16px; cursor: pointer; position: relative;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); transition: all .18s ease;
}
.toggle span { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--text-dim); transition: all .18s ease; }
.toggle[data-on="true"] { background: rgba(53,200,255,.22); border-color: var(--cyan); }
.toggle[data-on="true"] span { left: 26px; background: var(--cyan); box-shadow: var(--glow-cyan); }

/* ───────────────────────── Toast ───────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); z-index: 200;
  font-family: var(--font-tech); font-weight: 600; letter-spacing: 1px; font-size: 14px;
  color: #eaf4ff; padding: 13px 24px; border-radius: 12px;
  background: rgba(8,15,32,.95); border: 1px solid var(--line-bright);
  opacity: 0; pointer-events: none; transition: all .3s ease; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.cyan { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.toast.pink { border-color: var(--pink); box-shadow: var(--glow-pink); }

/* ───────────────────────── Gameplay overlay hit-testing ───────────────────────── */
.game-hud-top { pointer-events: none; }
.game-hud-top .ghost-btn { pointer-events: auto; }
.power-meter, .aim-hint, .sink-toast, .hole-banner { pointer-events: none; }

/* ───────────────────────── Modal ───────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 250;
  display: grid; place-items: center; padding: 20px;
  background: rgba(3,6,14,.72); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .22s ease;
}
.modal-overlay.show { opacity: 1; }
.modal {
  width: min(440px, 92vw); padding: 30px 30px 26px; text-align: center;
  background: linear-gradient(180deg, rgba(14,28,54,.96), rgba(8,15,32,.98));
  border: 1px solid var(--line-bright); border-radius: 18px;
  box-shadow: 0 30px 90px -20px rgba(0,0,0,.8), 0 0 50px rgba(53,200,255,.12);
  transform: translateY(10px) scale(.98); transition: transform .22s ease;
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-title { font-family: var(--font-title); font-weight: 900; font-size: 22px; letter-spacing: 2px; color: #fff; }
.modal-message { font-family: var(--font-ui); font-size: 15px; color: var(--text-dim); line-height: 1.5; margin: 14px 0 22px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.modal-actions .cta-btn { font-size: 14px; padding: 12px 22px; }
.cta-btn.danger {
  color: #fff; background: linear-gradient(100deg, var(--pink), var(--pink-deep));
  box-shadow: var(--glow-pink);
}
.cta-btn.danger:hover { box-shadow: 0 6px 28px rgba(255,46,116,.5); }

/* ───────────────────────── Scrollbars ───────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(53,200,255,.25); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(53,200,255,.45); }

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 920px) {
  .menu-overlay { width: 100%; padding: 22px 22px 0; background: linear-gradient(180deg, rgba(5,8,15,.5), rgba(5,8,15,0) 60%); }
  .scene-vignette { background: linear-gradient(180deg, rgba(5,8,15,.6) 0%, rgba(5,8,15,.2) 40%, rgba(5,8,15,.9) 100%); }
  .main-menu { max-width: 100%; }
  .hud-bar { grid-template-columns: 1fr; height: auto; gap: 14px; padding: 14px; bottom: 10px; left: 12px; right: 12px; }
  .hud-stats { justify-content: space-around; }
  .hud-actions { justify-content: center; }
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .game-title { font-size: clamp(54px, 16vw, 92px); }
}
@media (max-width: 560px) {
  .menu-overlay { padding: 16px; }
  .char-grid { grid-template-columns: 1fr; }
  .hud-player { flex-wrap: wrap; }
  .hud-xp { min-width: 140px; }
  .game-hud-top { gap: 7px; top: 8px; }
  .ghud-pill { height: 38px; padding: 0 11px; }
  .ghud-value { font-size: 16px; }
  .ghud-course-name { display: none; }
  .power-meter { left: 10px; }
  .power-meter-track { height: 150px; }
  .sub-header { padding: 16px; }
  .sub-header-spacer { display: none; }
  .results-score-value { font-size: 54px; }
  .results-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════════════════════════════
   POLISH LAYER — extra menu/gameplay flourish
   ════════════════════════════════════════════════════════════════════════ */

/* animated sweep across menu buttons on hover */
.menu-btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 32%, rgba(140,225,255,.20) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.menu-btn:hover::after { transform: translateX(130%); }

/* primary button breathing glow */
.menu-btn.is-primary {
  animation: prim-breathe 3.4s ease-in-out infinite;
}
@keyframes prim-breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(53,200,255,.35), -3px 0 30px rgba(53,200,255,.22), inset 0 0 30px rgba(53,200,255,.08); }
  50% { box-shadow: 0 0 0 1px rgba(53,200,255,.6), -3px 0 44px rgba(53,200,255,.4), inset 0 0 38px rgba(53,200,255,.14); }
}

/* brand logo pulse */
.brand-logo { animation: pulse 3s ease-in-out infinite; }

/* staggered menu entrance */
.brand, .title-block, .main-menu > *, .hud-bar {
  animation: enter-up .6s cubic-bezier(.2,.8,.2,1) both;
}
.brand { animation-delay: .05s; }
.title-block { animation-delay: .14s; }
.main-menu > *:nth-child(1) { animation-delay: .26s; }
.main-menu > *:nth-child(2) { animation-delay: .32s; }
.main-menu > *:nth-child(3) { animation-delay: .38s; }
.main-menu > *:nth-child(4) { animation-delay: .44s; }
.main-menu > *:nth-child(5) { animation-delay: .50s; }
.hud-bar { animation-delay: .56s; }
@keyframes enter-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* subtle scanlines + top sheen over the menu scene */
.screen-menu::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; mix-blend-mode: overlay; opacity: .5;
  background:
    repeating-linear-gradient(0deg, rgba(120,200,255,.04) 0 1px, transparent 1px 3px),
    radial-gradient(120% 60% at 70% -10%, rgba(120,180,255,.18), transparent 60%);
}

/* sub-screen titles + cards entrance */
.screen-sub.is-active .sub-title { animation: enter-up .5s ease both .05s; }
.screen-sub.is-active .char-card,
.screen-sub.is-active .course-card { animation: enter-up .5s ease both; }
.char-card:nth-child(1), .course-card:nth-child(1) { animation-delay: .08s; }
.char-card:nth-child(2), .course-card:nth-child(2) { animation-delay: .16s; }
.char-card:nth-child(3), .course-card:nth-child(3) { animation-delay: .24s; }
.char-card:nth-child(4), .course-card:nth-child(4) { animation-delay: .32s; }

/* gentle float on character avatars */
.char-avatar { animation: avatar-float 4s ease-in-out infinite; }
.char-card:nth-child(even) .char-avatar { animation-delay: -2s; }
@keyframes avatar-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ───────────────────────── stars, coins & shop ───────────────────────── */
.hud-coin { font-size: 20px; color: #ffd23f; text-shadow: 0 0 12px rgba(255,210,63,.6); line-height: 1; }

/* star icons */
.star { width: 18px; height: 18px; }
.star.on { color: #ffd23f; filter: drop-shadow(0 0 5px rgba(255,210,63,.8)); }
.star.off { color: rgba(140,166,200,.28); }

.sink-toast-stars { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.sink-toast-stars .star { width: 26px; height: 26px; }
.sink-toast-stars.none { display: none; }
.sink-toast-stars .star.on { animation: star-pop .5s cubic-bezier(.2,1.6,.4,1) backwards; }
.sink-toast-stars .star.on:nth-child(2) { animation-delay: .1s; }
.sink-toast-stars .star.on:nth-child(3) { animation-delay: .2s; }
@keyframes star-pop { from { transform: scale(0) rotate(-40deg); opacity: 0; } }

/* course card star badge */
.cm-stars b { color: #ffd23f !important; }

/* results extras + star column */
.results-extra { display: flex; justify-content: center; gap: 14px; margin: 6px 0 2px; flex-wrap: wrap; }
.rx-item { padding: 8px 18px; background: rgba(255,210,63,.06); border: 1px solid rgba(255,210,63,.25); border-radius: 10px; text-align: center; }
.rx-item b { display: block; font-family: var(--font-title); font-weight: 700; font-size: 20px; color: #ffe79a; }
.rx-item b i { font-style: normal; font-size: 14px; color: var(--text-dim); margin-left: 6px; }
.rx-item span { font-family: var(--font-tech); font-size: 10px; letter-spacing: 2px; color: var(--text-faint); }
.results-row.solo { grid-template-columns: 36px 1fr 72px auto auto; }
.results-row .rr-stars { display: flex; gap: 2px; }
.results-row .rr-stars .star { width: 15px; height: 15px; }

/* shop screen */
.shop-balance { font-family: var(--font-tech); font-weight: 700; font-size: 22px; color: #ffd23f; text-shadow: 0 0 14px rgba(255,210,63,.5); }
.shop-tabs { display: flex; justify-content: center; gap: 10px; margin: 4px 0 22px; }
.shop-tab {
  font-family: var(--font-tech); font-weight: 700; font-size: 13px; letter-spacing: 2px;
  padding: 9px 22px; color: var(--text-dim); cursor: pointer;
  background: rgba(53,200,255,.05); border: 1px solid var(--line); border-radius: 9px; transition: .15s;
}
.shop-tab:hover { color: #eaf4ff; border-color: var(--line-bright); }
.shop-tab.active { color: #06121f; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 18px rgba(53,200,255,.4); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; max-width: 760px; margin: 0 auto; padding: 0 8px; }
.shop-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; transition: .15s;
}
.shop-card.equipped { border-color: var(--cyan); box-shadow: 0 0 22px rgba(53,200,255,.22); }
.shop-prev { width: 56px; height: 56px; border-radius: 50%; box-shadow: inset 0 -4px 10px rgba(0,0,0,.5), 0 4px 14px rgba(0,0,0,.4); }
.shop-prev.trail { width: 64px; height: 14px; border-radius: 8px; box-shadow: 0 0 16px currentColor; }
.shop-name { font-family: var(--font-tech); font-weight: 600; font-size: 14px; color: #eaf4ff; }
.shop-btn {
  font-family: var(--font-tech); font-weight: 700; font-size: 12px; letter-spacing: 1px;
  padding: 8px 16px; width: 100%; cursor: pointer; color: #06121f; background: var(--cyan);
  border: none; border-radius: 8px; transition: .15s;
}
.shop-btn:hover:not(:disabled) { filter: brightness(1.12); }
.shop-btn.buy { background: rgba(255,210,63,.16); color: #ffe79a; border: 1px solid rgba(255,210,63,.5); }
.shop-btn.buy.no { opacity: .4; cursor: not-allowed; }
.shop-btn.on { background: transparent; color: var(--cyan); border: 1px solid var(--line-bright); cursor: default; }
.shop-note { text-align: center; font-family: var(--font-tech); font-size: 12px; color: var(--text-faint); letter-spacing: 1px; margin-top: 22px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .08s !important; }
}
