/* =========================================
   METRONOM.DK
   ========================================= */

:root {
  --bg: #0b0b0d;
  --surface: #141417;
  --surface-light: #1c1c21;
  --text: #f7f7f7;
  --muted: #92929d;
  --accent: #e8ff3f;
  --danger: #ff4d67;
  --border: rgba(255, 255, 255, 0.09);

  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}


/* =========================================
   HERO / GAME
   ========================================= */

.game-hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 48px 0;
}

.game-header {
  text-align: center;
  margin-bottom: 42px;
}

.game-header h1 {
  margin: 0;
  font-size: clamp(3.4rem, 13vw, 7rem);
  line-height: 0.85;
  font-weight: 950;
  letter-spacing: -0.075em;
}

.tagline {
  margin: 18px 0 0;
  color: var(--accent);
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.18em;
}


/* =========================================
   GAME CARD
   ========================================= */

.game {
  width: 100%;
  min-height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: clamp(24px, 6vw, 48px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35);
}

.game-screen {
  width: 100%;
  text-align: center;
}

.game-screen[hidden] {
  display: none;
}


/* =========================================
   START
   ========================================= */

.game-intro {
  max-width: 390px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}


/* =========================================
   BUTTONS
   ========================================= */

#start-button,
#restart-button,
#hit-button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-weight: 950;
  transition:
    transform 120ms ease,
    opacity 120ms ease;
}

#start-button,
#restart-button {
  min-width: 190px;
  padding: 18px 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #080808;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

#start-button:hover,
#restart-button:hover {
  transform: translateY(-2px);
}

#start-button:active,
#restart-button:active {
  transform: scale(0.97);
}


/* =========================================
   SCOREBOARD
   ========================================= */

.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

.scoreboard div {
  padding: 14px 8px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.scoreboard span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.scoreboard strong {
  display: block;
  font-size: clamp(1.2rem, 5vw, 1.65rem);
  font-variant-numeric: tabular-nums;
}


/* =========================================
   TIMING TRACK
   ========================================= */

.metronome-area {
  padding: 20px 0 30px;
}

.timing-track {
  position: relative;
  width: 100%;
  height: 16px;
  background: var(--surface-light);
  border-radius: 999px;
}

.perfect-zone {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: 50%;
  width: 46px;
  transform: translateX(-50%);
  background: rgba(232, 255, 63, 0.18);
  border: 2px solid var(--accent);
  border-radius: 12px;
}

.marker {
  position: absolute;
  top: 50%;
  left: 0;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  background: var(--text);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}


/* =========================================
   FEEDBACK
   ========================================= */

.feedback {
  min-height: 34px;
  margin: 8px 0 20px;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}


/* =========================================
   HIT BUTTON
   ========================================= */

#hit-button {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--accent);
  color: #080808;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  box-shadow:
    0 0 0 10px rgba(232, 255, 63, 0.05),
    0 20px 50px rgba(0, 0, 0, 0.35);
}

#hit-button:hover {
  transform: scale(1.03);
}

#hit-button:active {
  transform: scale(0.94);
}


/* =========================================
   GAME OVER
   ========================================= */

.game-over-label {
  margin: 0 0 28px;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.final-score {
  margin: 0 0 34px;
}

.final-score span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.final-score strong {
  display: block;
  font-size: clamp(3.5rem, 14vw, 6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}


/* =========================================
   SEO / ABOUT CONTENT
   ========================================= */

.about {
  width: min(100% - 40px, 640px);
  margin: 0 auto;
  padding: 90px 0 120px;
}

.about h2 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 7vw, 3.2rem);
  letter-spacing: -0.04em;
}

.about p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}


/* =========================================
   ACCESSIBILITY
   ========================================= */

button:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 5px;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 520px) {

  .game-hero {
    width: min(100% - 20px, var(--max-width));
    padding: 28px 0;
  }

  .game-header {
    margin-bottom: 28px;
  }

  .game {
    min-height: 420px;
    padding: 24px 18px;
    border-radius: 22px;
  }

  .scoreboard {
    gap: 7px;
    margin-bottom: 38px;
  }

  #hit-button {
    width: 125px;
    height: 125px;
  }

}
/* =========================================
   ARCADE BACKGROUND
   ========================================= */

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(232, 255, 63, 0.08),
      transparent 32%
    ),
    #0b0b0d;
}

/* Subtle arcade grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    );

  background-size: 48px 48px;

  mask-image:
    linear-gradient(
      to bottom,
      black,
      rgba(0,0,0,0.55) 55%,
      transparent
    );
}

/* Arcade glow behind game */
.game-hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;

  left: 50%;
  top: 45%;

  transform: translate(-50%, -50%);

  background:
    radial-gradient(
      circle,
      rgba(232, 255, 63, 0.10),
      transparent 65%
    );

  filter: blur(20px);

  z-index: -1;
  pointer-events: none;
}

.game-hero {
  position: relative;
}

/* Tiny glow on the METRONOM wordmark */
.game-header h1 {
  text-shadow:
    0 0 40px rgba(255,255,255,0.05);
}

/* Accent glow */
.tagline {
  text-shadow:
    0 0 24px rgba(232,255,63,0.25);
}