/**
 * ==============================================================================
 * ASSETTO REMOTE CLOUD — CARPLAY & COCKPIT OS
 * Layer 1: Core Design System, Variables & Global Reset (style.css)
 * Character: Porsche GT3 RS Digital Cockpit + Apple CarPlay Ultra
 * ==============================================================================
 */

/* ==============================================================================
   LOCAL STATIC MOTORSPORT & TELEMETRY FONTS (100% Turkish Compatible & Zero CLS)
   ============================================================================== */

/* Chakra Petch (Latin-Ext - Turkish Support: İ, ı, Ş, ş, Ğ, ğ, Ç, ç, Ö, ö, Ü, ü) */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/chakra-petch-latin-ext-500.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/chakra-petch-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/chakra-petch-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/chakra-petch-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/chakra-petch-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/chakra-petch-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter (Latin-Ext & Latin Variable 100-900) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ============================================================================
     COLOR SYSTEM: Pure Carbon Obsidian & Supercar Racing Precision
     ============================================================================ */
  --bg-void: #07080b;           /* Pure OLED Carbon Pitch */
  --bg-canvas: #0a0c10;         /* Cockpit base canvas */
  --surface-shell: #0e1117;     /* Milled Graphite Titanium shell */
  --surface-card: #131720;      /* Precision Cockpit card surface */
  --surface-card-hover: #181d28;/* Hover state */
  --surface-elevated: #1e2432;  /* Elevated action blocks */
  --surface-glass: rgba(16, 20, 28, 0.85);

  /* Hairline Precision Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-active: rgba(255, 176, 32, 0.55);
  --border-cyan: rgba(0, 210, 255, 0.45);

  /* Ultra-Vibrant Supercar Accents */
  --accent-amber: #FFB020;       /* Supercar Acid Gold / Track Amber */
  --accent-amber-glow: rgba(255, 176, 32, 0.4);
  --accent-red: #FF334B;         /* Porsche Guards Red (Critical Alarms & Redline) */
  --accent-red-glow: rgba(255, 51, 75, 0.45);
  --accent-cyan: #00D2FF;        /* High-Definition Ice Cyan (Turbo, Active Deltas) */
  --accent-cyan-glow: rgba(0, 210, 255, 0.4);
  --accent-green: #10B981;       /* Signal Track Emerald (KERS / Ready) */
  --accent-green-glow: rgba(16, 185, 129, 0.45);
  --accent-blue: #3B82F6;        /* High-Beam & Telemetry Blue */
  --accent-yt: #FF0000;          /* Official YouTube Red */

  /* Text & Typography Hierarchy */
  --text-pure: #FFFFFF;
  --text-main: #F8FAFC;          /* Ice white (high contrast WCAG AAA) */
  --text-muted: #7E8B9F;         /* Balanced slate-graphite muted */
  --text-dim: #4B5565;           /* Inactive track markers */
  --text-amber: #FFC043;
  --text-cyan: #38D8FF;

  /* Font Families */
  --font-display: 'Chakra Petch', 'Inter', -apple-system, sans-serif;
  --font-telemetry: 'Chakra Petch', 'Inter', -apple-system, monospace;
  --font-mono: 'Chakra Petch', 'Inter', -apple-system, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout Constants */
  --sidebar-w: 256px;
  --dock-h: 56px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s var(--ease-smooth);
  --transition-normal: 0.25s var(--ease-smooth);
}

/* ==============================================================================
   GLOBAL RESETS & ACCESSIBILITY DEFAULTS
   ============================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom Cockpit Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-card);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-amber);
}

/* ==============================================================================
   APP SHELL ARCHITECTURE
   ============================================================================== */
.app-shell {
  display: flex;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-void);
  box-sizing: border-box;
}

/* MAIN CONTENT VIEWPORT */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain;
  position: relative;
  padding-bottom: 150px;
  box-sizing: border-box;
}

/* TOP STATUS HUD BAR (Cross-Device) */
.cockpit-top-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  background: var(--surface-shell);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  z-index: 40;
  min-height: 56px;
  box-sizing: border-box;
}

.hud-context-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-vehicle-capsule {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
}
.hud-car-name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #FFFFFF;
}
.hud-live-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 176, 32, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 176, 32, 0.3);
}
.hud-live-pill.live {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.4);
}

.hud-clock-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-telemetry);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

/* YouTube Button */
.hud-btn-yt {
  background: rgba(255, 0, 0, 0.1) !important;
  border: 1px solid rgba(255, 0, 0, 0.35) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 6px 14px !important;
  border-radius: var(--radius-md) !important;
  cursor: pointer !important;
  transition: all var(--transition-fast) !important;
}
.hud-btn-yt .yt-icon {
  width: 16px;
  height: 16px;
  fill: #FF0000;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}
.hud-btn-yt:hover {
  background: rgba(255, 0, 0, 0.22) !important;
  border-color: rgba(255, 0, 0, 0.65) !important;
  box-shadow: 0 0 14px rgba(255, 0, 0, 0.35) !important;
  transform: translateY(-1px);
}
.hud-btn-yt:hover .yt-icon {
  transform: scale(1.1);
}
.hud-btn-yt.connected {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #34D399 !important;
}
.hud-btn-yt.connected .yt-icon {
  fill: #34D399;
}

.hud-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--accent-green);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-green-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hud-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* STATUS CHIPS IN HEADER */
.hud-status-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.hud-status-chip strong {
  color: var(--text-main);
  font-family: var(--font-telemetry);
  font-size: 12px;
}
.hud-status-chip .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748B;
  transition: all 0.3s ease;
}
.hud-status-chip.connected .status-dot {
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green-glow);
}
.hud-status-chip.connected {
  border-color: rgba(16, 185, 129, 0.3);
}

.hud-btn-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}
.hud-btn-action:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--border-active);
  color: var(--accent-amber);
}

/* ==============================================================================
   DESKTOP CARPLAY DOCK (Sidebar >= 1024px)
   ============================================================================== */
.desktop-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface-shell);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 14px;
  z-index: 50;
  box-sizing: border-box;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Prominent Crisp Main Brand Identity */
.sidebar-brand-hero {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 2px 14px 2px;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.brand-hero-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.6));
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 12px rgba(255, 176, 32, 0.15);
  overflow: hidden;
  padding: 3px;
}
.brand-img-main {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.brand-hero-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.brand-hero-title {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-hero-title span {
  color: var(--accent-amber);
}
.brand-hero-sub {
  font-family: var(--font-telemetry);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-carplay-status {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-title {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.sc-vehicle-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-ping {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-green);
}

/* CARPLAY DOCK NAV ICONS */
.sidebar-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}
.sidebar-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2;
  transition: var(--transition-fast);
}
.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: var(--border-subtle);
}
.sidebar-nav-item.active {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}
.sidebar-nav-item.active svg {
  stroke: var(--accent-amber);
}

/* BOTTOM COMPACT MEDIA CONTROL IN SIDEBAR */
.sidebar-media-compact {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sm-art {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #1e293b;
  overflow: hidden;
  flex-shrink: 0;
}
.sm-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sm-info {
  flex: 1;
  min-width: 0;
}
.sm-track {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-artist {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* TAB CONTENT CONTAINER */
.tab-content {
  display: none !important;
  width: 100%;
  height: 100%;
}
.tab-content.active {
  display: flex !important;
  flex-direction: column;
}

/* ==============================================================================
   TOAST NOTIFICATION HUD & OVERLAYS
   ============================================================================== */
#toastHud {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface-shell);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 999999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
#toastHud.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* PIN MODAL OVERLAY */
.pin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(5, 7, 11, 0.88);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pin-modal-overlay.active {
  display: flex;
}

.pin-modal-card {
  width: min(440px, 94vw);
  background: var(--surface-shell);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  position: relative;
}

.pm-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pm-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-pure);
}
.pm-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.pin-digits-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.pin-digit-input {
  width: 48px;
  height: 56px;
  background: var(--surface-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: var(--font-telemetry);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-amber);
  text-align: center;
  outline: none;
  transition: var(--transition-fast);
}
.pin-digit-input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 14px var(--accent-amber-glow);
  background: rgba(245, 158, 11, 0.06);
}

.pm-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pm-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}
.pm-btn-primary {
  background: linear-gradient(135deg, var(--accent-amber) 0%, #D97706 100%);
  color: #05070B;
}
.pm-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px var(--accent-amber-glow);
}
.pm-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.pm-btn-secondary:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

/* ==============================================================================
   MOBILE CARPLAY BOTTOM NAVIGATION (< 1024px)
   ============================================================================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
    padding: 6px 12px;
    z-index: 100;
    min-height: 56px;
    box-sizing: border-box;
    width: 100%;
  }
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-sans);
    letter-spacing: 0.03em;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    flex: 1;
    max-width: 90px;
    box-sizing: border-box;
  }
  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    transition: all var(--transition-fast);
  }
  .mobile-nav-item:hover,
  .mobile-nav-item:active {
    color: var(--text-primary);
  }
  .mobile-nav-item.active {
    color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.08);
  }
  .mobile-nav-item.active svg {
    stroke: var(--accent-amber);
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.45));
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .mobile-bottom-nav {
    display: none !important; /* Hide on landscape sim-rig phone mount to maximize telemetry */
  }
}

@media (max-width: 768px) {
  .cockpit-top-hud {
    padding: 6px 10px !important;
    min-height: 48px !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    gap: 6px !important;
  }
  .hud-context-group {
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }
  .hud-vehicle-capsule {
    padding: 3px 8px !important;
    max-width: 125px !important;
    gap: 5px !important;
    min-width: 0 !important;
  }
  .hud-car-name {
    font-size: 10px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .hud-live-pill {
    font-size: 8px !important;
    padding: 1px 4px !important;
  }
  .hud-clock-pill {
    padding: 2px 6px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }
  .hud-status-cluster {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .hud-btn-yt {
    padding: 5px 8px !important;
    font-size: 10px !important;
  }
  .hud-btn-yt span {
    display: none !important;
  }
  #headerPinChip {
    padding: 5px 7px !important;
    font-size: 10px !important;
  }
  #headerPinChip span {
    font-size: 9px !important;
  }
  #btnFullscreenToggle {
    padding: 5px 7px !important;
  }
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 54px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    z-index: 100 !important;
    padding: 4px 10px calc(4px + env(safe-area-inset-bottom, 0px)) 10px !important;
  }
}
