@font-face {
  font-family: Quantico;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/Quantico-Regular.ttf") format("truetype");
}

:root {
  --color-bg: #020818;
  --color-glow: rgba(0, 215, 255, 0.35);
  --frame-border: rgba(0, 215, 255, 0.45);
  --font-ui: Quantico, system-ui, sans-serif;
  --color-text-blue: #00d7ff;
  --color-text-pink: #ffaacc;
  --color-text-white: #e8eef5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background-color: var(--color-bg);
  background-image:
    linear-gradient(rgba(2, 8, 24, 0.5), rgba(2, 8, 24, 0.75)),
    url("../assets/circuit-bg-tile.png");
  background-size:
    auto,
    256px 256px;
  font-family: var(--font-ui);
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 100vh;
  padding: 1rem;
}

.intro {
  width: min(808px, 100%);
  color: var(--color-text-blue);
}

.intro_title_container {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.intro__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.intro__tagline {
  margin: 0.2rem 0 0;
  color: var(--color-text-pink);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.intro__text {
  margin: 0.6rem 0 0;
  color: var(--color-text-white);
  font-size: 0.9rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.game-frame {
  position: relative;
  width: min(808px, 100%);
  aspect-ratio: 808 / 360;
  border: 2px solid var(--frame-border);
  border-radius: 0.25rem;
  box-shadow:
    0 0 24px rgba(0, 215, 255, 0.15),
    inset 0 0 32px rgba(0, 215, 255, 0.04);
  background: #231f20;
  overflow: hidden;
}

.game-frame__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(2, 8, 24, 0.72);
  cursor: pointer;
  transition: background 0.2s ease;
}

.game-frame__play:hover:not(:disabled) {
  background: rgba(2, 8, 24, 0.55);
}

.game-frame__play:disabled {
  display: none;
}

.game-frame__loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 24, 0.85);
  color: rgba(0, 215, 255, 0.9);
  font-family: system-ui, sans-serif;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
}

.game-frame__loading[hidden] {
  display: none;
}

.game-frame--loading .game-frame__iframe {
  visibility: visible;
}

.game-frame__play-icon {
  display: block;
  width: 5rem;
  height: 5rem;
  filter: drop-shadow(0 0 16px var(--color-glow));
  transition: transform 0.15s ease;
}

.game-frame__play:hover:not(:disabled) .game-frame__play-icon {
  transform: scale(1.06);
}

.game-frame__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.game-frame__iframe:not([src]) {
  visibility: hidden;
}

.score-overview {
  width: min(808px, 100%);
  color: rgba(0, 215, 255, 0.9);
  font-family: var(--font-ui);
  border: 1px solid var(--frame-border);
  border-radius: 0.25rem;
  background: rgba(2, 8, 24, 0.72);
}

.score-overview__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.score-overview__summary::-webkit-details-marker,
.score-overview__summary::marker {
  display: none;
  content: "";
}

.score-overview__highscore {
  color: var(--color-text-blue);
  font-size: 0.95rem;
}

.score-overview__highscore:empty {
  display: none;
}

.score-overview__toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--color-text-blue);
  font-size: 0.8rem;
}

.score-overview__toggle::after {
  content: "▸";
}

.score-overview[open] .score-overview__toggle::after {
  content: "▾";
}

.score-overview__meta {
  margin: 0;
  padding: 0 1rem 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-blue);
}

.score-overview__chart {
  padding: 0 0.75rem 0.75rem;
}

.score-chart {
  display: block;
  width: 100%;
  height: auto;
}

.score-chart__axis {
  stroke: rgba(0, 215, 255, 0.35);
  stroke-width: 1;
}

.score-chart__bar {
  fill: var(--color-text-blue, rgba(0, 215, 255, 0.85));
}

.score-chart__tick {
  fill: var(--color-text-blue, rgba(0, 215, 255, 0.75));
  font-family: var(--font-ui);
  font-size: 11px;
}
