/* Game detail pages — extends legal-pages.css */

body.page-game-detail main {
  margin-top: 10px;
  padding: 12px clamp(14px, 2.5vw, 22px) 36px;
}

/* Hero + iframe: compact hero so the game sits higher; iframe flex-centers in leftover space */
.game-play-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: min(calc(100dvh - 168px), 880px);
  margin-bottom: 6px;
}

.game-hero {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.14) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 12px;
  padding: 10px 14px 8px;
  margin-bottom: 8px;
  text-align: center;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

/* Order in HTML: title → tagline → badge → chips */
.game-hero-title {
  font-size: clamp(1.28rem, 3vw, 1.75rem);
  margin: 0 0 4px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.game-hero .tagline {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 auto 6px;
  line-height: 1.42;
  max-width: 36rem;
}

.game-hero .badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 11px;
  border-radius: 999px;
  margin: 0 0 6px;
}

.game-meta-chips {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
}

.chip {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
}

.game-frame-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
  min-height: min(48vh, 420px);
  position: relative;
}

.game-frame-wrap iframe {
  display: block;
  width: 100%;
  height: min(48vh, 420px);
  min-height: 280px;
  max-height: min(56vh, 520px);
  border: 0;
  background: #000;
}

.play-external {
  margin: 6px 0 2px;
  text-align: center;
  font-size: 0.88rem;
  flex: 0 0 auto;
}

.play-external a {
  font-weight: 600;
}

@media (max-width: 640px) {
  body.page-game-detail main {
    padding-top: 10px;
  }

  .game-play-stack {
    min-height: min(calc(100dvh - 152px), 780px);
  }

  .game-frame-wrap {
    min-height: min(42vh, 360px);
  }

  .game-frame-wrap iframe {
    height: min(42vh, 360px);
    min-height: 240px;
    max-height: min(50vh, 440px);
  }
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.control-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.control-card .key {
  display: inline-block;
  background: #1e1b4b;
  color: #fff;
  font-family: ui-monospace, monospace;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 6px;
}

.control-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.faq-item {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.faq-item h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--accent);
}

.faq-item p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  text-decoration: none;
}

.related-card-cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, #e8e6f4 0%, #ddd8f0 100%);
  overflow: hidden;
}

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

.related-card-cover--empty {
  min-height: 0;
}

.related-card-title {
  margin: 0;
  padding: 10px 12px 12px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
