/* ==========================================================================
   ELF BOWLING 2027 (v2) — 3D WebGL2 Roguelite & Pinball Arena UI Styles
   ========================================================================== */

:root {
  --bg-void: #040914;
  --glass-dark: rgba(8, 17, 34, 0.86);
  --glass-card: rgba(15, 29, 56, 0.92);
  --border-neon: rgba(56, 189, 248, 0.34);
  --cyan: #38bdf8;
  --gold: #fbbf24;
  --magenta: #ec4899;
  --purple: #a855f7;
  --green: #22c55e;
  --red: #ef4444;
  --text: #f8fafc;
  --muted: #94a3b8;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  background: var(--bg-void);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
  touch-action: none;
}

#v2-viewport {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
}

#webgl3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

#overlay2d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 8;
}

/* Bullet-Time Neon Vignette */
#bullettime-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  opacity: 0;
  background: radial-gradient(circle at center, transparent 52%, rgba(56, 189, 248, 0.28) 84%, rgba(236, 72, 153, 0.48) 100%);
  box-shadow: inset 0 0 80px rgba(56, 189, 248, 0.55);
  transition: opacity 0.18s ease;
}

#bullettime-vignette.active {
  opacity: 1;
}

/* ==========================================================================
   TOP MINIMALIST WII-SPORTS SCOREBOARD HUD (~58–64px Single Strip)
   ========================================================================== */
#v2-top-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  box-sizing: border-box;
  max-width: 100vw;
  z-index: 20;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: linear-gradient(180deg, rgba(6, 14, 30, 0.56) 0%, rgba(6, 14, 30, 0.14) 72%, transparent 100%);
  pointer-events: none;
}

#v2-top-hud > * {
  pointer-events: auto;
}

.score-cluster {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* Crisp High-Contrast Overhead Bowling Scoreboard */
#v2-scorecard {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, rgba(15, 31, 60, 0.92), rgba(9, 20, 42, 0.94));
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  padding: 4px 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

#v2-scorecard::-webkit-scrollbar {
  display: none;
}

.mode-badge-col {
  display: flex;
  flex-direction: column;
  min-width: 92px;
  padding-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  line-height: 1.15;
}

.mode-badge-col .m-title {
  font-size: 0.72rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.mode-badge-col .m-sub {
  font-size: 0.62rem;
  color: #fde047;
  font-weight: 800;
  white-space: nowrap;
}

.v2-frames {
  display: flex;
  gap: 2px;
}

.v2-fcell {
  width: 30px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 5px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.v2-fcell.tenth {
  width: 42px;
}

.v2-fcell.cur {
  background: #fefce8;
  border-color: #f59e0b;
  box-shadow: 0 0 0 1.5px rgba(251, 191, 36, 0.85), 0 0 10px rgba(251, 191, 36, 0.45);
}

.v2-fnum {
  font-size: 0.56rem;
  font-weight: 900;
  height: 12px;
  line-height: 12px;
  background: linear-gradient(180deg, #0284c7, #0369a1);
  color: #ffffff;
}

.v2-fcell.cur .v2-fnum {
  background: linear-gradient(180deg, #f59e0b, #d97706);
  color: #ffffff;
}

.v2-frolls {
  font-size: 0.68rem;
  font-weight: 900;
  height: 15px;
  line-height: 15px;
  color: #0f172a;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.v2-ftot {
  font-size: 0.68rem;
  font-weight: 900;
  height: 15px;
  line-height: 15px;
  color: #0369a1;
}

.run-score-col {
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  min-width: 60px;
  line-height: 1.05;
}

.run-score-col .rs-lbl {
  font-size: 0.52rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.run-score-col .rs-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.hud-stats-pills {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.run-mult-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.85), rgba(236, 72, 153, 0.85));
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 4px 9px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.run-mult-pill .rm-lbl {
  font-size: 0.54rem;
  text-transform: uppercase;
  font-weight: 900;
  color: #fdf2f8;
  letter-spacing: 0.04em;
}

.run-mult-pill .rm-val {
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
}

.cash-pill {
  background: rgba(12, 24, 48, 0.86);
  border: 1.5px solid rgba(251, 191, 36, 0.62);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  color: #fde047;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

/* Active Perk Strip */
#active-perks-strip {
  display: flex;
  align-items: center;
  gap: 4px;
}

.perk-mini-badge {
  background: rgba(15, 29, 56, 0.92);
  border: 1.5px solid var(--purple);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 0.66rem;
  font-weight: 800;
  color: #f3e8ff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
  cursor: help;
  white-space: nowrap;
}

/* Right Action Buttons — ONLY 4 Sleek Compact Pills */
.v2-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.v2-btn, .v2-select {
  background: rgba(12, 24, 48, 0.86);
  color: var(--text);
  border: 1.5px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.14s ease;
}

.v2-btn:hover, .v2-select:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.v2-btn.v1-switch {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.72), rgba(217, 119, 6, 0.68));
  border-color: rgba(253, 224, 71, 0.7);
  color: #fef9c3;
}

.v2-btn.hot {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: #fecaca;
  color: #ffffff;
}

.v2-btn.blitz-quick {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(236, 72, 153, 0.88));
  border-color: #fde047;
  color: #fef9c3;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.v2-btn.coach-btn {
  background: rgba(6, 78, 59, 0.82);
  border-color: rgba(52, 211, 153, 0.65);
  color: #d1fae5;
}

.v2-btn.coach-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(245, 158, 11, 0.92));
  border-color: #fde047;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(4, 9, 20, 0.55);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.55), 0 0 8px rgba(251, 191, 36, 0.45);
}

.v2-btn.menu-btn {
  background: rgba(15, 29, 56, 0.9);
  border-color: rgba(56, 189, 248, 0.55);
  color: #f8fafc;
}

.v2-select option {
  background: #0b162c;
  color: #fff;
}

/* Quick Settings & Tools inside Menu Modal */
.v2-quick-tools {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(10, 22, 44, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.v2-quick-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   JUMBOTRON & TROPHY TOASTS
   ========================================================================== */
#v2-banner {
  position: absolute;
  top: 72px;
  left: 50%;
  box-sizing: border-box;
  transform: translateX(-50%) translateY(-16px) scale(0.92);
  opacity: 0;
  pointer-events: none;
  z-index: 24;
  background: linear-gradient(180deg, rgba(17, 32, 62, 0.94), rgba(7, 14, 28, 0.94));
  border: 2px solid var(--cyan);
  border-radius: 16px;
  padding: 8px 18px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(56, 189, 248, 0.35);
  transition: all 0.22s cubic-bezier(0.22, 1.35, 0.36, 1);
  max-width: min(480px, 92vw);
}

#v2-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

#v2-banner-title {
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#v2-banner-sub {
  font-size: 0.76rem;
  color: #e2e8f0;
  margin-top: 2px;
}

#trophy-toast {
  position: absolute;
  top: 72px;
  right: 12px;
  z-index: 30;
  background: linear-gradient(135deg, #1e1b4b, #3b0764);
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 8px 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateX(30px);
  pointer-events: none;
  transition: all 0.28s ease;
}

#trophy-toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   RAZOR-SLIM FLOATING BOTTOM PILL BAR (~58px Tall, Centered fit-content)
   ========================================================================== */
#v2-bottom-hud {
  position: absolute;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 50%;
  box-sizing: border-box;
  transform: translateX(-50%);
  width: fit-content;
  max-width: calc(100vw - 12px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

#v2-bottom-hud > * {
  pointer-events: auto;
}

.v2-pill-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: fit-content;
  max-width: calc(100vw - 12px);
  padding: 4px 8px;
  background: rgba(8, 17, 34, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.coach-tip-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.92), rgba(15, 29, 56, 0.94));
  border: 1.5px solid rgba(16, 185, 129, 0.82);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ecfdf5;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.48), 0 0 14px rgba(16, 185, 129, 0.34);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(720px, 94vw);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.coach-tip-pill:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.coach-tip-pill.nudge {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.92), rgba(6, 78, 59, 0.92));
  border-color: #fbbf24;
  color: #fef9c3;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55), 0 0 18px rgba(251, 191, 36, 0.45);
}

.coach-tip-pill.hidden {
  display: none;
}

.ctrl-tip-v2 {
  background: rgba(8, 17, 34, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.64rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(360px, 92vw);
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

.ctrl-tip-v2.faded {
  display: none !important;
}

.arsenal-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.arsenal-row::-webkit-scrollbar {
  display: none;
}

.ball3d-chip {
  background: rgba(15, 29, 56, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.14s ease;
  flex-shrink: 0;
}

.ball3d-chip.selected {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.78), rgba(168, 85, 247, 0.82));
  border-color: #fde047;
  color: #fff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

.ball3d-chip.locked {
  opacity: 0.72;
  border-style: dashed;
}

/* Row 2: Compact Curve Pill + Slim GOLD Power Bar + Bold ROLL! Button */
.slingshot-hud-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
}

.hook-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(6, 13, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 2px 4px;
}

.hook-bar-lbl {
  display: none;
}

.hook-pip {
  background: rgba(15, 29, 56, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.24);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 2px 6px;
  min-width: 24px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.quick-roll-inline {
  font-size: 0.76rem;
  font-weight: 900;
  padding: 4px 12px;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.45);
}

.hook-pip:hover {
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-1px);
}

.hook-pip.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.8), rgba(168, 85, 247, 0.85));
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.hook-val-pill {
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--gold);
  min-width: 28px;
  text-align: center;
  padding: 0 2px;
}

.power-meter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(6, 13, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px 8px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.power-meter-pill.pulling {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.power-meter-pill.sweet-spot {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.82), rgba(15, 29, 56, 0.92));
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.65);
}

.pm-lbl {
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #cbd5e1;
  min-width: 38px;
}

.power-meter-pill.sweet-spot .pm-lbl {
  color: var(--gold);
}

.pm-track {
  position: relative;
  width: 78px;
  height: 7px;
  border-radius: 999px;
  background: rgba(6, 13, 26, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  overflow: hidden;
}

.pm-sweet-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 88%;
  width: 7%;
  background: rgba(251, 191, 36, 0.55);
  border-left: 1px solid #fde047;
  border-right: 1px solid #fde047;
  z-index: 2;
  pointer-events: none;
}

.pm-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #a855f7, #ec4899);
  transition: width 0.04s linear;
}

.power-meter-pill.sweet-spot .pm-fill {
  background: linear-gradient(90deg, #f59e0b, #fde047, #fffbeb);
}

.pm-pct {
  font-family: ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 900;
  color: #f8fafc;
  min-width: 28px;
  text-align: right;
}

.power-meter-pill.sweet-spot .pm-pct {
  color: #fde047;
}

.ctrl-bar-v2 {
  background: var(--glass-dark);
  border: 1px solid var(--border-neon);
  border-radius: 14px;
  padding: 7px 14px;
  font-size: 0.75rem;
  color: #cbd5e1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: min(720px, 96vw);
}

#v2-android-clutch {
  display: none;
  width: min(440px, 94vw);
  padding: 13px 16px;
  border-radius: 14px;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

#v2-android-clutch.visible {
  display: block;
}

#v2-android-clutch.engaged {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: scale(0.98);
}

/* ==========================================================================
   MODALS: HOLOGRAPHIC ROGUELITE DRAFT, V2 LOBBY, TROPHY CASE, GAME OVER
   ========================================================================== */
.v2-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 8, 18, 0.84);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow-y: auto;
}

.v2-modal-bg.hidden {
  display: none;
}

.v2-modal-card {
  width: min(900px, 96vw);
  max-height: 92dvh;
  overflow-y: auto;
  background: linear-gradient(180deg, #0f203c 0%, #071020 100%);
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 22px;
  padding: 20px 24px 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85);
}

/* Balatro-Style Holographic Mutator Cards! */
.holo-draft-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.holo-card {
  position: relative;
  background: linear-gradient(155deg, #172b4d 0%, #0b162a 100%);
  border: 2px solid var(--cyan);
  border-radius: 18px;
  padding: 18px 16px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.holo-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.35);
}

.holo-card.rarity-rare {
  border-color: var(--gold);
  background: linear-gradient(155deg, #2b2210 0%, #0e172a 100%);
}

.holo-card.rarity-legendary {
  border-color: var(--magenta);
  background: linear-gradient(155deg, #32123c 0%, #111c38 55%, #0c2c3e 100%);
  box-shadow: 0 0 26px rgba(236, 72, 153, 0.3);
}

.holo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.holo-icon {
  font-size: 2rem;
}

.holo-mult {
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  color: var(--gold);
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.holo-rarity {
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.holo-card.rarity-rare .holo-rarity { color: var(--gold); }
.holo-card.rarity-legendary .holo-rarity { color: #f472b6; }

.holo-name {
  font-size: 1.05rem;
  font-weight: 900;
  margin: 2px 0 4px;
}

.holo-desc {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.38;
}

.holo-flavor {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 8px;
}

/* Lobby Selectors */
.v2-grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.v2-sec-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--cyan);
  margin-bottom: 7px;
}

.mode-cards, .stage-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.stage-cards {
  grid-template-columns: repeat(3, 1fr);
}

.opt-card {
  background: rgba(14, 28, 52, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.opt-card:hover {
  border-color: var(--cyan);
}

.opt-card.selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(29, 56, 98, 0.95), rgba(14, 28, 52, 0.95));
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.28);
}

.opt-card .oc-t {
  font-size: 0.84rem;
  font-weight: 900;
}

.opt-card .oc-d {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.28;
}

.cta-launch-3d {
  padding: 13px 26px;
  border-radius: 14px;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, #0284c7 0%, #7c3aed 55%, #db2777 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.45);
}

.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.trophy-item {
  background: rgba(14, 27, 48, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
  opacity: 0.5;
}

.trophy-item.unlocked {
  opacity: 1;
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.8), rgba(59, 7, 100, 0.5));
}

/* Boss Key Win98 */
#v2-boss-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #c0c0c0;
  color: #000;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  display: none;
  flex-direction: column;
}
#v2-boss-overlay.visible { display: flex; }

@media (pointer: coarse) {
  .ctrl-tip-v2 {
    display: none !important;
  }

  .hook-pip {
    min-height: 28px;
    padding: 3px 7px;
  }
}

@media (max-width: 1080px) {
  .mode-badge-col {
    display: none;
  }

  .v2-fcell {
    width: 26px;
  }

  .v2-fcell.tenth {
    width: 36px;
  }
}

@media (max-width: 780px) {
  .holo-draft-grid, .v2-grid-2, .stage-cards, .mode-cards {
    grid-template-columns: 1fr;
  }

  /* Subtle dark-themed modal scrollbars & compact 90dvh portrait Draft Modal */
  .v2-modal-bg,
  .v2-modal-card {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
  }

  .v2-modal-bg::-webkit-scrollbar,
  .v2-modal-card::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }

  .v2-modal-bg::-webkit-scrollbar-track,
  .v2-modal-card::-webkit-scrollbar-track {
    background: transparent;
  }

  .v2-modal-bg::-webkit-scrollbar-thumb,
  .v2-modal-card::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
  }

  .v2-modal-bg {
    padding: 8px;
  }

  .v2-modal-card {
    width: calc(100vw - 16px);
    max-height: 90dvh;
    padding: 14px 14px 16px;
    border-radius: 18px;
  }

  #draft-modal .draft-modal-card {
    padding: 12px 12px 14px;
    max-height: 90dvh;
  }

  #draft-modal .draft-kicker {
    font-size: 0.66rem !important;
  }

  #draft-modal .draft-title {
    font-size: 1.15rem !important;
    margin: 2px 0 2px !important;
  }

  #draft-modal .draft-subtitle {
    font-size: 0.74rem !important;
  }

  #draft-modal .holo-draft-grid {
    gap: 8px;
    margin-top: 8px;
  }

  #draft-modal .holo-card {
    padding: 10px 12px;
    gap: 4px;
    border-radius: 14px;
  }

  #draft-modal .holo-icon {
    font-size: 1.35rem;
  }

  #draft-modal .holo-mult {
    font-size: 0.76rem;
    padding: 2px 7px;
  }

  #draft-modal .holo-rarity {
    font-size: 0.58rem;
  }

  #draft-modal .holo-name {
    font-size: 0.92rem;
    margin: 1px 0 2px;
  }

  #draft-modal .holo-desc {
    font-size: 0.74rem;
    line-height: 1.25;
  }

  #draft-modal .holo-flavor {
    font-size: 0.66rem;
    padding-top: 4px;
  }

  #draft-modal .draft-reroll-row {
    margin-top: 10px !important;
  }

  #draft-modal #btn-draft-reroll {
    min-height: 38px;
    padding: 6px 16px !important;
    font-size: 0.82rem !important;
  }

  #v2-top-hud {
    flex-wrap: wrap;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 4px 6px;
    gap: 4px;
  }

  .score-cluster {
    display: contents;
  }

  #v2-scorecard {
    order: 1;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    padding: 3px 5px;
    gap: 4px;
    border-radius: 10px;
    overflow-x: hidden;
  }

  .mode-badge-col {
    display: none;
  }

  .v2-frames {
    flex: 1 1 auto;
    gap: 2px;
    min-width: 0;
  }

  .v2-fcell {
    width: auto;
    min-width: 18px;
    flex: 1 1 0;
    border-radius: 4px;
  }

  .v2-fcell.tenth {
    width: auto;
    min-width: 24px;
    flex: 1.35 1 0;
  }

  .v2-fnum {
    font-size: 0.5rem;
    height: 10px;
    line-height: 10px;
  }

  .v2-frolls,
  .v2-ftot {
    font-size: 0.58rem;
    height: 12px;
    line-height: 12px;
  }

  .run-score-col {
    min-width: 48px;
    padding-left: 5px;
    text-align: right;
  }

  .run-score-col .rs-lbl {
    font-size: 0.46rem;
  }

  .run-score-col .rs-val {
    font-size: 0.88rem;
  }

  .v2-actions {
    order: 2;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .v2-actions .v2-btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 36px;
    padding: 5px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .hud-stats-pills {
    order: 3;
    gap: 4px;
  }

  .run-mult-pill {
    padding: 2px 7px;
    gap: 3px;
  }

  .run-mult-pill .rm-lbl {
    display: none;
  }

  .run-mult-pill .rm-val {
    font-size: 0.7rem;
  }

  .cash-pill {
    padding: 2px 8px;
    font-size: 0.68rem;
  }

  #active-perks-strip {
    order: 4;
    flex: 1 1 auto;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .perk-mini-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .v2-btn, .v2-select {
    min-height: 36px;
    padding: 5px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }

  #v2-banner {
    top: 124px;
    max-width: calc(100vw - 24px);
    padding: 8px 14px;
  }

  #trophy-toast {
    top: 124px;
    right: 8px;
    max-width: calc(100vw - 16px);
  }

  #v2-bottom-hud {
    bottom: calc(6px + env(safe-area-inset-bottom));
    width: 100%;
    max-width: 100vw;
    padding: 0 7px;
    gap: 5px;
  }

  .v2-pill-dock {
    width: calc(100vw - 14px);
    max-width: 400px;
    padding: 7px 8px;
    gap: 6px;
    border-radius: 16px;
  }

  #v2-coach-pill,
  .coach-tip-pill {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    max-width: calc(100vw - 20px);
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: 16px;
    overflow: visible;
    text-overflow: clip;
  }

  .arsenal-row,
  #v2-ball-strip {
    width: 100%;
    max-width: 100%;
    min-height: 36px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 22px 0 2px;
    touch-action: pan-x;
    mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
  }

  #v2-ball-strip .ball3d-chip {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .slingshot-hud-row {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }

  .hook-bar {
    padding: 2px 3px;
    gap: 2px;
    flex-shrink: 0;
  }

  .hook-pip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 40px;
    padding: 0 4px;
    font-size: 0.88rem;
  }

  .hook-val-pill {
    display: none;
  }

  .power-meter-pill {
    padding: 4px 7px;
    gap: 0;
    min-height: 36px;
    flex-shrink: 1;
  }

  .pm-lbl,
  .pm-track {
    display: none;
  }

  .pm-pct {
    font-size: 0.76rem;
    min-width: 30px;
    text-align: center;
  }

  #btn-v2-quick-roll,
  .quick-roll-inline {
    min-height: 42px;
    padding: 0 16px;
    font-size: 0.9rem;
  }
}
