@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #0a0a0a;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== DASHBOARD SHELL ===== */
#dashboard {
  display: flex;
  width: 1200px;
  min-width: 1200px;
  max-width: 1200px;
  height: 420px;
  min-height: 420px;
  max-height: 420px;
  border-radius: 60px;
  position: relative;
  overflow: hidden;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Frosted glass inner glow */
#dashboard::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 60px;
  pointer-events: none;
  z-index: 1;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== THEME: BLACK (default) ===== */
.theme-black {
  background: linear-gradient(165deg, #2a2d35 0%, #1e2028 30%, #16181d 60%, #1a1c22 100%);
  box-shadow:
    0 4px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.theme-black::before {
  box-shadow:
    inset 0 0 80px rgba(255, 255, 255, 0.02),
    inset 0 0 200px rgba(100, 140, 200, 0.015);
}

/* ===== THEME: WHITE ===== */
.theme-white {
  background: linear-gradient(165deg, #f5f5f5 0%, #efefef 30%, #eaeaea 60%, #f0f0f0 100%);
  box-shadow:
    0 4px 80px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}
.theme-white::before {
  box-shadow:
    inset 0 0 80px rgba(255, 255, 255, 0.5),
    inset 0 0 200px rgba(255, 255, 255, 0.2);
}

/* ===== THEME: FADE ===== */
.theme-fade {
  background: linear-gradient(165deg, #2e3040 0%, #252838 30%, #1c1e30 60%, #222538 100%);
  box-shadow:
    0 4px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(140, 160, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.theme-fade::before {
  box-shadow:
    inset 0 0 80px rgba(100, 120, 255, 0.03),
    inset 0 0 200px rgba(80, 100, 200, 0.02);
}

/* ===== THEME: SUNSET ===== */
.theme-sunset {
  background: linear-gradient(165deg, #352a28 0%, #2a2020 30%, #201818 60%, #281e1e 100%);
  box-shadow:
    0 4px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 160, 100, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.theme-sunset::before {
  box-shadow:
    inset 0 0 80px rgba(255, 140, 60, 0.02),
    inset 0 0 200px rgba(200, 100, 50, 0.015);
}

/* ===== DYNAMIC TEXT/ICON COLORS ===== */
.theme-black { --text-primary: rgba(255,255,255,0.95); --text-secondary: rgba(255,255,255,0.6); --text-muted: rgba(255,255,255,0.3); --accent: #64b4ff; --accent-glow: rgba(100,180,255,0.3); --surface: rgba(255,255,255,0.06); --surface-border: rgba(255,255,255,0.1); --surface-hover: rgba(255,255,255,0.12); --icon-fill: rgba(255,255,255,0.6); --icon-active: #64b4ff; --needle: #ff3b3b; --sky-top: #0a0a1a; --sky-mid: #111828; --sky-bot: #1a2a3a; --mountain-far: #1a2030; --mountain-near: #152518; --hill-far: #0f3010; --hill-mid: #0a2a0a; --hill-near: #072007; --road-surface: #2a2a2a; --road-edge: rgba(255,255,255,0.4); --road-center: #cc8800; --tree-canopy: #1a5a1a; --tree-canopy-light: #2a7a2a; --tree-trunk: #3a2a1a; --bush-color: #154015; --nav-arrow: #64b4ff; --gear-bg: rgba(0,0,0,0.6); --gear-border: rgba(255,255,255,0.15); --bolt: #4cdf6b; }
.theme-white { --text-primary: rgba(0,0,0,0.8); --text-secondary: rgba(0,0,0,0.5); --text-muted: rgba(0,0,0,0.3); --accent: #3a8af5; --accent-glow: rgba(58,138,245,0.25); --surface: rgba(0,0,0,0.04); --surface-border: rgba(0,0,0,0.15); --surface-hover: rgba(0,0,0,0.08); --icon-fill: rgba(0,0,0,0.45); --icon-active: #3a8af5; --needle: #e53935; --sky-top: #a8d4f0; --sky-mid: #d4e4f0; --sky-bot: #e8ddd0; --mountain-far: #a0b0c0; --mountain-near: #8aa098; --hill-far: #8bc34a; --hill-mid: #7cb342; --hill-near: #689f38; --road-surface: #6a6a6a; --road-edge: rgba(255,255,255,0.9); --road-center: #f0a030; --tree-canopy: #5a9a30; --tree-canopy-light: #7ab840; --tree-trunk: #6b4226; --bush-color: #4a8a28; --nav-arrow: #3a8af5; --gear-bg: rgba(255,255,255,0.7); --gear-border: rgba(0,0,0,0.15); --bolt: #34a853; }
.theme-fade { --text-primary: rgba(230,235,255,0.95); --text-secondary: rgba(210,220,255,0.65); --text-muted: rgba(190,200,255,0.3); --accent: #8090ff; --accent-glow: rgba(128,144,255,0.3); --surface: rgba(120,140,255,0.08); --surface-border: rgba(120,140,255,0.16); --surface-hover: rgba(120,140,255,0.16); --icon-fill: rgba(210,220,255,0.65); --icon-active: #8090ff; --needle: #ff5252; --sky-top: #0a0a2a; --sky-mid: #151530; --sky-bot: #1a1a40; --mountain-far: #1a1a35; --mountain-near: #151a28; --hill-far: #0f1a10; --hill-mid: #0a150a; --hill-near: #060f06; --road-surface: #252535; --road-edge: rgba(200,210,255,0.35); --road-center: #8878aa; --tree-canopy: #1a3020; --tree-canopy-light: #254028; --tree-trunk: #2a2040; --bush-color: #152518; --nav-arrow: #8090ff; --gear-bg: rgba(20,20,40,0.7); --gear-border: rgba(120,140,255,0.15); --bolt: #60dd80; }
.theme-sunset { --text-primary: rgba(255,240,225,0.95); --text-secondary: rgba(255,225,200,0.65); --text-muted: rgba(255,210,180,0.3); --accent: #ff8844; --accent-glow: rgba(255,136,68,0.3); --surface: rgba(255,140,80,0.08); --surface-border: rgba(255,140,80,0.14); --surface-hover: rgba(255,140,80,0.16); --icon-fill: rgba(255,225,200,0.65); --icon-active: #ff8844; --needle: #ff4422; --sky-top: #1a0510; --sky-mid: #6a2200; --sky-bot: #dd6600; --mountain-far: #3a1a20; --mountain-near: #2a1a15; --hill-far: #2a1a0a; --hill-mid: #201508; --hill-near: #1a0f05; --road-surface: #302018; --road-edge: rgba(255,200,150,0.35); --road-center: #cc6600; --tree-canopy: #3a2010; --tree-canopy-light: #4a3018; --tree-trunk: #3a2010; --bush-color: #2a1a0a; --nav-arrow: #ff8844; --gear-bg: rgba(30,15,10,0.7); --gear-border: rgba(255,140,80,0.15); --bolt: #60dd80; }

/* ===== THEME SELECTOR ===== */
#theme-selector {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 16px 4px 16px 16px;
  z-index: 10;
  flex-shrink: 0;
}

#theme-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 12px;
}

.theme-btn {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

.theme-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.theme-btn.active {
  background: var(--accent-glow);
  color: var(--text-primary);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ===== MAIN PANEL ===== */
#main-panel {
  flex: 1;
  display: flex;
  flex-direction: row;
  padding: 14px 14px 14px 14px;
  min-width: 0;
  z-index: 2;
  gap: 10px;
}

/* ===== LEFT COLUMN ===== */
#left-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 150px;
  position: relative;
}

/* ===== CENTER COLUMN ===== */
#center-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

#top-center-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
  position: relative;
  flex-shrink: 0;
}

/* ===== HELP TOOLTIP ===== */
#help-tooltip {
  position: absolute;
  right: 244px;
  top: 20px;
  z-index: 20;
}

#help-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#help-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--text-primary);
}

#help-dropdown {
  display: none;
  position: absolute;
  top: 32px;
  right: 0;
  background: var(--gear-bg);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 260px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 30;
}

#help-tooltip:hover #help-dropdown {
  display: block;
}

#help-tour-btn {
  position: absolute;
  top: 12px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  border: none;
  background: #3a8af5;
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

#help-tour-btn:hover {
  background: #5a9ef7;
}

.help-section {
  font-size: 8px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}

.help-section:first-child {
  margin-top: 0;
}

.help-row {
  font-size: 9px;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  margin-bottom: 3px;
}

.help-row kbd {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 8px;
  font-weight: 600;
  font-family: 'Orbitron', monospace;
  color: var(--text-primary);
  margin-right: 4px;
}

/* ===== RIGHT COLUMN ===== */
#right-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 220px;
  position: relative;
}

#media-icons {
  display: flex;
  gap: 6px;
}

.media-btn {
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.media-btn svg {
  width: 17px;
  height: 17px;
  fill: var(--icon-fill);
  transition: fill 0.3s ease;
}

.media-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.media-btn:hover svg { fill: var(--text-primary); }

.media-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.media-btn.active svg { fill: var(--icon-active); }

/* Gear selector */
#top-center {
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 10;
  flex-shrink: 0;
}

.gear-arrow {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

.gear-arrow:hover { color: var(--text-secondary); }

#gear-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 6px;
  user-select: none;
  -webkit-user-select: none;
}

.gear {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: 'Orbitron', monospace;
}

.gear.active {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 20px var(--accent-glow);
}

/* Battery / range */
#top-right {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  min-width: 130px;
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#bolt-wrapper {
  position: absolute;
  left: 18px;
  display: flex;
  align-items: center;
}

#miles-wrapper {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
}

#bolt-icon {
  width: 17px;
  height: 17px;
  fill: var(--bolt);
  filter: drop-shadow(0 0 4px var(--bolt));
}

#range-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Orbitron', monospace;
  letter-spacing: -0.5px;
}

#range-unit {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: lowercase;
}

/* ===== MEDIA PANEL ===== */
#media-panel {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#media-icons {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.media-view {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;
}

.media-view.active {
  display: flex;
}

.media-view[data-view="apps"] {
  padding-top: 6px;
}

/* --- Phone view --- */
#caller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--accent-glow);
}

#caller-avatar svg {
  width: 24px;
  height: 24px;
  fill: var(--accent);
}

#caller-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

#caller-label {
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

#call-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

#call-decline, #call-accept {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#call-decline {
  background: rgba(255, 59, 59, 0.35);
  border: 1.5px solid rgba(255, 59, 59, 0.5);
  box-shadow: 0 0 8px rgba(255, 59, 59, 0.2);
}

#call-decline svg {
  width: 18px;
  height: 18px;
  fill: #ff3b3b;
}

#call-decline:hover {
  background: rgba(255, 59, 59, 0.4);
  box-shadow: 0 0 12px rgba(255, 59, 59, 0.3);
}

#call-accept {
  background: rgba(76, 223, 107, 0.35);
  border: 1.5px solid rgba(76, 223, 107, 0.5);
  box-shadow: 0 0 8px rgba(76, 223, 107, 0.2);
  animation: phoneRing 3.5s ease-in-out infinite;
}

#call-accept svg {
  width: 18px;
  height: 18px;
  fill: #4cdf6b;
}

@keyframes phoneRing {
  0% { transform: rotate(0deg); }
  2% { transform: rotate(12deg); }
  4% { transform: rotate(-10deg); }
  6% { transform: rotate(8deg); }
  8% { transform: rotate(-6deg); }
  10% { transform: rotate(10deg); }
  12% { transform: rotate(-8deg); }
  14% { transform: rotate(6deg); }
  16% { transform: rotate(-5deg); }
  18% { transform: rotate(10deg); }
  20% { transform: rotate(-8deg); }
  22% { transform: rotate(6deg); }
  24% { transform: rotate(-4deg); }
  26% { transform: rotate(8deg); }
  28% { transform: rotate(-6deg); }
  30% { transform: rotate(4deg); }
  32% { transform: rotate(-2deg); }
  34% { transform: rotate(0deg); }
  34.01%, 100% { transform: rotate(0deg); }
}

#call-accept:hover {
  background: rgba(76, 223, 107, 0.4);
  box-shadow: 0 0 12px rgba(76, 223, 107, 0.3);
}

/* --- Music view --- */
#album-art {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--accent-glow);
}

#album-art svg {
  width: 28px;
  height: 28px;
  fill: rgba(255, 255, 255, 0.9);
}

#song-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

#song-artist {
  font-size: 10px;
  color: var(--text-secondary);
}

#music-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.music-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.music-btn svg {
  width: 14px;
  height: 14px;
  fill: var(--text-secondary);
}

.music-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.music-btn:hover svg {
  fill: var(--text-primary);
}

.music-btn.play-btn {
  width: 36px;
  height: 36px;
  background: var(--accent-glow);
  border-color: var(--accent);
}

.music-btn.play-btn svg {
  fill: var(--accent);
  width: 16px;
  height: 16px;
}

/* --- Apps view --- */
#app-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
  justify-content: center;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.app-icon svg {
  color: var(--text-primary);
  fill: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 6px;
  width: 34px;
  height: 34px;
  transition: all 0.2s ease;
}

.app-icon svg path,
.app-icon svg circle {
  fill: var(--text-primary);
}

.app-icon:hover svg {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.app-icon:hover svg path,
.app-icon:hover svg circle {
  fill: var(--accent);
}

.app-icon span {
  font-size: 7px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

/* ===== NAV SECTION ===== */
#nav-section {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 10;
  pointer-events: none;
}

#nav-direction {
  display: flex;
  align-items: center;
  justify-content: center;
}

#turn-arrow {
  width: 32px;
  height: 32px;
  position: relative;
  color: var(--nav-arrow);
  animation: arrowBreath 2s ease-in-out infinite;
}

.arrow-glow {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  filter: blur(6px);
  opacity: 0.6;
  animation: glowPulse 2s ease-in-out infinite;
}

.arrow-core {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

@keyframes arrowBreath {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.15; filter: blur(3px); }
  50% { opacity: 0.8; filter: blur(8px); }
}

#nav-text { text-align: center; }

#nav-instruction {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Orbitron', monospace;
}

#nav-distance {
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 1px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Match Day nav colors for Sunset */
.theme-sunset #nav-instruction {
  color: rgba(0,0,0,0.75);
}

.theme-sunset #nav-distance {
  color: rgba(0,0,0,0.35);
}

.theme-sunset #turn-arrow {
  color: #3a8af5;
}

/* White icons on dark themes for phone/music panels */
.theme-sunset #caller-avatar svg path,
.theme-fade #caller-avatar svg path,
.theme-black #caller-avatar svg path {
  fill: #fff;
}

.theme-sunset #call-decline svg path,
.theme-fade #call-decline svg path,
.theme-black #call-decline svg path {
  fill: #fff;
}

.theme-sunset #call-accept svg path,
.theme-fade #call-accept svg path,
.theme-black #call-accept svg path {
  fill: #fff;
}

.theme-sunset .music-btn svg path,
.theme-fade .music-btn svg path,
.theme-black .music-btn svg path {
  fill: rgba(255, 255, 255, 0.8);
}

.theme-sunset .music-btn.play-btn svg path,
.theme-fade .music-btn.play-btn svg path,
.theme-black .music-btn.play-btn svg path {
  fill: #fff;
}

/* ===== ROAD SCENE (CENTER) ===== */
#road-scene {
  flex: 1;
  width: 100%;
  margin-top: 6px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--surface-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  isolation: isolate;
}

#road-canvas {
  display: none;
}

/* Background illustration for the road scene — per theme */
#road-scene {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-origin: border-box;
}

.theme-white #road-scene {
  background-image: url('./sunnyroad4.png');
}

.theme-black #road-scene {
  background-image: url('./nightsky.png');
}

.theme-sunset #road-scene {
  background-image: url('./sunset2.png');
}

.theme-fade #road-scene {
  background-image: url('./dusk3.png');
}

#gear-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  z-index: 10;
  background: var(--gear-bg);
  border: 1.5px solid var(--gear-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#current-gear {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Orbitron', monospace;
}

/* ===== SPEEDOMETER (RIGHT) ===== */
#speedo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#speedometer {
  width: 180px;
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pedal buttons */
#pedals {
  display: flex;
  gap: 8px;
}

#pedals button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

#pedals button svg {
  width: 14px;
  height: 14px;
}

#gas-btn:active,
#gas-btn.active {
  background: rgba(76, 223, 107, 0.2);
  border-color: #4cdf6b;
  color: #4cdf6b;
  box-shadow: 0 0 12px rgba(76, 223, 107, 0.3);
}

#brake-btn:active,
#brake-btn.active {
  background: rgba(255, 59, 59, 0.2);
  border-color: #ff3b3b;
  color: #ff3b3b;
  box-shadow: 0 0 12px rgba(255, 59, 59, 0.3);
}

#speedo-canvas {
  width: 180px;
  height: 180px;
  image-rendering: high-quality;
}

#speedo-value {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  margin-top: 0;
}

#speed-number {
  font-size: 38px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  font-family: 'Orbitron', monospace;
  letter-spacing: -1px;
}

#speed-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 4px;
}

/* ===== TOUR OVERLAY ===== */
#tour-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  border-radius: 60px;
  pointer-events: none;
  display: none;
}

#tour-overlay.active {
  pointer-events: auto;
  display: block;
}

#tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 60px;
  transition: opacity 0.3s ease;
}

#tour-popup {
  position: absolute;
  background: #1a1c22;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 16px 18px;
  width: 240px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 102;
  transition: top 0.3s ease, left 0.3s ease;
}

#tour-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  font-family: 'Inter', sans-serif;
  margin-bottom: 6px;
}

#tour-desc {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  margin-bottom: 12px;
}

#tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#tour-step-count {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Inter', sans-serif;
}

#tour-actions {
  display: flex;
  gap: 8px;
}

.tour-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: none;
  font-size: 10px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

#tour-skip {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

#tour-skip:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

#tour-next {
  background: #3a8af5;
  color: #fff;
}

#tour-next:hover {
  background: #5a9ef7;
}

.tour-highlight {
  position: relative;
  z-index: 101 !important;
  border-radius: 12px;
  outline: 2px solid rgba(58, 138, 245, 0.6);
  outline-offset: 4px;
}

#tour-popup::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #1a1c22;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  z-index: -1;
}

#tour-popup.arrow-top::after {
  top: -6px;
  left: 50%;
  margin-left: -5px;
  transform: rotate(-45deg);
}

#tour-popup.arrow-bottom::after {
  bottom: -6px;
  left: 50%;
  margin-left: -5px;
  transform: rotate(135deg);
}

#tour-popup.arrow-left::after {
  left: -6px;
  top: 16px;
  transform: rotate(-135deg);
}

#tour-popup.arrow-right::after {
  right: -6px;
  top: 16px;
  transform: rotate(45deg);
}

#tour-popup.tour-intro {
  text-align: center;
}

#tour-popup.tour-intro #tour-footer {
  justify-content: center;
}

#tour-popup.tour-intro::after {
  display: none;
}
