:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #17191d;
  --panel-2: #20242a;
  --text: #f6f2e8;
  --muted: #b8c1c8;
  --line: rgba(255, 255, 255, 0.14);
  --red: #e4473c;
  --gold: #f0c94d;
  --green: #28c383;
  --cyan: #4cb9e8;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 14px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 17, 19, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
}

main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 56px) clamp(16px, 4vw, 42px) 56px;
}

.play-main {
  width: min(100%, 1120px);
  padding: clamp(12px, 2.5vw, 28px) clamp(12px, 3vw, 32px) 40px;
}

.game-stage {
  display: grid;
  gap: clamp(12px, 2vw, 18px);
  align-items: start;
  min-height: calc(100vh - 130px);
}

.stage-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.stage-title h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 0.95;
}

.compact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.game-stage .player-shell {
  width: min(100%, 980px);
  min-height: 0;
  margin: 0 auto;
}

.runtime-note {
  width: min(100%, 980px);
  margin: 16px auto 0;
  padding: 0;
  overflow: hidden;
}

.runtime-note summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.runtime-note p {
  padding: 0 16px 16px;
}

.hero {
  min-height: clamp(250px, 38vh, 430px);
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(28px, 6vw, 64px);
}

.hero-copy,
.detail-copy {
  max-width: 760px;
}

.eyebrow,
.tag {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 16px;
  font-size: clamp(48px, 9vw, 116px);
  line-height: 0.88;
  letter-spacing: 0;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 750;
  line-height: 1.35;
}

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

.game-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-decoration: none;
}

.game-card:hover,
.game-card:focus-visible {
  border-color: var(--gold);
  outline: 3px solid rgba(240, 201, 77, 0.24);
  outline-offset: 3px;
}

.game-card.featured {
  grid-column: span 2;
}

.game-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #08090a;
}

.game-copy {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 148px;
  padding: 18px;
}

.game-copy strong {
  font-size: clamp(22px, 2.7vw, 34px);
  line-height: 1.02;
}

.game-copy span:last-child {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.text-card {
  min-height: 260px;
  background:
    linear-gradient(135deg, rgba(76, 185, 232, 0.16), transparent 58%),
    var(--panel-2);
}

.game-detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 52px);
  align-items: center;
  min-height: calc(100vh - 190px);
}

.detail-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070809;
}

.detail-media img {
  display: block;
  width: 100%;
}

.player-shell {
  aspect-ratio: 3 / 2;
  min-height: 280px;
}

.player-shell embed,
.player-shell object,
.player-shell canvas,
.player-shell iframe,
.player-shell > div {
  display: block;
  width: 100%;
  height: 100%;
}

.player-shell canvas {
  background: #000;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  border-color: transparent;
  background: var(--red);
}

.notice {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.notice h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .site-top {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .library,
  .game-detail {
    grid-template-columns: 1fr;
  }

  .stage-head {
    align-items: start;
    flex-direction: column;
  }

  .compact-actions {
    justify-content: flex-start;
  }

  .game-card.featured {
    grid-column: span 1;
  }

  .hero {
    min-height: 280px;
  }

  .game-copy {
    min-height: 0;
  }
}
