/* =============================================================================
   pokemonsurvivor.online — "More games" module + game detail pages
   Loaded after site.css. Shares the same dark-navy / yellow brand system.
   ============================================================================= */

/* ---------- more-games module (homepage + detail pages) ---------- */
.mg-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.mg-card {
  display: flex; flex-direction: column; gap: 7px;
  min-width: 0;
}
.mg-thumb {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: #05080f; border: 1px solid var(--line-soft);
  transition: border-color .2s, transform .2s;
}
.mg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mg-card:hover .mg-thumb { border-color: rgba(255,203,5,.55); transform: translateY(-2px); }
.mg-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(7,12,26,.42); opacity: 0; transition: opacity .2s;
}
.mg-play svg { width: 30px; height: 30px; color: #fff; filter: drop-shadow(0 4px 12px rgba(0,0,0,.7)); }
.mg-card:hover .mg-play { opacity: 1; }
.mg-name { font-weight: 700; font-size: .86rem; line-height: 1.25; }
.mg-card:hover .mg-name { color: var(--brand); }
.mg-tag { font-size: .7rem; color: var(--faint); line-height: 1.3; }

/* empty slots — the row always keeps six cells */
.mg-empty {
  aspect-ratio: 16 / 9; border-radius: 12px;
  border: 1px dashed var(--line); background: rgba(255,255,255,.015);
}

/* ---------- game detail page ---------- */
.game-top { padding: 26px 0 10px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--faint); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs span { color: var(--faint); }

.game-head { display: grid; grid-template-columns: 1.35fr .65fr; gap: 28px; align-items: start; }
.game-head h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; margin: 0 0 10px; letter-spacing: -.02em; }
.game-head .lead { margin-bottom: 16px; }
.game-head .lead em { color: var(--brand); font-style: normal; font-weight: 700; }
.game-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.game-meta li {
  font-size: .76rem; font-weight: 700; color: var(--muted);
  background: var(--canvas-2); border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 5px 12px;
}
.game-meta li.hot { color: var(--brand); border-color: rgba(255,203,5,.35); background: var(--brand-soft); }

.game-side { display: grid; gap: 12px; }
.game-side .card { padding: 18px; }
.game-side h3 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.game-side ul { display: grid; gap: 7px; font-size: .87rem; color: var(--muted); }
.game-side li { padding-left: 16px; position: relative; }
.game-side li::before { content: "›"; position: absolute; left: 0; color: var(--brand); }
.game-side a { color: var(--brand); font-weight: 700; }
.game-side a:hover { text-decoration: underline; }

/* in-page frame */
.game-play { padding: 22px 0 6px; }
.game-play .play-toolbar { margin-top: 12px; }
.play-note { font-size: .8rem; color: var(--faint); margin: 10px 0 0; }

/* rotate hint — only shown on phones in portrait, never blocks the frame */
.rotate-hint {
  display: none; align-items: center; gap: 12px;
  margin: 0 0 12px; padding: 11px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  font-size: .82rem; color: var(--muted);
}
.rotate-hint.is-on { display: flex; }
.rotate-hint .rh-text { flex: 1; }
.rotate-hint .rh-text strong { color: var(--ink); }
.rotate-hint .rh-btn {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px;
  background: var(--brand-soft); border: 1px solid rgba(255,203,5,.4);
  color: var(--brand); font-weight: 800; font-size: .78rem;
}
.rotate-hint .rh-btn:hover { background: rgba(255,203,5,.22); }
.rotate-hint .rh-close {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--faint); font-size: 1rem; line-height: 1;
}
.rotate-hint .rh-close:hover { color: var(--ink); border-color: var(--brand); }

/* content blocks */
.game-body { padding: 44px 0 8px; }
.game-block { margin-bottom: 44px; }
.game-block h2 { font-size: clamp(21px, 2.6vw, 30px); font-weight: 800; margin: 0 0 8px; }
.game-block > p.lead { margin-bottom: 20px; }
.game-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.game-block .prose p { color: var(--muted); margin: 0 0 14px; }
.game-block .prose strong { color: var(--ink); }

.howto-list { counter-reset: howto; display: grid; gap: 14px; }
.howto-list li {
  counter-increment: howto; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 18px 62px;
}
.howto-list li::before {
  content: counter(howto); position: absolute; left: 20px; top: 18px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #1a1200; font-weight: 900; font-size: .85rem;
}
.howto-list h3 { font-size: 1rem; margin: 0 0 5px; }
.howto-list p { margin: 0; font-size: .9rem; color: var(--muted); }

/* original game screenshots */
.shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shot-grid figure {
  margin: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.shot-grid img { width: 100%; height: auto; display: block; }
.shot-grid figcaption { padding: 12px 16px 14px; font-size: .82rem; color: var(--muted); }
.shot-grid figcaption strong { display: block; color: var(--ink); font-size: .9rem; margin-bottom: 2px; }
.shot-credit { font-size: .78rem; color: var(--faint); margin: 14px 0 0; }

.keytable { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 14px; }
.keytable th, .keytable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.keytable th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 800; }
.keytable td { color: var(--muted); }
.keytable td:first-child { color: var(--ink); font-weight: 700; }
.keytable tr:last-child td { border-bottom: 0; }

.backlink { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.backlink:hover { color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .mg-grid { grid-template-columns: repeat(3, 1fr); }
  .game-head { grid-template-columns: 1fr; }
  .game-cols { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .mg-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .mg-name { font-size: .78rem; }
  .mg-tag { font-size: .64rem; }
  .shot-grid { grid-template-columns: 1fr; }
  .rotate-hint { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .mg-grid { grid-template-columns: repeat(2, 1fr); }
}
