* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --bg: #0b1118;
  --panel: #131e29;
  --panel2: #1a2937;
  --line: #2b3d4d;
  --text: #f4f7fa;
  --muted: #b2c0cd;
  --gold: #f5c451;
  --blue: #1d79d8;
}
body {
  margin: 0; background: radial-gradient(ellipse at top, #182b3b 0%, var(--bg) 58%);
  color: var(--text); font-family: Inter, "Segoe UI", Arial, sans-serif; min-height: 100vh;
}
.site-header { text-align: center; padding: 30px 18px 22px; }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 1.7px; }
h1 { font-size: clamp(27px, 4vw, 42px); line-height: 1.1; margin: 10px 0; text-transform: uppercase; }
.site-header p, .section-heading p { color: var(--muted); margin: 0; }
.container { width: min(1200px, calc(100% - 28px)); margin: 0 auto 40px; }
.player-panel, .routes-section { background: rgba(19,30,41,.94); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.player-panel { margin-bottom: 22px; }
.player-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.small-label { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--gold); }
.player-heading h2, .section-heading h2 { margin: 4px 0 0; font-size: 20px; }
.secondary-btn { border: 1px solid #53697b; background: #233747; color: white; padding: 10px 13px; border-radius: 9px; font-weight: 700; cursor: pointer; }
.secondary-btn:disabled { opacity: .45; cursor: not-allowed; }
.player-frame { position: relative; display: flex; align-items: center; justify-content: center; background: #05090d; border-radius: 12px; min-height: 260px; overflow: hidden; }
video { display: block; width: 100%; max-height: 72vh; aspect-ratio: 9 / 16; object-fit: contain; background: #05090d; }
.empty-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--muted); pointer-events: none; text-align: center; padding: 20px; }
.empty-state strong { color: white; font-size: 18px; }
.play-mark { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--gold); color: #14202b; font-size: 23px; padding-left: 4px; }
.video-error { color: #ffb3a8; font-size: 13px; margin-top: 9px; }
.route-count { white-space: nowrap; color: var(--gold); font-size: 11px; font-weight: 800; border: 1px solid #725e2c; border-radius: 999px; padding: 7px 10px; }
.route-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.route-card { border: 1px solid #304556; background: var(--panel2); border-radius: 12px; overflow: hidden; padding: 0; color: white; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.route-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.route-card.active { border: 2px solid var(--gold); background: #263d4d; }
.thumb { position: relative; aspect-ratio: 9 / 16; background: linear-gradient(145deg, #263f53, #0d1720); display: grid; place-items: center; overflow: hidden; }
.thumb video { width: 100%; height: 100%; max-height: none; object-fit: cover; opacity: .62; pointer-events: none; }
.thumb-placeholder { display: flex; flex-direction: column; align-items: center; gap: 9px; color: #c9d6e0; font-size: 12px; letter-spacing: .8px; }
.map-icon { font-size: 34px; }
.play-overlay { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #12202b; font-size: 16px; box-shadow: 0 4px 16px #0008; }
.route-info { display: flex; gap: 10px; align-items: center; padding: 11px; }
.route-number { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #31495b; color: var(--gold); font-weight: 900; font-size: 12px; }
.route-name { font-weight: 750; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
footer { text-align: center; color: #899aa8; padding: 0 18px 24px; font-size: 12px; }
@media (min-width: 850px) {
  .player-panel { display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-rows: auto 1fr auto; column-gap: 18px; align-items: start; }
  .player-heading { grid-column: 1 / -1; }
  .player-frame { grid-column: 1; grid-row: 2; }
  .player-frame video { max-height: 68vh; }
  .video-error { grid-column: 1 / -1; }
  .empty-state { position: absolute; }
}
@media (max-width: 560px) {
  .route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .site-header { padding-top: 24px; }
  .player-panel, .routes-section { padding: 11px; border-radius: 13px; }
  .player-heading h2, .section-heading h2 { font-size: 17px; }
  .secondary-btn { padding: 8px 9px; font-size: 12px; }
  .route-name { font-size: 12px; }
  .route-info { padding: 8px; gap: 7px; }
}
