    :root {
      --neon-cyan: #00f5ff;
      --neon-yellow: #ffe600;
      --neon-red: #ff2d55;
      --neon-green: #39ff14;
      --neon-orange: #ff6a00;
      --dark-bg: #050a0f;
      --road-dark: #111820;
      --road-mid: #1a2530;
      --lane-line: #ffe600;
      --panel-bg: rgba(0, 20, 35, 0.92);
    }

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

    body {
      background: var(--dark-bg);
      font-family: 'Orbitron', monospace;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      min-height: 100vh;
      height: 100vh;
      overflow: hidden;
      color: #fff;
      transition: background 1.5s ease;
    }

    body.day-mode {
      --dark-bg: #87CEEB;
      --panel-bg: rgba(200, 230, 255, 0.92);
      --neon-cyan: #0077aa;
      --neon-yellow: #ff9900;
      --neon-red: #cc0022;
      --neon-green: #007700;
      background: linear-gradient(180deg, #87CEEB 0%, #b0e0f5 100%);
    }

    #starfield {
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
    }

    #game-wrapper {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 10px 0 10px;
      width: 420px;
      max-width: 100vw;
      height: 100vh;
      overflow: hidden;
    }

    #hud {
      width: 420px;
      max-width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 16px;
      background: var(--panel-bg);
      border: 1px solid var(--neon-cyan);
      border-radius: 6px;
      box-shadow: 0 0 18px rgba(0, 245, 255, 0.25);
      flex-wrap: wrap;
      gap: 6px;
      flex-shrink: 0;
      box-sizing: border-box;
    }

    .hud-block {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }

    .hud-label {
      font-size: 9px;
      color: var(--neon-cyan);
      letter-spacing: 2px;
      opacity: 0.7;
    }

    .hud-value {
      font-size: 20px;
      font-weight: 900;
      color: var(--neon-yellow);
      text-shadow: 0 0 10px var(--neon-yellow);
      font-family: 'Share Tech Mono', monospace;
    }

    /* ── Boost bar ── */
    #boost-bar-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }

    #boost-bar {
      width: 80px;
      height: 6px;
      background: #0a1a25;
      border-radius: 3px;
      border: 1px solid var(--neon-orange);
      overflow: hidden;
    }

    #boost-fill {
      height: 100%;
      width: 100%;
      background: linear-gradient(90deg, #ff6a00, #ffe600);
      border-radius: 3px;
      transition: width 0.15s ease;
    }

    .boost-ready #boost-fill {
      animation: boostPulse 0.7s ease-in-out infinite;
    }

    @keyframes boostPulse {

      0%,
      100% {
        box-shadow: 0 0 4px #ff6a00;
      }

      50% {
        box-shadow: 0 0 14px #ff6a00;
      }
    }

    /* ── Combo badge ── */
    #combo-display {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      min-width: 44px;
    }

    #combo-count {
      font-size: 20px;
      font-weight: 900;
      color: var(--neon-green);
      text-shadow: 0 0 10px var(--neon-green);
      font-family: 'Share Tech Mono', monospace;
      transition: transform 0.1s;
    }

    #combo-count.pop {
      transform: scale(1.4);
    }

    /* ── Powerup HUD icons ── */
    #powerup-hud {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .pu-icon {
      width: 32px;
      height: 32px;
      border-radius: 4px;
      border: 2px solid transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      opacity: 0.3;
      transition: all 0.3s;
    }

    .pu-icon.active {
      opacity: 1;
      animation: puPulse 0.8s ease-in-out infinite;
    }

    .pu-icon.shield {
      border-color: #00f5ff;
      background: rgba(0, 245, 255, 0.15);
    }

    .pu-icon.slow {
      border-color: #af52de;
      background: rgba(175, 82, 222, 0.15);
    }

    .pu-icon.multi {
      border-color: #ffe600;
      background: rgba(255, 230, 0, 0.15);
    }

    @keyframes puPulse {

      0%,
      100% {
        box-shadow: 0 0 6px currentColor;
      }

      50% {
        box-shadow: 0 0 18px currentColor;
      }
    }

    /* ── Day/Night ── */
    #daynight-btn {
      padding: 5px 12px;
      background: transparent;
      border: 1px solid var(--neon-cyan);
      border-radius: 20px;
      color: var(--neon-cyan);
      font-family: 'Share Tech Mono', monospace;
      font-size: 11px;
      cursor: pointer;
      letter-spacing: 1px;
      transition: all 0.2s;
    }

    #daynight-btn:hover {
      background: rgba(0, 245, 255, 0.15);
    }

    /* ── Color picker ── */
    #color-picker-row {
      width: 420px;
      max-width: 100%;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      background: var(--panel-bg);
      border: 1px solid rgba(0, 245, 255, 0.3);
      border-radius: 6px;
      overflow-x: auto;
      flex-shrink: 0;
      box-sizing: border-box;
    }

    #color-picker-row span {
      font-size: 9px;
      color: var(--neon-cyan);
      letter-spacing: 2px;
      opacity: 0.7;
      white-space: nowrap;
    }

    .color-swatch {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all 0.15s;
      flex-shrink: 0;
    }

    .color-swatch:hover {
      transform: scale(1.2);
    }

    .color-swatch.selected {
      border-color: #fff;
      box-shadow: 0 0 8px #fff;
    }

    /* ── Canvas ── */
    #canvas-container {
      position: relative;
      width: 100%;
      height: 100%;
      flex: 1 1 auto;
      min-height: 0;
      box-sizing: border-box;
    }

    #gameCanvas {
      display: block;
      width: 100%;
      height: 100%;
      border: 2px solid var(--neon-cyan);
      border-radius: 4px;
      box-shadow: 0 0 30px rgba(0, 245, 255, 0.3), 0 0 60px rgba(0, 245, 255, 0.1);
      cursor: none;
    }

    /* boost glow on canvas when active */
    #gameCanvas.boosting {
      border-color: var(--neon-orange);
      box-shadow: 0 0 30px rgba(255, 106, 0, 0.6), 0 0 60px rgba(255, 106, 0, 0.25);
    }

    /* ── Overlays ── */
    .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      background: rgba(5, 10, 15, 0.88);
      border-radius: 2px;
      z-index: 10;
      backdrop-filter: blur(4px);
      padding: 20px;
      box-sizing: border-box;
    }

    .overlay.hidden {
      display: none;
    }

    .overlay-title {
      font-size: 42px;
      font-weight: 900;
      letter-spacing: 6px;
      text-transform: uppercase;
      line-height: 1;
    }

    .glow-cyan {
      color: var(--neon-cyan);
      text-shadow: 0 0 20px var(--neon-cyan), 0 0 50px rgba(0, 245, 255, 0.4);
    }

    .glow-red {
      color: var(--neon-red);
      text-shadow: 0 0 20px var(--neon-red), 0 0 50px rgba(255, 45, 85, 0.4);
    }

    .glow-yellow {
      color: var(--neon-yellow);
      text-shadow: 0 0 15px var(--neon-yellow);
    }

    .overlay-sub {
      font-size: clamp(10px, 2.5vw, 12px);
      letter-spacing: 2px;
      color: rgba(255, 255, 255, 0.6);
      font-family: 'Share Tech Mono', monospace;
      max-width: 100%;
      text-align: center;
      white-space: nowrap;
      position: absolute;
      bottom: 4px;
      left: 50%;
      transform: translateX(-50%);
    }

    .overlay-score-display {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      padding: 14px 28px;
      border: 1px solid rgba(0, 245, 255, 0.3);
      border-radius: 4px;
      background: rgba(0, 245, 255, 0.04);
    }

    .overlay-score-label {
      font-size: 10px;
      letter-spacing: 3px;
      color: var(--neon-cyan);
      opacity: 0.6;
    }

    .overlay-score-value {
      font-size: 46px;
      font-weight: 900;
      color: #fff;
      font-family: 'Share Tech Mono', monospace;
    }

    .overlay-best {
      font-size: 11px;
      color: var(--neon-green);
      letter-spacing: 2px;
      text-shadow: 0 0 8px var(--neon-green);
    }

    /* game-over stat row */
    .stat-row {
      display: flex;
      gap: 28px;
      align-items: flex-start;
      font-family: 'Share Tech Mono', monospace;
    }

    .stat-cell {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }

    .stat-label {
      font-size: 9px;
      letter-spacing: 2px;
      color: var(--neon-cyan);
      opacity: 0.6;
    }

    .stat-val {
      font-size: 18px;
      font-weight: 700;
      color: var(--neon-yellow);
      text-shadow: 0 0 8px var(--neon-yellow);
    }

    .race-btn {
      padding: 14px 44px;
      font-family: 'Orbitron', monospace;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 4px;
      text-indent: 4px;
      text-transform: uppercase;
      background: transparent;
      color: var(--neon-cyan);
      border: 2px solid var(--neon-cyan);
      border-radius: 4px;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      transition: all 0.2s;
      box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
      display: inline-flex;
      justify-content: center;
      align-items: center;
    }

    .race-btn::before {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--neon-cyan);
      transform: translateX(-100%);
      transition: transform 0.25s ease;
      z-index: -1;
    }

    .race-btn:hover {
      color: var(--dark-bg);
      box-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
    }

    .race-btn:hover::before {
      transform: translateX(0);
    }

    .race-btn:active {
      transform: scale(0.97);
    }

    .controls-hint {
      display: flex;
      gap: 20px;
      align-items: center;
    }

    .key-hint {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      font-size: 10px;
      color: rgba(255, 255, 255, 0.4);
      letter-spacing: 2px;
      font-family: 'Share Tech Mono', monospace;
    }

    .key-box {
      width: 34px;
      height: 34px;
      border: 1px solid rgba(0, 245, 255, 0.4);
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      color: rgba(0, 245, 255, 0.7);
      background: rgba(0, 245, 255, 0.05);
    }

    /* ── Mobile controls ── */
    #mobile-controls {
      width: 420px;
      max-width: 100%;
      display: flex;
      justify-content: space-between;
      padding: 0 20px;
      flex-shrink: 0;
      box-sizing: border-box;
    }

    .mob-btn {
      width: 80px;
      height: 50px;
      background: rgba(0, 245, 255, 0.08);
      border: 2px solid var(--neon-cyan);
      border-radius: 6px;
      color: var(--neon-cyan);
      font-size: 24px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.1s;
      box-shadow: 0 0 10px rgba(0, 245, 255, 0.15);
    }

    .mob-btn:active {
      background: rgba(0, 245, 255, 0.2);
    }

    /* Boost button — centre mobile */
    #boostBtn {
      width: 80px;
      height: 50px;
      background: rgba(255, 106, 0, 0.12);
      border: 2px solid var(--neon-orange);
      border-radius: 6px;
      color: var(--neon-orange);
      font-size: 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.1s;
      box-shadow: 0 0 10px rgba(255, 106, 0, 0.15);
      font-family: 'Share Tech Mono', monospace;
      letter-spacing: 1px;
    }

    #boostBtn:active,
    #boostBtn.pressed {
      background: rgba(255, 106, 0, 0.3);
    }

    /* ── FX ── */
    #crash-flash {
      position: absolute;
      inset: 0;
      background: var(--neon-red);
      opacity: 0;
      pointer-events: none;
      z-index: 20;
      border-radius: 2px;
      transition: opacity 0.05s;
    }

    #boost-flash {
      position: absolute;
      inset: 0;
      background: var(--neon-orange);
      opacity: 0;
      pointer-events: none;
      z-index: 19;
      border-radius: 2px;
      transition: opacity 0.12s;
    }

    #scanlines {
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(to bottom, transparent, transparent 2px, rgba(0, 0, 0, 0.07) 2px, rgba(0, 0, 0, 0.07) 4px);
      pointer-events: none;
      z-index: 5;
      border-radius: 2px;
    }

    #pu-toast {
      position: absolute;
      top: 12px;
      left: 50%;
      transform: translateX(-50%);
      padding: 6px 18px;
      border-radius: 20px;
      font-size: 12px;
      letter-spacing: 3px;
      font-family: 'Share Tech Mono', monospace;
      pointer-events: none;
      z-index: 15;
      opacity: 0;
      transition: opacity 0.3s;
    }

    #pu-toast.show {
      opacity: 1;
    }

    #multi-badge {
      position: absolute;
      top: 8px;
      right: 8px;
      font-family: 'Share Tech Mono', monospace;
      font-size: 20px;
      font-weight: bold;
      color: var(--neon-yellow);
      text-shadow: 0 0 12px var(--neon-yellow);
      display: none;
      z-index: 12;
      pointer-events: none;
    }

    /* ── Near-miss splash ── */
    #nearmiss-splash {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.6);
      font-family: 'Orbitron', monospace;
      font-size: 22px;
      font-weight: 900;
      letter-spacing: 4px;
      color: var(--neon-green);
      text-shadow: 0 0 20px var(--neon-green);
      pointer-events: none;
      z-index: 16;
      opacity: 0;
      transition: opacity 0.1s, transform 0.1s;
      white-space: nowrap;
    }

    #nearmiss-splash.show {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }

    /* ── Logo / Start screen ── */
    .logo-line1 {
      font-size: clamp(32px, 8vw, 46px);
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 6px;
      text-indent: 6px;
      color: var(--neon-cyan);
      text-shadow: 0 0 20px var(--neon-cyan), 0 0 60px rgba(0, 245, 255, 0.3);
      animation: logoPulse 2s ease-in-out infinite;
      max-width: 100%;
      text-align: center;
      word-wrap: break-word;
    }

    .logo-line2 {
      font-size: 16px;
      letter-spacing: 8px;
      color: var(--neon-yellow);
      text-shadow: 0 0 10px var(--neon-yellow);
      margin-top: -8px;
    }

    @keyframes logoPulse {

      0%,
      100% {
        text-shadow: 0 0 20px var(--neon-cyan), 0 0 60px rgba(0, 245, 255, 0.3);
      }

      50% {
        text-shadow: 0 0 30px var(--neon-cyan), 0 0 80px rgba(0, 245, 255, 0.5), 0 0 120px rgba(0, 245, 255, 0.2);
      }
    }

    #new-record {
      font-size: 13px;
      letter-spacing: 4px;
      color: var(--neon-green);
      text-shadow: 0 0 12px var(--neon-green);
      animation: blink 0.6s step-end infinite;
      display: none;
    }

    @keyframes blink {
      50% {
        opacity: 0;
      }
    }

    /* ── Day mode ── */
    body.day-mode #hud {
      box-shadow: 0 0 18px rgba(0, 120, 200, 0.25);
    }

    body.day-mode #gameCanvas {
      border-color: #0077aa;
      box-shadow: 0 0 20px rgba(0, 120, 200, 0.3);
    }

    /* ── Responsive ── */
    @media (max-width: 480px) {
      body {
        overflow: hidden;
        height: 100dvh;
      }

      #game-wrapper {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        padding: 6px 8px 0 8px;
        gap: 4px;
        overflow: hidden;
      }

      #hud {
        width: 100%;
        max-width: 100%;
        padding: 6px 10px;
        flex-shrink: 0;
      }

      #color-picker-row {
        width: 100%;
        max-width: 100%;
        padding: 5px 10px;
        flex-shrink: 0;
      }

      #canvas-container {
        width: 100%;
        max-width: 100%;
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        aspect-ratio: unset;
      }

      #gameCanvas {
        width: 100%;
        height: 100%;
        display: block;
      }

      #mobile-controls {
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 0 12px;
        flex-shrink: 0;
        margin-top: 4px;
        margin-bottom: env(safe-area-inset-bottom, 10px);
        padding-bottom: 8px;
      }

      .mob-btn {
        width: 64px;
        height: 48px;
        font-size: 20px;
      }

      #boostBtn {
        width: 64px;
        height: 48px;
        font-size: 14px;
      }

      .overlay {
        gap: 8px;
        padding: 10px 8px;
        box-sizing: border-box;
        overflow: hidden;
      }

      .overlay-title,
      .logo-line1 {
        font-size: 32px;
        letter-spacing: 4px;
      }

      .logo-line2 {
        font-size: 11px;
        letter-spacing: 4px;
      }

      .race-btn {
        width: 90%;
        max-width: 280px;
        padding: 11px 20px;
      }

      .overlay-score-value {
        font-size: 34px;
      }
    }
