:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #171a20;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

.shell {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
  padding: 28px 0 44px;
}

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

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand h1,
.player-title h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.brand span,
.player-title span,
.muted {
  color: #626977;
}

.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  border: 1px solid #dde2ea;
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 650;
  color: #343a46;
}

.controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  margin: 26px 0;
}

.search,
.select {
  min-height: 44px;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 14px;
  font: inherit;
}

.search:focus,
.select:focus {
  border-color: #9aa7ba;
  outline: 3px solid rgba(72, 104, 160, 0.16);
}

.section {
  margin-top: 26px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  text-decoration: none;
}

.card:hover,
.card:focus-visible {
  border-color: #9aa7ba;
  outline: none;
}

.card strong {
  font-size: 16px;
  line-height: 1.25;
}

.card-thumbnail {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: #e8ecf2;
}

.card-content {
  min-height: 94px;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.card-no-thumbnail .card-content {
  min-height: 106px;
}

.card-content span {
  color: #697180;
  font-size: 13px;
}

.empty {
  padding: 18px;
  border: 1px dashed #c8ced8;
  border-radius: 8px;
  color: #697180;
}

.player-page {
  background: #101217;
  color: #f6f7f9;
}

.player-shell {
  width: min(100% - 20px, 1280px);
  margin: 0 auto;
  padding: 10px 0;
}

.player-topbar {
  margin-bottom: 10px;
}

.player-title h1 {
  font-size: clamp(20px, 4vw, 30px);
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #343b49;
  border-radius: 8px;
  background: #1b202a;
  color: #ffffff;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  border-color: #6f7d94;
  outline: none;
}

.stage {
  position: relative;
  min-height: min(72vh, 760px);
  border: 1px solid #2b313d;
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
}

.status-panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: #101217;
  z-index: 2;
}

.status-card {
  width: min(100%, 520px);
}

.status-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.progress {
  height: 10px;
  border: 1px solid #4c5668;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 18px;
}

.progress div {
  height: 100%;
  width: 0%;
  background: #9fc0ff;
  transition: width 160ms ease;
}

.game-frame {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 520px;
  border: 0;
  display: block;
  background: #000000;
}

.hidden {
  display: none;
}

@media (max-width: 680px) {
  .topbar,
  .player-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats {
    justify-content: flex-start;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .shell {
    padding-top: 20px;
  }

  .game-frame,
  .stage {
    min-height: 68vh;
  }
}
