.highway-assault-game {
  color: #eef7ff;
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(255, 162, 82, 0.16),
      transparent 29rem
    ),
    linear-gradient(160deg, #080d14 0%, #151922 50%, #0d1724 100%);
  border: 1px solid rgba(232, 190, 140, 0.22);
  border-radius: 8px;
  padding: clamp(1rem, 2vw, 1.5rem);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.highway-assault-game .eyebrow {
  color: #ffce88;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ha-hero,
.ha-layout,
.ha-panel-heading,
.ha-audio-controls,
.ha-control-stack,
.ha-action-grid,
.ha-dialog-actions,
.ha-badges,
.ha-status {
  display: flex;
  gap: 0.8rem;
}

.ha-hero {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ha-hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  margin: 0.18rem 0 0.4rem;
}

.ha-hero p {
  color: #cfc4b2;
  margin: 0;
  max-width: 62rem;
}

.ha-audio-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ha-hud {
  display: grid;
  grid-template-columns: repeat(12, minmax(4.5rem, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.ha-hud article,
.ha-side-panel,
.ha-play-panel,
.ha-status,
.ha-choice-panel,
.ha-instructions,
.ha-diagnostics,
.ha-reset-dialog {
  background: rgba(7, 11, 19, 0.78);
  border: 1px solid rgba(235, 196, 146, 0.2);
  border-radius: 8px;
}

.ha-hud article {
  min-height: 4rem;
  padding: 0.65rem;
}

.ha-hud span,
.ha-vehicle-card span,
.ha-vehicle-card small {
  color: #bfae98;
  display: block;
  font-size: 0.73rem;
  font-weight: 750;
  text-transform: uppercase;
}

.ha-hud strong {
  color: #ffffff;
  display: block;
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  line-height: 1.15;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
}

.ha-layout {
  align-items: flex-start;
}

.ha-side-panel {
  flex: 1 1 15rem;
  min-width: 14.5rem;
  padding: 0.9rem;
}

.ha-play-panel {
  flex: 2 1 38rem;
  min-width: 0;
  padding: 0.9rem;
}

.ha-panel-heading {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.ha-panel-heading h2,
.ha-choice-panel h3,
.ha-instructions h3 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
  margin: 0;
}

.badge {
  background: rgba(255, 206, 136, 0.13);
  border: 1px solid rgba(255, 206, 136, 0.3);
  border-radius: 999px;
  color: #fff3d8;
  display: inline-flex;
  font-weight: 800;
  padding: 0.32rem 0.62rem;
}

.ha-vehicle-grid,
.ha-choice-list,
.ha-achievement-list {
  display: grid;
  gap: 0.55rem;
}

.ha-vehicle-card,
.ha-choice-list button,
.ha-toggle,
.button,
.button-soft,
.button-danger {
  border-radius: 8px;
  min-height: 2.75rem;
}

.ha-vehicle-card,
.ha-choice-list button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(235, 196, 146, 0.22);
  color: #f7fbff;
  cursor: pointer;
  padding: 0.7rem;
  text-align: left;
}

.highway-assault-game button,
.highway-assault-game input,
.ha-canvas {
  touch-action: manipulation;
}

.highway-assault-game button:focus-visible,
.ha-toggle:focus-within {
  box-shadow: 0 0 0 3px rgba(143, 219, 255, 0.28);
  outline: 2px solid rgba(143, 219, 255, 0.72);
  outline-offset: 2px;
}

.ha-vehicle-card strong {
  display: block;
  font-size: 1rem;
}

.ha-vehicle-card.is-selected,
.ha-choice-list button:hover,
.ha-choice-list button:focus-visible,
.ha-vehicle-card:hover,
.ha-vehicle-card:focus-visible {
  border-color: #ffce88;
  box-shadow: 0 0 0 3px rgba(255, 206, 136, 0.18);
  outline: none;
}

.ha-vehicle-card[disabled],
.ha-choice-list button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.ha-control-stack {
  flex-direction: column;
  margin: 0.9rem 0;
}

.ha-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0.9rem;
}

.ha-action-grid > *,
.ha-control-stack > *,
.ha-audio-controls > * {
  flex: 1 1 auto;
}

.ha-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(235, 196, 146, 0.22);
  color: #fff5e6;
  display: flex;
  font-weight: 800;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
}

.ha-canvas-shell {
  --ha-stage-max-height: min(78vh, 900px);
  aspect-ratio: 2 / 3;
  background: #020714;
  border: 1px solid rgba(255, 206, 136, 0.24);
  border-radius: 8px;
  display: grid;
  margin: 0 auto;
  max-height: var(--ha-stage-max-height);
  max-width: 600px;
  overflow: hidden;
  place-items: center;
  touch-action: none;
  width: min(100%, calc(var(--ha-stage-max-height) * 2 / 3), 600px);
}

.ha-canvas {
  display: block;
  height: 100%;
  outline: none;
  user-select: none;
  width: 100%;
}

.ha-canvas:focus-visible {
  box-shadow: inset 0 0 0 4px rgba(255, 206, 136, 0.8);
}

.ha-status {
  align-items: center;
  margin-top: 0.8rem;
  padding: 0.75rem;
}

.ha-status-icon {
  align-items: center;
  background: rgba(255, 206, 136, 0.14);
  border: 1px solid rgba(255, 206, 136, 0.28);
  border-radius: 50%;
  color: #ffce88;
  display: inline-flex;
  flex: 0 0 2rem;
  font-weight: 900;
  height: 2rem;
  justify-content: center;
}

.ha-status strong {
  color: #ffffff;
}

.ha-status p,
.ha-choice-panel p,
.ha-instructions p {
  color: #d0c1ad;
  margin: 0.15rem 0 0;
}

.ha-choice-panel,
.ha-instructions,
.ha-diagnostics {
  margin-bottom: 0.8rem;
  padding: 0.8rem;
}

.ha-achievement-list {
  list-style: none;
  margin: 0.65rem 0 0;
  max-height: 16rem;
  overflow: auto;
  padding: 0;
}

.ha-achievement-list li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(235, 196, 146, 0.15);
  border-radius: 8px;
  padding: 0.5rem;
}

.ha-achievement-list li.is-complete {
  border-color: rgba(143, 255, 186, 0.38);
}

.ha-achievement-list strong,
.ha-achievement-list span {
  display: block;
}

.ha-achievement-list span {
  color: #bfae98;
  font-size: 0.78rem;
  margin-top: 0.12rem;
}

.ha-diagnostics pre {
  color: #c8f4ff;
  font-size: 0.78rem;
  margin: 0;
  max-height: 16rem;
  overflow: auto;
  white-space: pre-wrap;
}

.ha-reset-dialog {
  color: #eef7ff;
  max-width: 30rem;
  padding: 1.2rem;
}

.ha-reset-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.ha-reset-dialog h2 {
  margin-top: 0;
}

@media (max-width: 1240px) {
  .ha-hud {
    grid-template-columns: repeat(6, minmax(4.5rem, 1fr));
  }

  .ha-layout {
    flex-wrap: wrap;
  }

  .ha-play-panel {
    order: -1;
    flex-basis: 100%;
  }
}

@media (max-width: 700px) {
  .highway-assault-game {
    padding: 0.75rem;
  }

  .ha-hero,
  .ha-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ha-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ha-side-panel,
  .ha-play-panel {
    flex-basis: 100%;
    min-width: 0;
  }

  .ha-canvas-shell {
    --ha-stage-max-height: 76vh;
  }

  .ha-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ha-action-grid .button-soft,
  .ha-control-stack .button,
  .ha-control-stack .button-soft {
    min-height: 3.25rem;
  }

  .ha-choice-list {
    max-height: min(52vh, 28rem);
    overflow: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .highway-assault-game *,
  .highway-assault-game *::before,
  .highway-assault-game *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
