/* PlayTundra — dark arcade theme, mobile-first */
:root {
  --bg: #0b1020;
  --bg-soft: #0f1628;
  --card: #151d33;
  --card-hi: #1b2542;
  --ink: #e9eef8;
  --muted: #97a3bd;
  --brand: #3fd8d4;
  --brand-soft: rgba(63, 216, 212, .12);
  --accent: #8be9fd;
  --border: #23304f;
  --radius: 14px;
  --shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--bg);
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
a { color: var(--brand); }
h1 { font-size: 1.7rem; line-height: 1.25; margin: .4em 0 .25em; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; margin: 1.5em 0 .5em; }
h3 { font-size: 1.02rem; margin: 1.1em 0 .3em; }
@media (min-width: 640px) { h1 { font-size: 2.1rem; } }

/* header */
.site-header { background: rgba(11, 16, 32, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.logo-text { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.logo-text em { font-style: normal; color: var(--brand); }
.site-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.site-nav a {
  white-space: nowrap; text-decoration: none; color: var(--muted);
  font-size: .88rem; font-weight: 600; padding: 6px 11px; border-radius: 999px;
}
.site-nav a:hover, .site-nav a.active { color: var(--brand); background: var(--brand-soft); }
@media (max-width: 720px) {
  .header-inner { gap: 8px; }
  .site-nav { margin-left: 0; width: 100%; padding-bottom: 2px; }
}

/* layout */
.main { padding: 18px 18px 44px; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin: 8px 0 2px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.subtitle { color: var(--muted); margin: 0 0 16px; font-size: 1.02rem; max-width: 70ch; }

/* game stage */
.stage-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.game-stage { position: relative; width: 100%; max-height: 76vh; margin: 0 auto; background: #000; overflow: hidden; }
.stage-wrap.portrait .game-stage { max-width: 420px; }
.stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(26px) brightness(.45); transform: scale(1.15); }
.stage-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 16px; }
.stage-thumb { width: min(46%, 240px); height: auto; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.btn-play {
  font: inherit; font-weight: 800; font-size: 1.15rem; cursor: pointer;
  color: #06231f; background: linear-gradient(135deg, var(--brand), var(--accent));
  border: none; border-radius: 999px; padding: 14px 34px; min-height: 52px;
  box-shadow: 0 6px 22px rgba(63, 216, 212, .4);
}
.btn-play:hover { transform: translateY(-1px); }
.stage-note { font-size: .8rem; color: #cfe7ef; opacity: .85; }
.game-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); }
.stage-title { font-weight: 700; font-size: .95rem; }
.btn-fs {
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  color: var(--brand); background: var(--brand-soft); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 12px; min-height: 38px;
}
.btn-fs:hover { border-color: var(--brand); }

/* article */
.article { max-width: 74ch; }
.article p, .article li { color: #c6d0e2; }
.article ul { padding-left: 22px; }
.controls li { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; }
.intro p { max-width: 80ch; }

/* game grids */
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.game-grid.big { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .game-grid.big { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .game-grid, .game-grid.big { grid-template-columns: repeat(2, 1fr); } }
.game-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: transform .14s ease, border-color .14s ease;
}
.game-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.game-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gc-title { font-weight: 700; font-size: .92rem; padding: 9px 11px 2px; line-height: 1.3; }
.gc-cat { font-size: .74rem; color: var(--muted); padding: 0 11px 10px; }

/* home */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: 2.1rem; background: linear-gradient(90deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 62ch; }
@media (min-width: 640px) { .hero h1 { font-size: 2.7rem; } }
.home-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; }
.see-all, .see-more a { font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ad slots (zero height until ads enabled) */
.ad-slot { margin: 14px 0; min-height: 0; }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 34px; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 28px; }
.foot-disclaimer { font-size: .8rem; color: var(--muted); max-width: 82ch; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; }
.foot-nav a { font-size: .88rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.foot-nav a:hover { color: var(--brand); }
.foot-copy { font-size: .8rem; color: var(--muted); margin: 0; }

/* static pages */
.static-page { max-width: 74ch; }
.static-page h2 { margin-top: 1.4em; }
