.driving-game-header {
  background-image: linear-gradient(rgba(7, 17, 29, .68), rgba(7, 17, 29, .68)), url("/assets/games/driving/road-level-1-neon.png");
  background-position: center 28%;
}

.driving-game-page {
  padding: 24px 0 72px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
}

.driving-game-heading {
  max-width: 900px;
}

.driving-layout {
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(260px, 360px);
  gap: 24px;
  align-items: start;
  justify-content: center;
}

.driving-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #07111d;
  box-shadow: 0 22px 46px rgba(7, 17, 29, .18);
  aspect-ratio: 2 / 3;
}

.driving-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

.driving-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.driving-hud div {
  min-width: 116px;
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(7, 17, 29, .78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.driving-hud span {
  display: block;
  color: #f5a623;
  font-family: "Barlow Condensed", sans-serif;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.driving-hud strong {
  display: block;
  color: #ffffff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
}

.driving-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 17, 29, .58);
}

.driving-overlay.is-visible {
  display: flex;
}

.driving-panel,
.driving-card {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(7, 17, 29, .12);
}

.driving-panel {
  width: min(100%, 420px);
  padding: 26px;
  text-align: center;
}

.driving-kicker {
  display: block;
  margin-bottom: 6px;
  color: #1479d4;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.driving-panel h3,
.driving-card h3 {
  margin: 0 0 10px;
  font-size: 1.55rem;
}

.driving-panel p,
.driving-card p {
  margin: 0 0 18px;
  color: #4a5568;
}

.driving-panel .btn {
  width: 100%;
}

.driving-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.driving-club-select {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  text-align: left;
}

.driving-club-select span {
  color: #111820;
  font-size: .88rem;
  font-weight: 800;
}

.driving-club-select select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  color: #111820;
  background: #ffffff;
  font-weight: 700;
}

.driving-form-message {
  min-height: 1.35em;
  margin-bottom: 12px !important;
  color: #7a5300 !important;
  font-size: .92rem;
  font-weight: 700;
}

.driving-sidebar {
  display: grid;
  gap: 18px;
}

.driving-card {
  padding: 20px;
}

.driving-leaderboard {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.driving-leaderboard li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
  color: #111820;
  font-weight: 800;
}

.driving-leaderboard li:last-child {
  border-bottom: 0;
}

.driving-leaderboard .driving-empty {
  display: block;
  color: #4a5568;
  font-weight: 700;
}

.driving-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #ffffff;
  background: #0d5ea8;
  font-family: "Barlow Condensed", sans-serif;
}

.driving-score {
  color: #1479d4;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.25rem;
}

.driving-stats {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
}

.driving-stats div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.driving-stats dt {
  color: #667085;
  font-size: .88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.driving-stats dd {
  margin: 0;
  color: #111820;
  font-weight: 800;
}

.driving-note {
  margin-bottom: 0 !important;
  font-size: .94rem;
}

.driving-privacy-link {
  color: #0d5ea8;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.driving-game-active {
  overscroll-behavior: none;
}

@media (min-width: 992px) {
  .driving-game-header {
    margin-bottom: 0;
    padding: 156px 0 36px;
  }

  .driving-game-header h2 {
    margin-bottom: 10px;
    padding-bottom: 10px;
    font-size: clamp(2.6rem, 4.4vw, 3.7rem);
  }

  .driving-game-header p {
    max-width: 720px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .driving-game-page {
    padding-top: 18px;
  }

  .driving-game-heading {
    max-width: 760px;
    margin-bottom: 18px;
    text-align: left;
  }

  .driving-game-heading p {
    margin-bottom: 2px;
    font-size: 1rem;
  }

  .driving-game-heading h2 {
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    line-height: 1.08;
  }

  .driving-game-heading span {
    display: block;
    max-width: 720px;
    line-height: 1.45;
  }

  .driving-stage {
    width: min(100%, 420px);
    height: min(58vh, 560px);
    aspect-ratio: auto;
  }
}

@media (max-width: 991.98px) {
  .driving-layout {
    grid-template-columns: 1fr;
  }

  .driving-stage {
    max-width: 640px;
  }
}

@media (max-width: 575.98px) {
  .driving-game-page {
    padding-bottom: 42px;
  }

  .driving-layout {
    gap: 16px;
  }

  .driving-stage {
    border-radius: 0;
    margin-left: -15px;
    width: calc(100% + 30px);
  }

  .driving-hud {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .driving-hud div {
    min-width: 92px;
    padding: 7px 9px;
  }

  .driving-panel {
    padding: 20px;
  }

  .driving-action-row {
    grid-template-columns: 1fr;
  }

  .driving-card {
    padding: 18px;
  }
}
