/* ═══════════════════════════════════════════════════════════
   FunOnWeb — Individual Game Page Styles
   game-page.css  |  www.funonweb.com
═══════════════════════════════════════════════════════════ */

/* ── AD PLACEHOLDERS ── */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  font-size: .75rem;
  font-weight: 700;
  padding: 10px;
  min-height: 50px;
  letter-spacing: .04em;
  text-align: center;
}
.ad-placeholder.ad-tall {
  min-height: 400px;
  width: 160px;
  writing-mode: vertical-lr;
  font-size: .7rem;
}
.ad-placeholder.ad-banner { min-height: 60px; width: 100%; }
.ad-placeholder.ad-banner-sm { min-height: 50px; width: 100%; font-size: .72rem; }

/* ── AD SLOTS ── */
.ad-header { margin: 10px auto; max-width: 740px; }
.ad-footer-above { margin: 16px auto 0; max-width: 740px; }
.ad-ingame { margin: 16px 0; }

/* ── MAIN WRAPPER ── */
.game-page-main { background: #f8fafc; min-height: 100vh; }
.game-page-main .container { max-width: 1240px; }

/* ── THREE-COLUMN LAYOUT: left-ad | center | right-ad ── */
.game-page-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0 36px;
}

/* ── SIDEBAR ADS ── */
.ad-sidebar-left,
.ad-sidebar-right {
  width: 170px;
  flex-shrink: 0;
  display: none;           /* hidden on mobile */
  position: sticky;
  top: 80px;
  align-self: flex-start;
}
@media (min-width: 1000px) {
  .ad-sidebar-left,
  .ad-sidebar-right { display: flex; align-items: center; justify-content: center; }
}

/* ── CENTER COLUMN ── */
.game-page-center {
  flex: 1;
  min-width: 0;
}

/* ── GAME PAGE HEADER ── */
.game-page-header {
  margin-bottom: 16px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--sky-deep);
  text-decoration: none;
  font-weight: 700;
  font-size: .88rem;
  font-family: var(--font-head);
  padding: 6px 14px 6px 10px;
  background: var(--sky-pale);
  border-radius: 30px;
  transition: .2s;
  margin-bottom: 14px;
  display: inline-block;
}
.back-link:hover { background: var(--sky-light); }

.game-page-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.game-page-icon { font-size: 2.4rem; line-height: 1; flex-shrink: 0; }
.game-page-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
  color: var(--dark);
  margin: 0;
}
.game-page-desc {
  font-size: .97rem;
  color: var(--mid);
  line-height: 1.7;
  max-width: 620px;
  margin: 0;
}

/* ── GAME FRAME ── */
.game-frame {
  background: var(--white);
  border-radius: 20px;
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 32px rgba(14,165,233,.1);
  overflow: hidden;
  padding: 20px 16px;
  margin-bottom: 16px;
  min-height: 200px;
}

/* ── META TAGS ── */
.game-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 20px;
}
.game-meta-tag {
  padding: 5px 13px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-size: .78rem;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--mid);
}

/* ── RELATED GAMES SECTION ── */
.related-games {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1.5px solid var(--border);
}
.related-games h2 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
  margin-bottom: 14px;
  color: var(--dark);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.related-card {
  background: var(--white);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid var(--border);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .85rem;
  color: var(--dark);
}
.related-card span {
  font-size: 2rem;
  line-height: 1;
}
.related-card:hover {
  border-color: var(--sky);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(14,165,233,.18);
}

/* ── FOOTER OVERRIDES FOR GAME PAGES ── */
footer h4 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .88rem;
  color: #cbd5e1;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .game-page-layout { padding: 12px 0 24px; gap: 0; }
  .game-frame { padding: 12px 10px; border-radius: 14px; }
  .game-page-title { font-size: 1.5rem; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .related-card { padding: 12px 8px; font-size: .8rem; }
  .related-card span { font-size: 1.6rem; }
}

/* ══════════════════════════════════════════════════════════
   LEGACY CLASS ALIASES — old play pages use these names
   (rel-grid, rel-card, rel-icon, rel-title, back-btn,
    ad-side, ad-side-left, ad-side-right, game-page-main
    used as flex child, game-info-box)
══════════════════════════════════════════════════════════ */

/* Old related grid → same as .related-grid */
.rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

/* Old related card → same as .related-card */
.rel-card {
  background: var(--white);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid var(--border);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--dark);
}
.rel-card:hover {
  border-color: var(--sky);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(14,165,233,.18);
}
.rel-icon {
  font-size: 2rem;
  line-height: 1;
  display: block;
}
.rel-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .85rem;
  color: var(--dark);
  line-height: 1.3;
}

/* Old back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  background: var(--sky-light);
  color: var(--sky-deep);
  border-radius: 50px;
  font-weight: 800;
  font-family: var(--font-head);
  font-size: .88rem;
  text-decoration: none;
  transition: .2s;
}
.back-btn:hover { background: var(--sky); color: #fff; }

/* Old sidebar ad columns */
.ad-side {
  width: 170px;
  flex-shrink: 0;
  display: none;
  position: sticky;
  top: 80px;
  align-self: flex-start;
  border-radius: 12px;
  overflow: hidden;
}
.ad-side-left  { order: 1; }
.ad-side-right { order: 3; }
@media (min-width: 1000px) {
  .ad-side { display: flex; align-items: center; justify-content: center; }
}

/* Old three-col layout used in original play pages */
.game-page-layout .game-page-main { order: 2; flex: 1; min-width: 0; }

/* How to play info box */
.game-info-box {
  background: var(--sky-pale);
  border-radius: 18px;
  padding: 20px 22px;
  margin: 20px 0;
  border: 1px solid var(--sky-light);
}
.game-info-box h2 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--sky-deep);
}
.game-info-box p {
  color: var(--mid);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 10px;
}
.game-info-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.game-info-box ul li {
  font-size: .87rem;
  color: var(--mid);
  font-weight: 600;
}

/* Responsive fix for old rel-grid */
@media (max-width: 700px) {
  .rel-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .rel-card { padding: 12px 8px; font-size: .8rem; }
  .rel-icon { font-size: 1.6rem; }
}

/* ── POPUP AD — mobile responsive ── */
@media (max-width: 480px) {
  .ad-popup {
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-width: unset;
    max-width: unset;
    width: auto;
    border-radius: 12px;
    padding: 12px 16px;
  }
}
