/* ══════════════════════════════════════════
   play-page.css — Game page 3-column layout
   ══════════════════════════════════════════ */

/* ── 3-Column Grid ── */
.play-page {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 220px;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(14px, 2vw, 24px) 42px;
}

/* ── Sidebars ── */
.play-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-section h4 {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  opacity: 0.7;
}

.sidebar-games {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Small sidebar game cards */
.sidebar-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.sidebar-game:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.sidebar-game-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1a1a2e;
}

.sidebar-game-icon--emoji {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.sidebar-game-info {
  min-width: 0;
}

.sidebar-game-title {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sidebar-game-plays {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

/* Sidebar category links */
.sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s;
}

.sidebar-cat-link:hover {
  background: rgba(162, 155, 254, 0.12);
  color: var(--brand-dark);
}

.sidebar-cat-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* Sidebar ad */
.sidebar-ad {
  min-height: 250px;
  border: 1px dashed #b6c3d2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  display: grid;
  place-items: center;
  color: #718093;
  font-size: 0.82rem;
}

/* ── Title Bar (below game) ── */
.play-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-top: 2px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.play-title-info {
  min-width: 0;
}

.play-title-info h1 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.5px;
}

.publisher-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.play-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Pill buttons */
.play-count-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.download-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--mint);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.1s, opacity 0.15s;
}

.download-pill:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.action-pill {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.action-pill:hover {
  border-color: var(--brand);
  background: rgba(162, 155, 254, 0.08);
}

.action-pill.accent {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.action-pill.accent:hover {
  background: var(--brand-dark);
}

/* ── Score Strip ── */
.play-page .score-strip {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  margin-top: 8px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.play-page .score-strip strong {
  color: var(--ink);
  font-weight: 900;
}

/* ── Game Info Cards ── */
.game-info {
  margin-top: 24px;
}

.info-card {
  padding: 24px 28px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.info-card h2 {
  font-size: 1.2rem;
  margin: 0 0 14px;
  letter-spacing: -0.3px;
}

.info-body {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.75;
}

.info-body p {
  margin: 0 0 12px;
}

.info-body strong {
  color: var(--brand-dark);
}

/* Info duo (2 columns) */
.info-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Features list */
.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mint);
  font-weight: 900;
  font-size: 1rem;
}

/* ── FAQ Accordion ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--ink);
  text-align: left;
  gap: 12px;
}

.faq-question:hover {
  color: var(--brand-dark);
}

.faq-arrow {
  font-size: 0.8rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: var(--muted);
}

.faq-item.is-open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.faq-item.is-open .faq-answer {
  max-height: 300px;
  padding-bottom: 14px;
}

/* ── More Games Section ── */
.more-games {
  margin-top: 32px;
}

.more-games h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.more-games .game-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* ── Tag Chips Bar ── */
.tag-chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.tag-chip-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.tag-chip-link:hover {
  border-color: var(--brand);
  background: rgba(162, 155, 254, 0.1);
  transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .play-page {
    grid-template-columns: minmax(0, 1fr) 200px;
  }
  .play-sidebar--left {
    display: none;
  }
}

@media (max-width: 780px) {
  .play-page {
    grid-template-columns: 1fr;
  }
  .play-sidebar--left,
  .play-sidebar--right {
    display: none;
  }

  /* Show similar games inline on mobile */
  .mobile-similar {
    display: block !important;
  }

  .play-title-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .play-title-actions {
    width: 100%;
  }

  .info-duo {
    grid-template-columns: 1fr;
  }

  .control-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .icon-btn.wide {
    grid-column: span 3;
  }
}

@media (max-width: 880px) and (orientation: portrait) {
  .stage-shell.is-playing .rotate-overlay {
    display: flex;
  }
}
