@font-face {
  font-family: "PokemonXY";
  src: url("./Sprites/Fonts/Pokemon%20X%20and%20Y.ttf") format("truetype");
  font-display: swap;
}

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

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #263b52 0, #111827 55%);
}

.game-shell { width: min(100% - 32px, 1030px); }

.topbar, .controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar { margin-bottom: 14px; }
.eyebrow { margin: 0 0 4px; color: #7dd3fc; font-size: 0.72rem; letter-spacing: 0.18em; }
h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.status { margin: 0; color: #a7f3d0; font-size: 0.9rem; }

.game-frame {
  position: relative;
  overflow: hidden;
  border: 4px solid #0f172a;
  border-radius: 14px;
  background: #87b66d;
  box-shadow: 0 24px 70px rgb(0 0 0 / 35%), 0 0 0 2px rgb(255 255 255 / 8%);
}

.game-over {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 18px;
  background: rgb(2 6 23 / 72%);
  color: #f8fafc;
  text-align: center;
  z-index: 10;
}

.game-over h2 {
  margin: 0;
  font-size: 42px;
}

.game-over button {
  padding: 10px 28px;
  border: 2px solid #fef08a;
  border-radius: 4px;
  background: #334155;
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.game-over button:hover { background: #475569; }
.game-over[hidden] { display: none !important; }

canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.controls {
  flex-wrap: wrap;
  margin-top: 13px;
  color: #cbd5e1;
  font-size: 0.86rem;
}

.controls strong { color: #f8fafc; }

@media (max-width: 650px) {
  .game-shell { width: min(100% - 16px, 1030px); }
  .game-frame { border-width: 2px; border-radius: 8px; }
  .controls { font-size: 0.75rem; }
}
