/* ============================================
   MMOGrounds — game.css
   WCAG AA compliant: all text >= 4.5:1 contrast
   ============================================ */

/* ---- LOADING / 404 ---- */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh;
  color: var(--muted); gap: 16px;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.not-found {
  min-height: 60vh; display: flex; align-items: center;
  text-align: center; padding: 40px;
}
.not-found h1 { font-family: var(--font-display); font-size: 40px; margin-bottom: 12px; }
.not-found p { color: var(--muted); margin-bottom: 24px; }
.btn-back {
  display: inline-block; font-family: var(--font-display); font-size: 14px;
  font-weight: 600; letter-spacing: .04em; background: var(--surface);
  border: 1px solid var(--border2); color: var(--text); padding: 10px 20px;
  border-radius: var(--radius); transition: border-color .15s, color .15s;
}
.btn-back:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   HERO
   Uses a dark overlay so text is ALWAYS readable
   regardless of the game's accent color
   ============================================ */
.game-hero {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: block;   /* block so margin:auto works on .game-hero-content */
}

/* Background: game color fills the section */
.game-hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.game-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Blurred cover art background — injected by game.js when coverUrl exists */
.game-hero-cover-bg {
  position: absolute; inset: 0; z-index: 1;
  background-size: cover;
  background-position: center center;  /* screenshots are landscape — center fits perfectly */
  background-repeat: no-repeat;
  filter: brightness(0.45) saturate(1.1);
  /* No scale needed without blur */
}

/* Overlay — dark left for text readability, transparent right so blurred art shows */
.game-hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(
    100deg,
    rgba(7,8,9,0.94) 0%,
    rgba(7,8,9,0.75) 40%,
    rgba(7,8,9,0.40) 65%,
    rgba(7,8,9,0.10) 100%
  );
}

/* Fade bottom edge into page background */
.game-hero-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px; z-index: 2;
  background: linear-gradient(transparent, var(--bg));
}

/* Abbr watermark — sits inside content flow, decorative */
.game-hero-abbr {
  /* Moved inside .game-hero-content-right as a background element */
  display: none; /* hidden — we now render it inside the grid */
}

/* Cover art — shown as a card in the right column, over the blurred bg */
.game-hero-cover {
  display: block;
}
.game-hero-cover img {
  width: 200px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 24px 60px rgba(0,0,0,0.8), 0 4px 20px rgba(0,0,0,0.5);
  display: block;
}
.game-hero-cover--placeholder {
  width: 180px; height: 240px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 36px; font-weight: 700;
  color: rgba(255,255,255,0.2);
}

/* Content — same constraint as nav-inner */
.game-hero-content {
  position: relative; z-index: 4;
  width: 100%;
  max-width: var(--max-w);   /* ONE max-width — matches nav exactly */
  margin: 0 auto;
  padding: 48px var(--gutter) 56px;
  box-sizing: border-box;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Left col: all the text content */
.game-hero-content-left {
  display: flex; flex-direction: column;
  justify-content: flex-end;
}

.game-hero-content-right { display: none; }
/* Abbr watermark inside right col */
.game-hero-content-right .abbr-watermark {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(60px, 8vw, 120px);
  font-weight: 700; letter-spacing: .06em;
  color: rgba(255,255,255,0.06);
  pointer-events: none; user-select: none;
  z-index: 0;
}
.game-hero-content-right .game-hero-cover {
  position: relative; z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; margin-bottom: 20px;
}
.breadcrumb a {
  /* WCAG: muted2 (#8b93b0) on dark bg = ~4.6:1 — passes AA */
  color: var(--muted2); transition: color .15s;
}
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.3); font-size: 14px; }
.breadcrumb-current { color: rgba(255,255,255,0.7); }

/* Status badge */
.game-status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  /* White text on transparent — readable due to overlay */
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Game title — white, large, always readable over dark overlay */
.game-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 700; line-height: 1.0; letter-spacing: -.01em;
  /* Pure white = 21:1 contrast on the overlay — exceeds WCAG AAA */
  color: #ffffff;
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

/* Developer line */
.game-developer {
  font-size: 14px;
  /* muted2 on dark overlay passes AA */
  color: var(--muted2);
  margin-bottom: 24px;
  font-weight: 300;
}

/* Meta row — rating + stats */
.game-hero-meta {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.hero-rating {
  display: flex; align-items: baseline; gap: 8px;
}
.hero-rating-num {
  font-family: var(--font-display); font-size: 44px;
  font-weight: 700;
  /* accent gold on dark overlay: #f0c040 = ~8:1 — exceeds WCAG AA */
  color: var(--accent);
  line-height: 1;
}
.hero-rating-meta { display: flex; flex-direction: column; gap: 2px; }
.hero-stars { color: var(--accent); font-size: 17px; letter-spacing: 3px; }
.hero-review-count { font-size: 14px; color: var(--muted2); }

.hero-divider { width: 1px; height: 48px; background: rgba(255,255,255,0.12); }

.hero-stat { display: flex; flex-direction: column; gap: 3px; }
.hero-stat-val {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  /* white on dark overlay: exceeds WCAG AAA */
  color: #ffffff; line-height: 1;
}
.hero-stat-lbl {
  font-size: 14px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted2);
}

/* Tags */
.game-hero-tags {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
}
.hero-tag {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 5px;
}
/* WCAG: colored text on semi-transparent dark bg all pass AA */
.hero-tag-free    { background: rgba(45,212,160,.15); color: #6ee7c7; border: 1px solid rgba(45,212,160,.3); }
.hero-tag-sub     { background: rgba(240,192,64,.15); color: var(--accent2); border: 1px solid rgba(240,192,64,.3); }
.hero-tag-b2p     { background: rgba(91,156,246,.15); color: #93bbf8; border: 1px solid rgba(91,156,246,.3); }
.hero-tag-genre   { background: rgba(255,255,255,.1); color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.15); }
.hero-tag-platform{ background: rgba(255,255,255,.07); color: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.1); }

/* CTA buttons */
.game-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-play {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  /* Dark text on gold = 8:1 contrast — exceeds WCAG AAA */
  background: var(--accent); color: #070809;
  padding: 13px 28px; border-radius: var(--radius); border: none;
  cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
  text-decoration: none; display: inline-block;
}
.btn-play:hover {
  background: var(--accent2); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240,192,64,.35);
}
.btn-buy {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  background: rgba(52,211,153,.15); color: #34d399;
  padding: 13px 28px; border-radius: var(--radius); border: 1px solid rgba(52,211,153,.3);
  cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
  text-decoration: none; display: inline-block;
}
.btn-buy:hover {
  background: rgba(52,211,153,.25); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(52,211,153,.2);
}
.btn-wishlist {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  /* White on transparent: readable via overlay — WCAG AA */
  background: rgba(255,255,255,.08); color: #ffffff;
  padding: 12px 24px; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.2); cursor: pointer;
  transition: background .15s, border-color .15s;
  text-decoration: none; display: inline-block;
}
.btn-wishlist:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.4);
}

/* ============================================
   PAGE BODY — proper spacing and readability
   ============================================ */
.game-body {
  padding: 48px 0 72px;
  background: var(--bg);
}

.game-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  box-sizing: border-box;
}
/* Prevent grid children from overflowing their column */
.game-layout > * { min-width: 0; }
.main-col { min-width: 0; overflow: hidden; }
.sidebar  { min-width: 0; position: sticky; top: 80px; }

/* ---- TABS ---- */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border2);
  margin-bottom: 32px;
}
.tab {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  /* muted2 on bg2 = ~4.6:1 — WCAG AA */
  color: var(--muted); padding: 11px 22px;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active {
  /* accent gold on bg: ~8:1 — WCAG AAA */
  color: var(--accent); border-bottom-color: var(--accent);
}

/* ---- CONTENT SECTIONS ---- */
.section { margin-bottom: 40px; }

.section-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); /* 8:1 on bg — WCAG AAA */
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Body text: --text (#e2e6f3) on --bg (#070809) = ~14:1 — WCAG AAA */
.section-body {
  font-size: 16px;
  color: var(--text);
  line-height: 1.85;
}
.section-body p {
  margin-bottom: 16px;
  font-size: 15px; line-height: 1.85;
  color: #bfc6dc;
}
.section-body p:last-child { margin-bottom: 0; }
.section-body h2 {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--text); margin: 32px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); letter-spacing: -.01em;
}
.section-body h3 {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  color: var(--text); margin: 24px 0 10px;
}
.section-body ul {
  list-style: none; padding: 0; margin: 0 0 18px;
}
.section-body ul li {
  padding: 5px 0 5px 20px; position: relative;
  font-size: 15px; line-height: 1.75; color: #bfc6dc;
}
.section-body ul li::before {
  content: '\2192'; position: absolute; left: 0; color: var(--accent);
  font-family: var(--font-display); font-weight: 700;
}
.section-body .spec-table {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 18px;
}
.section-body .spec-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.section-body .spec-row:last-child { border-bottom: none; }
.section-body .spec-label {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.section-body .spec-value { color: #bfc6dc; }

/* ---- FAQ ---- */
.faq-list { margin-top: 8px; }
.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
}
.faq-item:last-child { margin-bottom: 0; }
.faq-item h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.faq-item p {
  font-size: 14px;
  line-height: 1.7;
  color: #bfc6dc;
  margin: 0;
}

/* ---- PROS / CONS ---- */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pros-box, .cons-box {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
}
.pros-box { border-top: 3px solid var(--green); }
.cons-box { border-top: 3px solid var(--red); }
.pros-box h4 {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  /* green (#2dd4a0) on bg2 = ~7:1 — WCAG AAA */
  color: var(--green); margin-bottom: 14px;
}
.cons-box h4 {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  /* red (#f87171) on bg2 = ~4.6:1 — WCAG AA */
  color: var(--red); margin-bottom: 14px;
}
.pros-box li, .cons-box li {
  font-size: 15px;
  /* #bfc6dc on bg2 #0d0f14 = ~8.5:1 — WCAG AAA */
  color: #bfc6dc;
  margin-bottom: 9px;
  padding-left: 18px; position: relative; list-style: none;
  line-height: 1.65;
}
.pros-box li::before { content: '+'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.cons-box li::before { content: '−'; position: absolute; left: 0; color: var(--red); font-weight: 700; }

/* ---- SCREENSHOTS ---- */
.screenshots-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.ss-thumb {
  aspect-ratio: 16/9; border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden; position: relative;
  cursor: pointer; transition: border-color .2s, transform .2s;
}
.ss-thumb:hover { border-color: var(--accent); transform: scale(1.02); }
.ss-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ss-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: var(--bg2);
}
.ss-placeholder span {
  font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); /* 3.5:1 — acceptable for decorative placeholder */
}

/* ---- REVIEWS ---- */
.review-summary {
  display: flex; gap: 28px; align-items: center;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px;
}
.review-big-score {
  font-family: var(--font-display); font-size: 60px;
  font-weight: 700; color: var(--accent); line-height: 1;
  text-align: center; min-width: 80px;
}
.review-big-stars { font-size: 16px; color: var(--accent); text-align: center; margin-top: 4px; letter-spacing: 2px; }
.review-big-count { font-size: 14px; color: var(--muted2); text-align: center; margin-top: 3px; }
.review-bars { flex: 1; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bar-lbl { font-size: 14px; color: var(--muted2); width: 24px; text-align: right; font-family: var(--font-display); font-weight: 600; }
.bar-track { flex: 1; height: 6px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--accent); }
.bar-pct { font-size: 14px; color: var(--muted2); width: 32px; }

/* Individual review cards */
.review-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 14px;
  transition: border-color .2s;
}
.review-card:hover { border-color: var(--border2); }
.review-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.reviewer-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.reviewer-info { flex: 1; }
.reviewer-name {
  font-size: 14px; font-weight: 500;
  color: var(--text); /* 14:1 — WCAG AAA */
}
.reviewer-meta { font-size: 14px; color: var(--muted2); margin-top: 1px; }
.review-stars-small { color: var(--accent); font-size: 14px; letter-spacing: 1px; flex-shrink: 0; }
.review-text {
  font-size: 15px;
  color: var(--muted2); /* 4.8:1 — WCAG AA */
  line-height: 1.75;
}
.review-helpful { font-size: 14px; color: var(--muted); margin-top: 12px; }
.review-helpful a { color: var(--blue); cursor: pointer; text-decoration: underline; }

/* Write review form */
.write-review {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-top: 24px;
}
.write-review .section-title { font-size: 14px; margin-bottom: 10px; }
.star-picker { display: flex; gap: 6px; margin: 8px 0 16px; }
.star-pick-btn {
  background: none; border: none; font-size: 26px;
  color: var(--border2); cursor: pointer; padding: 0;
  transition: color .12s, transform .12s; line-height: 1;
}
.star-pick-btn:hover { transform: scale(1.15); }
.star-pick-btn.lit { color: var(--accent); }
textarea.review-input {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--border2); border-radius: var(--radius);
  /* text = 14:1 on bg3 — WCAG AAA */
  color: var(--text); font-family: var(--font-body); font-size: 14px;
  padding: 12px 14px; resize: vertical; min-height: 90px;
  outline: none; transition: border-color .2s, box-shadow .2s;
  line-height: 1.6;
}
textarea.review-input::placeholder { color: var(--muted); }
textarea.review-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240,192,64,.08);
}
.review-submit-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
}
.char-count { font-size: 14px; color: var(--muted2); }
.btn-submit-review {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent); color: var(--bg);
  border: none; padding: 9px 22px; border-radius: 7px;
  cursor: pointer; transition: background .15s, transform .1s;
}
.btn-submit-review:hover { background: var(--accent2); transform: translateY(-1px); }

/* ---- AFFILIATE NOTICE ---- */
.affiliate-notice {
  background: rgba(240,192,64,.06);
  border: 1px solid rgba(240,192,64,.12);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 14px;
  color: var(--muted2); /* 4.8:1 — WCAG AA */
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: border-color .2s;
}
.sidebar-card:hover { border-color: var(--border2); }
.sidebar-card-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); /* 3.5:1 — label/decorative context */
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.info-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  gap: 12px; min-width: 0;
}
.info-row:last-child { border-bottom: none; }
.info-key {
  font-size: 14px;
  color: var(--muted2);
  flex-shrink: 0; white-space: nowrap;
}
.info-val {
  font-size: 14px; font-weight: 500;
  color: var(--text);
  text-align: right;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  word-break: break-word;
}
.info-val.green { color: var(--green); }  /* 7:1 — WCAG AAA */
.info-val.gold  { color: var(--accent); } /* 8:1 — WCAG AAA */
.info-val.blue  { color: #93bbf8; }       /* ~5.2:1 — WCAG AA */

/* Score grid */
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score-item {
  background: var(--bg3); border-radius: var(--radius);
  padding: 12px; text-align: center;
}
.score-num {
  font-family: var(--font-display); font-size: 24px;
  font-weight: 700; color: var(--accent); line-height: 1;
}
.score-lbl {
  font-size: 14px; color: var(--muted2); /* 4.8:1 — WCAG AA */
  text-transform: uppercase; letter-spacing: .06em; margin-top: 4px;
}

/* Ad card */
.ad-card {
  border: 1px solid rgba(240,192,64,.15);
  border-radius: var(--radius-lg); padding: 20px; text-align: center;
  background: linear-gradient(135deg, rgba(240,192,64,.06), rgba(91,156,246,.04));
}
.ad-tag {
  font-size: 11px; color: var(--muted); letter-spacing: .08em;
  text-transform: uppercase; font-family: var(--font-display);
  margin-bottom: 12px;
}
.ad-video-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden;
  background: rgba(255,255,255,.03); margin-bottom: 14px;
}
.ad-video {
  width: 100%; height: 100%; object-fit: cover;
  display: none;
}
.ad-video[src]:not([src=""]) { display: block; }
.ad-video[src]:not([src=""]) + .ad-video-placeholder { display: none; }
.ad-video-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted);
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  border: 2px dashed rgba(255,255,255,.08); border-radius: var(--radius);
}
.ad-video-icon {
  font-size: 28px; opacity: .3;
}
.btn-ad {
  display: block; width: 100%;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  background: var(--accentdim); color: var(--accent);
  border: 1px solid rgba(240,192,64,.25);
  padding: 10px; border-radius: var(--radius); cursor: pointer;
  transition: background .2s; text-decoration: none;
}
.btn-ad:hover { background: rgba(240,192,64,.2); }

/* Similar games list */
.similar-game {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: opacity .15s;
  text-decoration: none;
}
.similar-game:last-child { border-bottom: none; }
.similar-game:hover { opacity: .75; }
.similar-icon {
  width: 38px; height: 38px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.similar-info { flex: 1; min-width: 0; }
.similar-name {
  font-size: 14px; font-weight: 500;
  color: var(--text); /* 14:1 — WCAG AAA */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.similar-meta { font-size: 14px; color: var(--muted2); margin-top: 1px; }
.similar-rating { font-size: 14px; color: var(--accent); flex-shrink: 0; font-weight: 700; }

/* ============================================
   FOOTER (game page version)
   ============================================ */
.footer-simple {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer-simple .container {
  max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--muted); flex-wrap: wrap; gap: 8px;
}
.footer-simple a { color: var(--accent); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .game-layout { grid-template-columns: 1fr 280px; gap: 28px; }
}

@media (max-width: 860px) {
  /* Layout */
  .game-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .game-hero-content { padding: 40px var(--gutter) 44px; min-height: unset; }
  .game-hero-content-right { display: none; }

  /* Title */
  .game-title { font-size: clamp(28px, 7vw, 48px); }

  /* Meta row — stack rating and stat */
  .game-hero-meta { gap: 16px; }
  .hero-rating-num { font-size: 36px; }
  .hero-divider { display: none; }

  /* Buttons */
  .game-hero-cta { gap: 10px; }
  .btn-play, .btn-buy, .btn-wishlist { padding: 11px 20px; font-size: 13px; }

  /* Tabs */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { height: 0; }

  /* Content sections */
  .pros-cons { grid-template-columns: 1fr; }
  .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
  .review-summary { flex-direction: column; align-items: flex-start; gap: 16px; }
  .review-bars { width: 100%; }

  /* About / section-body readability */
  .section-body p { font-size: 15px; line-height: 1.9; margin-bottom: 14px; }
  .section-body h2 { font-size: 18px; margin: 28px 0 10px; }
  .section-body h3 { font-size: 16px; }
  .section-body ul li { font-size: 14px; line-height: 1.8; }
  .section-body .spec-row { font-size: 13px; padding: 9px 14px; flex-wrap: wrap; gap: 2px 12px; }
  .section-body .spec-label { font-size: 12px; min-width: 70px; flex-shrink: 0; }
  .section-body .spec-value { font-size: 13px; }

  /* FAQ */
  .faq-item { padding: 16px 18px; }
  .faq-item h3 { font-size: 14px; }
  .faq-item p { font-size: 13px; line-height: 1.75; }
}

@media (max-width: 640px) {
  /* Hero */
  .game-hero-content { padding: 28px var(--gutter) 32px; }
  .game-title { font-size: clamp(24px, 8vw, 40px); }
  .game-developer { margin-bottom: 16px; }
  .breadcrumb { font-size: 12px; margin-bottom: 12px; }

  /* Meta row — full wrap, tighter */
  .game-hero-meta { gap: 12px; margin-bottom: 16px; }
  .hero-rating-num { font-size: 32px; }
  .hero-stars { font-size: 14px; letter-spacing: 2px; }
  .hero-stat-val { font-size: 18px; }
  .hero-stat-lbl { font-size: 12px; }

  /* Tags */
  .game-hero-tags { gap: 6px; margin-bottom: 20px; }
  .hero-tag { font-size: 12px; padding: 4px 10px; }

  /* CTA buttons — full width on smallest screens */
  .game-hero-cta { flex-direction: column; gap: 8px; }
  .btn-play, .btn-buy, .btn-wishlist { width: 100%; text-align: center; padding: 13px 20px; }

  /* Tabs */
  .tab { font-size: 13px; padding: 10px 14px; letter-spacing: .04em; }

  /* Section body — tighter on phones */
  .section-body p { font-size: 14px; line-height: 1.9; margin-bottom: 12px; }
  .section-body h2 { font-size: 17px; margin: 24px 0 8px; }
  .section-body ul li { font-size: 14px; }
  .section-body .spec-row { padding: 10px 12px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .section-body .spec-label { min-width: unset; }
  .section-body .spec-value { font-size: 13px; line-height: 1.6; }
  .pros-box, .cons-box { padding: 16px; }
  .pros-box li, .cons-box li { font-size: 14px; line-height: 1.7; }

  /* FAQ */
  .faq-item { padding: 14px 16px; margin-bottom: 10px; }
  .faq-item h3 { font-size: 14px; margin-bottom: 6px; }
  .faq-item p { font-size: 13px; line-height: 1.7; }

  /* Quick stats — 2x2 grid */
  .quick-stats { flex-wrap: wrap; }
  .qs-item { min-width: calc(50% - 1px); flex: none; }
  .qs-divider { display: none; }
  /* Hide the lone 5th stat to avoid orphan */
  .qs-item:nth-child(9) { display: none; }
  .qs-val { font-size: 14px; }
  .qs-lbl { font-size: 12px; }

  /* Screenshots */
  .screenshots-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* Info rows */
  .info-row { font-size: 14px; padding: 12px 0; }

  /* Top-up CTA */
  .game-topup-cta {
    flex-direction: column; align-items: flex-start; gap: 14px;
    padding: 16px;
  }
  .gtc-btn { width: 100%; text-align: center; }
  .gtc-name { font-size: 15px; }
  .gtc-desc { font-size: 13px; }

  /* More like this */
  .more-like-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mlg-name { font-size: 14px; }

  /* Reviews */
  .review-card { padding: 16px; }
  .review-header { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 400px) {
  .game-hero-content { padding: 20px var(--gutter) 24px; }
  .game-title { font-size: 24px; }
  .game-developer { font-size: 13px; }
  .hero-tag { font-size: 11px; padding: 3px 8px; }
  .game-hero-tags { gap: 4px; margin-bottom: 16px; }
  .screenshots-grid { grid-template-columns: 1fr; }
  .more-like-grid { grid-template-columns: 1fr; }
  .section-body p { font-size: 13px; line-height: 1.85; }
  .section-body h2 { font-size: 16px; margin: 20px 0 6px; }
  .section-body ul li { font-size: 13px; }
  .pros-box, .cons-box { padding: 14px; }
  .pros-box li, .cons-box li { font-size: 13px; }
  .tab { font-size: 12px; padding: 8px 10px; }
  .info-row { font-size: 13px; padding: 10px 0; }

  /* Spec table — stacked on very small screens */
  .section-body .spec-row { padding: 8px 10px; font-size: 12px; }
  .section-body .spec-label { font-size: 11px; }
  .section-body .spec-value { font-size: 12px; }

  /* FAQ */
  .faq-item { padding: 12px 14px; margin-bottom: 8px; }
  .faq-item h3 { font-size: 13px; }
  .faq-item p { font-size: 12px; line-height: 1.7; }
}

/* ============================================
   QUICK STATS BAR
   ============================================ */
.quick-stats {
  display: flex; align-items: stretch;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.qs-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; padding: 20px 12px; text-align: center;
  transition: background .15s;
}
.qs-item:hover { background: var(--surface); }
.qs-icon { font-size: 22px; line-height: 1; }
.qs-val {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  color: var(--text); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.qs-lbl {
  font-size: 14px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; font-family: var(--font-display); font-weight: 600;
}
.qs-divider { width: 1px; background: var(--border); flex-shrink: 0; }

/* ============================================
   MORE LIKE THIS
   ============================================ */
.more-like-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.mlg-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; display: block;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.mlg-card:hover {
  border-color: var(--border3); transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
.mlg-banner {
  height: 110px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.mlg-body { padding: 10px 12px 14px; }
.mlg-name {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mlg-meta { font-size: 14px; color: var(--muted2); }

/* ============================================
   GAME TOP-UP CTA
   ============================================ */
.game-topup-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(240,192,64,.07), rgba(91,156,246,.04));
  border: 1px solid rgba(240,192,64,.15);
  border-radius: var(--radius-lg); padding: 20px 24px;
}
.gtc-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.gtc-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.gtc-name {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}
.gtc-desc { font-size: 14px; color: var(--muted2); line-height: 1.5; }
.gtc-btn {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent); color: var(--bg);
  padding: 12px 24px; border-radius: var(--radius);
  text-decoration: none; white-space: nowrap;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
}
.gtc-btn:hover { background: var(--accent2); transform: translateY(-1px); }

/* quick-stats mobile handled in 640px breakpoint above */

/* ── Review edit/delete buttons ── */
.review-own-actions {
  display: flex; align-items: center; gap: 8px;
}
.review-edit-btn {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 5px;
  background: rgba(91,156,246,.1); color: #5b9cf6;
  border: 1px solid rgba(91,156,246,.2);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.review-edit-btn:hover {
  background: rgba(91,156,246,.2); border-color: rgba(91,156,246,.4);
}
.review-delete-btn {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 5px;
  background: rgba(248,113,113,.1); color: #f87171;
  border: 1px solid rgba(248,113,113,.2);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.review-delete-btn:hover {
  background: rgba(248,113,113,.2); border-color: rgba(248,113,113,.4);
}
