
    *, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
    :root {
      --blue-ctr: #0057B8;
      --blue-dark: #003366;
      --red-accent: #E30613;
      --bg-dark: #0a0a0f;
      --bg-card: #111118;
      --text: #f0f0f5;
      --text-muted: #8888a0;
    }
    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg-dark);
      color: var(--text);
      overflow-x: hidden;
    }

    /* NAV BAR */
    .nav {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: .75rem 2rem;
      background: rgba(10,10,15,.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(255,255,255,.06);
    }
    .nav-brand {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 1.3rem;
      color: var(--text);
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: .6rem;
    }
    .nav-brand .blue { color: var(--blue-ctr); }
    .nav-brand .red { color: var(--red-accent); }
    .nav-back {
      color: var(--text-muted);
      text-decoration: none;
      font-size: .85rem;
      display: flex;
      align-items: center;
      gap: .4rem;
      transition: color .2s;
    }
    .nav-back:hover { color: var(--blue-ctr); }

    /* MAP FULL */
    .map-wrapper {
      position: absolute;
      top: 52px;
      left: 0;
      right: 0;
      bottom: 0;
    }
    #trip-map {
      width: 100% !important;
      height: 100% !important;
      display: block !important;
    }

    /* INFO PANEL */
    .info-panel {
      position: fixed;
      bottom: 2rem;
      left: 2rem;
      z-index: 1000;
      background: rgba(17,17,24,.92);
      backdrop-filter: blur(16px);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 16px;
      padding: 1.5rem;
      max-width: 380px;
      box-shadow: 0 16px 48px rgba(0,0,0,.5);
    }
    .info-panel h2 {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 1.6rem;
      margin-bottom: .25rem;
    }
    .info-panel .route-subtitle {
      color: var(--text-muted);
      font-size: .85rem;
      margin-bottom: 1rem;
    }
    .stats-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: .75rem;
    }
    .stat {
      text-align: center;
      background: rgba(255,255,255,.04);
      border-radius: 10px;
      padding: .65rem .5rem;
    }
    .stat .val {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 1.4rem;
      color: var(--blue-ctr);
      line-height: 1;
    }
    .stat .lbl {
      font-size: .65rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-top: .2rem;
    }

    /* Elevation chart */
    .elevation-chart {
      margin-top: 1rem;
      position: relative;
      height: 80px;
      background: rgba(255,255,255,.03);
      border-radius: 10px;
      overflow: hidden;
      cursor: crosshair;
    }
    .elevation-chart canvas {
      width: 100%;
      height: 100%;
    }
    .elevation-label {
      display: flex;
      justify-content: space-between;
      font-size: .6rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-top: .35rem;
    }

    /* Marker tooltip */
    .elev-tooltip {
      position: fixed;
      z-index: 2000;
      pointer-events: none;
      background: rgba(17,17,24,.95);
      border: 1px solid var(--blue-ctr);
      border-radius: 8px;
      padding: .35rem .65rem;
      font-size: .75rem;
      color: var(--text);
      white-space: nowrap;
      display: none;
    }

    /* Leaflet dark tiles */
    .leaflet-tile-pane { filter: brightness(.7) contrast(1.2) saturate(.8); }
    .leaflet-popup-content-wrapper {
      background: var(--bg-card) !important;
      color: var(--text) !important;
      border-radius: 10px !important;
    }
    .leaflet-popup-tip { background: var(--bg-card) !important; }
    .leaflet-popup-content { font-family: 'Inter', sans-serif !important; }

    /* Legend */
    .legend {
      display: flex;
      gap: 1rem;
      margin-top: .75rem;
      flex-wrap: wrap;
    }
    .legend-item {
      display: flex;
      align-items: center;
      gap: .35rem;
      font-size: .7rem;
      color: var(--text-muted);
    }
    .legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }
    .legend-line {
      width: 20px;
      height: 3px;
      border-radius: 2px;
    }

    @media (max-width: 600px) {
      .info-panel {
        left: .75rem;
        right: .75rem;
        bottom: .75rem;
        max-width: none;
        padding: 1rem;
      }
      .stats-row { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
    }
  
    /* Video Panel */
    .video-panel {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      z-index: 1000;
      width: 420px;
      background: rgba(17,17,24,.95);
      backdrop-filter: blur(16px);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 16px 48px rgba(0,0,0,.6);
      transform: translateY(calc(100% + 3rem));
      opacity: 0;
      transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .4s ease;
    }
    .video-panel.visible {
      transform: translateY(0);
      opacity: 1;
    }
    .video-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: .6rem 1rem;
      border-bottom: 1px solid rgba(255,255,255,.06);
    }
    .video-title {
      display: flex;
      align-items: center;
      gap: .5rem;
      font-size: .7rem;
      font-weight: 600;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .video-title svg { animation: pulse 2s infinite; }
    @keyframes pulse {
      0%,100% { opacity:1; }
      50% { opacity:.3; }
    }
    .video-part-label {
      font-size: .65rem;
      color: var(--text-muted);
      letter-spacing: .04em;
      flex: 1;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .video-controls {
      display: flex;
      align-items: center;
      gap: .25rem;
    }
    .video-btn {
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      padding: .35rem;
      border-radius: 6px;
      transition: background .2s, color .2s;
      display: flex;
      align-items: center;
    }
    .video-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }

    /* Fullscreen mode */
    .video-panel.fullscreen {
      inset: 0;
      width: 100%;
      max-width: 100%;
      height: 100%;
      border-radius: 0;
      border: none;
      display: flex;
      flex-direction: column;
    }
    .video-panel.fullscreen .video-embed {
      flex: 1;
      padding-top: 0;
    }
    .video-panel.fullscreen .video-embed iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }
    .video-panel.fullscreen .video-hint { display: none; }
    .video-embed {
      position: relative;
      width: 100%;
      padding-top: 56.25%;
    }
    .video-embed iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }
    .video-hint {
      text-align: center;
      padding: .5rem;
      font-size: .7rem;
      color: var(--text-muted);
    }

    /* Elevation scrubber */
    .elev-scrubber {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 2px;
      background: #fff;
      display: none;
      pointer-events: none;
      box-shadow: 0 0 6px rgba(255,255,255,.5);
      transition: left .3s ease;
    }

    /* Position marker pulse */
    .position-marker div {
      animation: marker-pulse 2s ease-in-out infinite;
    }
    @keyframes marker-pulse {
      0%,100% { box-shadow: 0 0 0 4px rgba(0,87,184,.4), 0 2px 12px rgba(0,0,0,.5); }
      50% { box-shadow: 0 0 0 8px rgba(0,87,184,.2), 0 2px 12px rgba(0,0,0,.5); }
    }

    @media (max-width: 600px) {
      .video-panel {
        left: .75rem;
        right: .75rem;
        bottom: .75rem;
        width: auto;
      }
    }

    /* Car marker */
    .car-marker {
      transition: transform .3s linear !important;
      filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
    }

    /* HUD */
    .hud {
      position: fixed;
      top: 68px;
      right: 2rem;
      z-index: 10000;
      background: rgba(10,10,15,.88);
      backdrop-filter: blur(14px);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 14px;
      padding: .75rem 1rem;
      box-shadow: 0 8px 32px rgba(0,0,0,.4);
      opacity: 1;
    }
    .hud-row {
      display: flex;
      gap: 1.25rem;
    }
    .hud-item {
      text-align: center;
      min-width: 60px;
    }
    .hud-val {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 1.8rem;
      line-height: 1;
      color: var(--text);
    }
    .hud-unit {
      font-size: .55rem;
      font-weight: 600;
      color: var(--text-muted);
      letter-spacing: .1em;
      text-transform: uppercase;
      margin-top: .15rem;
    }
    .hud-speed-wrap .hud-val {
      color: #22c55e;
      font-size: 2.2rem;
    }
    .hud-speed-bar-bg {
      width: 100%;
      height: 3px;
      background: rgba(255,255,255,.08);
      border-radius: 3px;
      margin-top: .35rem;
      overflow: hidden;
    }
    .hud-speed-bar {
      height: 100%;
      width: 0%;
      border-radius: 3px;
      background: #22c55e;
      transition: width .3s ease, background .3s ease;
    }
    .hud-part {
      text-align: center;
      font-size: .6rem;
      color: var(--text-muted);
      margin-top: .5rem;
      letter-spacing: .06em;
    }

    /* Play Trip button */
    .play-btn {
      position: fixed;
      top: 68px;
      left: 50%;
      transform: translateX(-50%) translateY(48px);
      z-index: 10000;
      display: flex;
      align-items: center;
      gap: .5rem;
      padding: .65rem 1.5rem;
      background: var(--red-accent);
      color: #fff;
      border: none;
      border-radius: 100px;
      font-family: 'Inter', sans-serif;
      font-weight: 700;
      font-size: .85rem;
      cursor: pointer;
      box-shadow: 0 4px 24px rgba(227,6,19,.4);
      transition: all .3s ease;
    }
    .play-btn:hover {
      background: #ff1a2d;
      transform: translateX(-50%) translateY(48px) scale(1.05);
      box-shadow: 0 6px 32px rgba(227,6,19,.55);
    }
    .play-btn.playing {
      background: rgba(255,255,255,.12);
      box-shadow: 0 4px 16px rgba(0,0,0,.3);
      border: 1px solid rgba(255,255,255,.15);
    }
    .play-btn.playing:hover {
      background: rgba(255,255,255,.2);
      transform: translateX(-50%) translateY(48px) scale(1.05);
    }

    @media (max-width: 600px) {
      .hud {
        right: .75rem;
        top: 56px;
      }
      .hud-val { font-size: 1.4rem; }
      .hud-speed-wrap .hud-val { font-size: 1.6rem; }
      .play-btn {
        font-size: .75rem;
        padding: .55rem 1.2rem;
      }
    }

    /* Route click hint */
    .route-hint {
      position: fixed;
      top: 68px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 10000;
      display: flex;
      align-items: center;
      gap: .5rem;
      background: rgba(17,17,24,.88);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(0,87,184,.3);
      border-radius: 100px;
      padding: .55rem 1.25rem;
      font-size: .8rem;
      font-weight: 500;
      color: var(--text);
      white-space: nowrap;
      box-shadow: 0 4px 24px rgba(0,0,0,.4);
      animation: hint-fade-in .6s ease, hint-bob 3s ease-in-out 1s infinite;
      transition: opacity .4s ease, transform .4s ease;
    }
    .route-hint svg { color: var(--blue-ctr); flex-shrink: 0; }
    .route-hint.hidden {
      opacity: 0;
      transform: translateX(-50%) translateY(-12px);
      pointer-events: none;
    }
    @keyframes hint-fade-in {
      from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
      to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }
    @keyframes hint-bob {
      0%,100% { transform: translateX(-50%) translateY(0); }
      50% { transform: translateX(-50%) translateY(4px); }
    }
    @media (max-width: 600px) {
      .route-hint { font-size: .7rem; padding: .45rem 1rem; }
    }
