:root {
  --bg: #0c1025;
  --surface: #171d3b;
  --surface-light: #222a50;
  --text: #f7f4df;
  --muted: #aeb6d7;
  --line: #3b456f;
  --accent: #f0cd50;
  --shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  --radius: 14px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 0%, rgba(91, 104, 180, 0.25), transparent 28rem),
    var(--bg);
}

a {
  color: inherit;
}

.game-banner,
.level-select,
.site-footer {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.game-banner {
  min-height: 250px;
  display: flex;
  align-items: end;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(to right, rgba(5, 8, 25, 0.85), rgba(5, 8, 25, 0.05)),
    url("img/space-dogs-banner.png") center / cover no-repeat,
    var(--surface);
}

.game-banner__content {
  padding: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.1;
  color: var(--text);
  text-shadow: 4px 4px 0 #5864a6;
}

.intro {
  max-width: 600px;
  margin-bottom: 0;
  color: #e2e6f7;
  line-height: 1.6;
}

.level-select {
  padding: 18px 0 70px;
}

.world {
  padding-top: 34px;
}

.world + .world {
  margin-top: 38px;
  border-top: 2px solid var(--line);
}

.world__heading {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
}

.world__heading h2 {
  margin-bottom: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 3vw, 1.35rem);
  color: var(--accent);
}

.world__heading span {
  color: var(--muted);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.level-card {
  display: grid;
  grid-template-rows: 140px auto;
  overflow: hidden;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease;
}

.level-card:hover,
.level-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.level-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.level-card__art {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-light);
  position: relative;
}

.level-card__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}


.level-card__status {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);

  width: max-content;
  max-width: calc(100% - 20px);
  padding: 0;

  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;

  color: #ffe100bd;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
    text-shadow:
    2px 2px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -1px 1px 0 #000;

}

.level-card h3 {
  margin: 0;
  padding: 15px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

.site-footer {
  padding: 22px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 720px) {
  .game-banner,
  .level-select,
  .site-footer {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .game-banner {
    min-height: 210px;
  }

  .game-banner__content {
    padding: 24px;
  }

  .level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .world__heading {
    display: block;
  }

  .world__heading span {
    display: block;
    margin-top: 10px;
  }
}

@media (max-width: 430px) {
  .level-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
