:root {
  color-scheme: dark;
  --bg: #10141c;
  --panel: #171d27;
  --panel-strong: #1e2633;
  --line: #344052;
  --text: #f5f7fb;
  --muted: #b7c1cf;
  --accent: #36c3a5;
  --accent-strong: #79e0c9;
  --warning: #f3b35a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, #10141c 0%, #121821 45%, #0e1218 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 16px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 20, 28, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(121, 224, 201, 0.48);
  border-radius: 8px;
  background: #0e211e;
  color: var(--accent-strong);
}

nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  min-width: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

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

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
  min-height: 0;
  padding: 18px 0 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.lede,
.content-band p,
.game-meta {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.lede {
  max-width: 700px;
  margin: 12px 0 0;
}

.signal-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(23, 29, 39, 0.96), rgba(19, 25, 34, 0.96));
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}

.signal-panel span {
  min-height: 48px;
  border: 1px solid rgba(121, 224, 201, 0.24);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(121, 224, 201, 0.14), rgba(54, 195, 165, 0.03)),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(121, 224, 201, 0.16) 13px 14px);
}

.signal-panel span:nth-child(2),
.signal-panel span:nth-child(5) {
  transform: translateY(12px);
  border-color: rgba(243, 179, 90, 0.28);
  background:
    linear-gradient(180deg, rgba(243, 179, 90, 0.14), rgba(243, 179, 90, 0.03)),
    repeating-linear-gradient(0deg, transparent 0 12px, rgba(243, 179, 90, 0.16) 12px 13px);
}

.games-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  min-height: 420px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 20, 28, 0.72);
}

.games-sidebar,
.content-band {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: var(--panel);
}

.games-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: 26px;
}

.select-label {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 60px;
  margin-top: -10px;
  padding: 0 48px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1219;
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 800;
}

select:focus {
  outline: 2px solid rgba(121, 224, 201, 0.42);
  outline-offset: 2px;
}

.game-meta {
  max-width: 58rem;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.button,
button {
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(121, 224, 201, 0.42);
  border-radius: 8px;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06110f;
}

.button.compact {
  min-height: 38px;
  width: auto;
  padding: 0 12px;
  white-space: nowrap;
}

.button[aria-disabled="true"],
.button:disabled {
  pointer-events: none;
  border-color: var(--line);
  color: #667386;
  background: transparent;
  cursor: default;
}

.game-stage {
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 380px;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #090d12;
  background-size: 32px 32px;
}

.game-preview {
  overflow: hidden;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(121, 224, 201, 0.3);
  border-radius: 8px;
  background: #05080c;
}

.game-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.game-stage .game-meta {
  min-height: 0;
  margin: 0;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.launch-button {
  width: min(100%, 420px);
  min-height: 64px;
  font-size: 1.12rem;
}

.launch-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
  background: #fff;
}

.empty-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #748195;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #090d12;
  background-size: 32px 32px;
  font-weight: 800;
}

.empty-stage.is-hidden {
  display: none;
}

.content-band {
  margin-top: 18px;
  padding: clamp(22px, 5vw, 40px);
}

.content-band p:last-child {
  max-width: 720px;
  margin-bottom: 0;
}

.player-page {
  overflow: hidden;
  background: #070b10;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 56px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #10141c;
}

.player-actions {
  display: flex;
  gap: 8px;
}

.player-shell {
  position: relative;
  width: 100vw;
  height: calc(100vh - 56px);
  margin: 0;
  padding: 0;
}

.player-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.redirect-shell {
  min-height: 100vh;
  width: min(620px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.redirect-shell h1 {
  margin-top: 18px;
  font-size: clamp(2.2rem, 9vw, 4.2rem);
}

.redirect-shell p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    padding-block: 10px;
  }

  .intro,
  .games-layout {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
    padding: 12px 0 14px;
  }

  .signal-panel {
    display: none;
  }

  .games-sidebar {
    gap: 12px;
    padding: 14px;
  }

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

  .game-stage,
  iframe {
    min-height: 420px;
  }

  .player-toolbar {
    height: auto;
    min-height: 56px;
  }

  .player-shell {
    height: calc(100vh - 64px);
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .games-layout {
    padding: 10px;
    gap: 10px;
  }

  .games-sidebar {
    gap: 12px;
    padding: 12px;
  }

  .games-sidebar .eyebrow {
    display: none;
  }

  .actions {
    margin-top: 2px;
  }

  .button {
    min-height: 40px;
  }

  .site-header {
    gap: 10px;
    padding-inline: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }

  h2 {
    font-size: 1.65rem;
  }

  .lede,
  .content-band p,
  .game-meta {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .lede {
    max-width: 36rem;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 0.68rem;
  }

  select {
    min-height: 56px;
    margin-top: -4px;
    font-size: 1.12rem;
  }

  .game-stage {
    min-height: 0;
    padding: 16px;
  }

  .launch-button {
    min-height: 56px;
  }

  nav {
    display: none;
  }

  .player-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-actions {
    width: 100%;
  }

  .player-actions .button {
    flex: 1;
  }

  .player-shell {
    height: calc(100vh - 104px);
  }
}
