.menu {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 3vmin;
  height: 100vh;
  padding: 3vmin 5vmin;
  background:
    radial-gradient(120vmin 80vmin at 15% 0%, rgb(92 141 255 / 18%), transparent 65%),
    radial-gradient(110vmin 70vmin at 100% 100%, rgb(255 79 94 / 11%), transparent 65%),
    var(--arcade-background);
  transition: opacity 180ms ease-out;
}

/* Faint scanlines, for the feel of a tube screen. */
.menu::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / 16%) 2px 4px);
}

.is-launching .menu {
  opacity: 0;
}

.menu-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4vmin;
}

.cabinet-name {
  margin: 0;
  color: var(--arcade-gold);
  font-size: 7vmin;
  letter-spacing: 0.14em;
  text-shadow: 0 0 3vmin rgb(255 209 102 / 55%);
}

.attract-prompt {
  margin: 0;
  color: var(--arcade-text);
  font-size: 3vmin;
  font-weight: bold;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 5vmin;
  align-items: center;
  min-height: 0;
}

.featured[hidden] {
  display: none;
}

.featured-cover {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  border: 0.5vmin solid var(--arcade-system);
  border-radius: 2vmin;
  box-shadow: 0 0 6vmin rgb(92 141 255 / 40%);
}

.cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* For games without a cover image. The hue comes from the game's id. */
.cover-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 1em;
  background: linear-gradient(145deg, hsl(var(--cover-hue) 70% 32%), hsl(var(--cover-hue) 70% 10%));
  font-weight: bold;
  text-align: center;
}

.featured-cover .cover-fallback { font-size: 7vmin; }
.game-strip .cover-fallback { font-size: 1.8vmin; }

.game-details {
  display: flex;
  flex-direction: column;
  gap: 2vmin;
  min-width: 0;
  max-height: 100%;
  overflow: hidden;
}

.game-title {
  margin: 0;
  font-size: 6.5vmin;
  line-height: 1.05;
}

.game-description {
  margin: 0;
  color: var(--arcade-muted);
  font-size: 2.8vmin;
  line-height: 1.35;
}

.game-players {
  margin: 0;
  color: var(--arcade-system);
  font-size: 2.6vmin;
  font-weight: bold;
}

.leaderboard-heading {
  margin: 1vmin 0 0;
  color: var(--arcade-gold);
  font-size: 2.8vmin;
  letter-spacing: 0.1em;
}

.leaderboard {
  display: grid;
  gap: 0.6vmin;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 3vmin;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 2.5em minmax(0, 1fr) auto;
  gap: 1em;
}

.leaderboard-rank { color: var(--arcade-muted); text-align: right; }
.leaderboard-score { font-variant-numeric: tabular-nums; }
.leaderboard-empty { color: var(--arcade-muted); font-size: 2.6vmin; }

.game-strip {
  display: flex;
  justify-content: safe center;
  gap: 2vmin;
  padding: 1vmin;
  overflow: hidden;
}

.strip-item {
  flex: none;
  aspect-ratio: 16 / 9;
  width: 20vmin;
  overflow: hidden;
  border: 0.4vmin solid transparent;
  border-radius: 1vmin;
  opacity: 0.5;
  transition: opacity 120ms, transform 120ms, border-color 120ms;
}

.strip-item.is-selected {
  border-color: var(--arcade-system);
  opacity: 1;
  transform: scale(1.06);
}

.control-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1vmin 6vmin;
  color: var(--arcade-muted);
  font-size: 2.4vmin;
}

.control-hint {
  display: inline-flex;
  align-items: center;
  gap: 1vmin;
}

.stick-glyph { color: var(--arcade-system); font-weight: bold; }

.button-glyph {
  display: inline-grid;
  place-items: center;
  width: 3.4vmin;
  height: 3.4vmin;
  border: 0.35vmin solid var(--arcade-system);
  border-radius: 50%;
  color: var(--arcade-system);
  font-size: 1.9vmin;
  font-weight: bold;
}

.menu-status {
  align-self: center;
  margin: 0;
  color: var(--arcade-muted);
  font-size: 3.5vmin;
  text-align: center;
}

/* Some cabinets have the screen turned on its side. */
@media (orientation: portrait) {
  .featured {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
  }
}
