:root {
  --bg-sky: #93c5fd;
  --bg-gradient-top: #bfdbfe;
  --bg-gradient-bottom: #60a5fa;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-glass-card: rgba(255, 255, 255, 0.96);
  --bg-glass-border: rgba(2, 132, 199, 0.25);

  --theme-blue: #0284c7;
  --theme-indigo: #4f46e5;
  --theme-emerald: #059669;
  --theme-amber: #d97706;
  --theme-crimson: #e11d48;
  --theme-violet: #7c3aed;
  --theme-cyan: #06b6d4;
  --theme-dark: #0f172a;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #ffffff;

  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #93c5fd 0%, #60a5fa 100%);
  font-family: var(--font-body);
  color: var(--text-main);
  user-select: none;
  -webkit-user-select: none;
}

/* 3D WebGL Canvas Layer */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Non-blocking Ambient Overlays */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: 2;
  background: radial-gradient(circle at 50% 20%, transparent 60%, rgba(186, 230, 253, 0.2) 100%);
}

.speed-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: 3;
  box-shadow: inset 0 0 80px rgba(2, 132, 199, 0);
  transition: box-shadow 0.3s ease;
}

.speed-vignette.nitro {
  box-shadow: inset 0 0 140px rgba(6, 182, 212, 0.5), inset 0 0 60px rgba(225, 29, 72, 0.35);
}

.screen-hit-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none !important;
  z-index: 999;
  background: radial-gradient(circle, rgba(225, 29, 72, 0) 40%, rgba(225, 29, 72, 0.45) 100%);
  opacity: 0;
  transition: opacity 0.05s ease-out;
}

.screen-hit-flash.active {
  opacity: 1;
}

/* Universal Visibility & Layer System */
.ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: auto !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hidden,
.ui-layer.hidden,
.modal-screen.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.interactive,
.interactive *,
button,
.cyber-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-glass-border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
}

/* Master Cyber Buttons */
.cyber-btn {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid var(--theme-blue);
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  color: var(--theme-blue);
  border-radius: 12px;
  cursor: pointer !important;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 100;
  pointer-events: auto !important;
  text-decoration: none;
}

.cyber-btn:hover {
  transform: translateY(-2px);
  background: var(--theme-blue);
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.35);
}

.cyber-btn:active {
  transform: translateY(1px);
}

.cyber-btn.btn-mint {
  border-color: var(--theme-emerald);
  color: var(--theme-emerald);
  background: linear-gradient(135deg, #ffffff 0%, #dcfce7 100%);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.15);
}

.cyber-btn.btn-mint:hover {
  background: var(--theme-emerald);
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(5, 150, 105, 0.35);
}

.cyber-btn.btn-lavender {
  border-color: var(--theme-indigo);
  color: var(--theme-indigo);
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.15);
}

.cyber-btn.btn-lavender:hover {
  background: var(--theme-indigo);
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(79, 70, 229, 0.35);
}

.cyber-btn.btn-peach {
  border-color: var(--theme-amber);
  color: var(--theme-amber);
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.15);
}

.cyber-btn.btn-peach:hover {
  background: var(--theme-amber);
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(217, 119, 6, 0.35);
}

.cyber-btn.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ==========================================================================
   MAIN MENU SCREEN
   ========================================================================== */

#screen-main-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.6) 0%, rgba(224, 242, 254, 0.85) 100%);
  z-index: 50;
}

.menu-hero {
  text-align: center;
  margin-bottom: 28px;
}

.title-glow {
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--text-main);
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(2, 132, 199, 0.2);
}

.title-glow span {
  color: var(--theme-blue);
}

.tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--theme-emerald);
  margin-top: 10px;
  text-transform: uppercase;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 440px;
  max-width: 90vw;
  z-index: 100;
}

.menu-footer {
  margin-top: 35px;
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
}

/* ==========================================================================
   CALIBRATION SCREEN
   ========================================================================== */

#screen-calibration {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 60;
}

.calibration-container {
  padding: 30px 40px;
  text-align: center;
  max-width: 580px;
  width: 92vw;
}

.calib-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--theme-blue);
  margin-bottom: 8px;
}

.calib-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.hands-preview-arena {
  position: relative;
  width: 100%;
  height: 270px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  border: 2px solid var(--theme-blue);
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2);
}

.calib-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: none;
}

.calib-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hand-target-guide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: 140px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  pointer-events: none;
}

#guide-hand-left { left: 35px; border-color: rgba(0, 240, 255, 0.6); }
#guide-hand-right { right: 35px; border-color: rgba(255, 0, 127, 0.6); }

.hand-target-guide.detected {
  border-style: solid;
  border-color: var(--theme-emerald) !important;
  background: rgba(5, 150, 105, 0.25);
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.6);
}

.target-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.calib-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 14px;
}

.calib-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7 0%, #059669 100%);
  transition: width 0.1s linear;
}

.calib-status-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--theme-amber);
}

/* ==========================================================================
   IN-GAME HUD
   ========================================================================== */

#screen-hud {
  padding: 20px 28px;
  pointer-events: none !important;
}

.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

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

.hud-stat-box {
  padding: 8px 16px;
  min-width: 110px;
  text-align: left;
}

.hud-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--theme-blue);
  text-transform: uppercase;
}

.hud-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.hud-value.glow-accent {
  color: var(--theme-emerald);
}

/* Center Control Capsule */
.hud-center-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 20px;
  pointer-events: auto !important;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.hud-sens-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 132, 199, 0.08);
  padding: 3px 8px;
  border-radius: 14px;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.sens-btn {
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid var(--theme-blue);
  color: var(--theme-blue);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer !important;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  pointer-events: auto !important;
}

.sens-btn:hover {
  background: var(--theme-blue);
  color: #ffffff;
}

.sens-text {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--theme-blue);
}

.hud-right-zone {
  margin-right: 240px; /* Non-overlapping space for PiP camera */
  display: flex;
  align-items: center;
}

.hud-mission-badge {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--theme-indigo);
}

.mission-icon {
  font-size: 1.3rem;
  color: var(--theme-indigo);
}

.mission-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  font-weight: 600;
}

.mission-desc {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.hud-alert-banner {
  position: absolute;
  top: 95px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(225, 29, 72, 0.9);
  color: #ffffff;
  padding: 8px 24px;
  border-radius: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 0.9rem;
  display: none;
  box-shadow: 0 4px 18px rgba(225, 29, 72, 0.4);
}

/* In-Game Touch Controls */
.hud-center-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto !important;
  margin-bottom: 10px;
}

.steering-indicator-bar {
  width: 220px;
  height: 6px;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 3px;
  position: relative;
  margin-top: 8px;
}

.steering-indicator-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--theme-blue);
  transform: translateX(-50%);
  transition: left 0.05s linear;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.8);
}

/* Speedometer & Nitro Bar (Bottom Left) */
.hud-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  padding-bottom: 40px;
}

.hud-speedo-box {
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
}

.speed-digital {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 0.95;
  color: #0f172a;
}

.speed-unit {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--theme-blue);
}

.hud-nitro-container {
  width: 180px;
  height: 8px;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.hud-nitro-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #0284c7, #06b6d4, #38bdf8);
  transition: width 0.1s linear;
}

.hud-shield-badge {
  position: absolute;
  top: 90px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(5, 150, 105, 0.12);
  border: 1px solid var(--theme-emerald);
  color: var(--theme-emerald);
  font-weight: 700;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hud-shield-badge.active {
  opacity: 1;
}

/* ==========================================================================
   PICTURE-IN-PICTURE (PIP) WEBCAM
   ========================================================================== */

#pip-camera-widget {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 220px;
  height: 145px;
  border-radius: 12px;
  border: 1px solid var(--bg-glass-border);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  z-index: 80;
  pointer-events: auto !important;
  transition: all 0.3s ease;
}

#pip-camera-widget.minimized {
  height: 32px;
  width: 140px;
}

.pip-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 26px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.pip-status {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: #059669;
  letter-spacing: 0.5px;
}

.pip-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer !important;
  font-size: 11px;
}

.pip-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: none;
}

.pip-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   MODAL DIALOGS: GARAGE & SETTINGS & HOW TO PLAY & RESULTS
   ========================================================================== */

.modal-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  pointer-events: auto !important;
}

.modal-box {
  width: 860px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px 36px;
  position: relative;
  z-index: 201;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  padding-bottom: 12px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #0f172a;
}

.wallet-badge {
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid var(--theme-amber);
  color: var(--theme-amber);
  padding: 6px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}

.close-btn {
  background: rgba(15, 23, 42, 0.06);
  border: none;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer !important;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-btn:hover {
  background: var(--theme-crimson);
  color: #ffffff;
}

/* Garage 14 Cars Selector Ribbon */
.garage-cars-ribbon {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--theme-blue) rgba(15, 23, 42, 0.08);
}

.garage-cars-ribbon::-webkit-scrollbar {
  height: 6px;
}

.garage-cars-ribbon::-webkit-scrollbar-thumb {
  background: var(--theme-blue);
  border-radius: 3px;
}

.car-card {
  flex: 0 0 160px;
  background: #ffffff;
  border: 2px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer !important;
  transition: all 0.2s ease;
  position: relative;
}

.car-card:hover {
  border-color: var(--theme-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.15);
}

.car-card.selected {
  border-color: var(--theme-blue);
  background: rgba(2, 132, 199, 0.08);
  box-shadow: 0 0 0 2px var(--theme-blue);
}

.car-status-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 4px;
  background: rgba(217, 119, 6, 0.12);
  color: var(--theme-amber);
}

.car-status-tag.owned {
  background: rgba(5, 150, 105, 0.12);
  color: var(--theme-emerald);
}

.car-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.car-type {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Garage 3D Showroom Stage */
.garage-main-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .garage-main-layout { grid-template-columns: 1fr; }
}

.showroom-box {
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.showroom-viewport {
  width: 100%;
  height: 330px;
  cursor: grab;
  position: relative;
}

.showroom-viewport:active {
  cursor: grabbing;
}

.showroom-overlay-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.showroom-overlay-top > * {
  pointer-events: auto;
}

.showroom-cam-presets {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cam-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer !important;
  transition: all 0.15s;
}

.cam-btn:hover, .cam-btn.active {
  background: var(--theme-blue);
  color: #ffffff;
}

.showroom-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 10;
  letter-spacing: 0.5px;
}

.garage-details-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.03);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.panel-section-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--theme-blue);
  margin-bottom: 10px;
}

.upgrade-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.upgrade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.upgrade-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.stat-pips {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--theme-emerald);
  letter-spacing: 1px;
}

.stat-value-highlight {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--theme-blue);
  font-size: 0.85rem;
}

.stat-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(15, 23, 42, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #059669);
  transition: width 0.3s ease;
}

.upgrade-btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upgrade-tier-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.color-picker-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer !important;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.color-swatch:hover,
.color-swatch.active {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--theme-blue);
}

/* Settings Form */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: 10px;
}

.setting-label-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.setting-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.setting-slider {
  width: 160px;
  cursor: pointer;
}

/* Guide Cards in How to Play */
.guide-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .guide-cards-grid { grid-template-columns: 1fr; }
}

.guide-card {
  background: rgba(15, 23, 42, 0.03);
  border-radius: 12px;
  padding: 16px;
}

.guide-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--theme-blue);
  margin-bottom: 6px;
}

.guide-card p {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.4;
}

/* Results Dialog */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.result-card {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.result-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--theme-blue);
  margin-top: 4px;
}
