:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07090d;
  color: #f5f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #07090d;
}

button,
input {
  font: inherit;
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100svh;
  background: #05070a;
}

#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #121820;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.72)),
    url("./assets/car_race.png") center / cover no-repeat;
}

.menu-card,
.result-card {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(7, 10, 15, 0.88);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.menu-card {
  display: grid;
  gap: 12px;
}

.result-card {
  display: grid;
  gap: 14px;
  text-align: center;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
}

h2 {
  font-size: 1.85rem;
}

.field {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  outline: none;
  color: #f5f7fb;
  background: rgba(255, 255, 255, 0.08);
}

.field:focus {
  border-color: #ffcf4a;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  color: #120d02;
  background: #ffcf4a;
}

.secondary-button {
  color: #f5f7fb;
  background: rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.08);
}

.stack {
  display: grid;
  gap: 10px;
}

.note {
  margin: 0;
  color: rgba(245, 247, 251, 0.72);
  font-size: 0.9rem;
  line-height: 1.4;
}

.music-unlock {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  min-width: 156px;
  min-height: 46px;
}

.flash {
  position: absolute;
  top: 18px;
  left: 50%;
  width: min(760px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 8px;
  text-align: center;
  color: #fff;
  background: rgba(217, 42, 22, 0.88);
  font-size: clamp(1.05rem, 3vw, 1.65rem);
  font-weight: 900;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .menu-card,
  .result-card {
    padding: 18px;
  }
}
