/* ═══════════════════════════════════════════════════════
   FizGame — Clean White Design
   ═══════════════════════════════════════════════════════ */

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #ffffff;
  --bg2:         #f5f7fa;
  --bg3:         #eef0f5;
  --border:      #e2e6ed;
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --accent2:     #f97316;
  --text:        #111827;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   4px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.14);
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --font-head:   'Space Grotesk', system-ui, sans-serif;
  --transition:  0.18s ease;
  --max-w:       1160px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--accent); color: #fff;
  padding: .5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600; z-index: 9999; transition: top .15s;
}
.skip-link:focus { top: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4 { font-family: var(--font-head); line-height: 1.2; color: var(--text); }

code {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 2px 6px;
  font-size: .875em; color: #1d4ed8;
  font-family: 'Fira Code', Consolas, monospace;
}
pre {
  background: #1e293b; border: 1px solid #334155;
  border-radius: var(--radius-sm); padding: 1.25rem 1.5rem;
  overflow-x: auto; margin: 1rem 0; line-height: 1.6;
}
pre code { background: none; border: none; padding: 0; font-size: .85rem; color: #7dd3fc; }

/* base list styles for non-blog post-body content */
.post-body > ol, .post-body > ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-body > ol > li, .post-body > ul > li { margin-bottom: .35rem; }
#game-canvas { max-width: 100%; display: block; border-radius: var(--radius-sm); }

/* ─── Layout ────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.site-main { flex: 1; }

/* ─── Top announcement bar ──────────────────────────────── */
.top-bar {
  background: var(--accent); color: #fff;
  font-size: .8rem; text-align: center; padding: .3rem 1rem; letter-spacing: .02em;
}
.top-bar-inner {
  display: inline-flex; align-items: center; gap: .45rem;
}
.top-bar a { color: #fff; text-decoration: underline; }
.top-bar a:hover { text-decoration: none; }

/* ─── Header ────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: #fff; border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: 64px; gap: 1rem;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: .45rem;
  color: var(--text); font-family: var(--font-head);
  font-weight: 700; font-size: 1.25rem; white-space: nowrap; flex-shrink: 0;
}
.logo:hover { color: var(--accent); }
.logo-icon { font-size: 1.4rem; }
.logo-text { color: var(--accent); }

/* Search */
.header-search { flex: 1; max-width: 280px; position: relative; }
.header-search input {
  width: 100%; padding: .48rem 1rem .48rem 2.4rem;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: .88rem; font-family: var(--font);
  background: var(--bg2); color: var(--text); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.header-search input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: #fff;
}
.header-search input::placeholder { color: var(--text-light); }
.search-icon {
  position: absolute; left: .8rem; top: 50%;
  transform: translateY(-50%); color: var(--text-muted);
  pointer-events: none; font-size: .9rem;
}

/* Main Nav */
.site-nav { display: flex; align-items: center; gap: .05rem; flex-shrink: 0; }

.nav-link {
  padding: .42rem .7rem;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent); background: var(--bg2); }
.nav-link.active { color: var(--accent); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-link { display: flex; align-items: center; gap: .25rem; cursor: default; }
.nav-dropdown > .nav-link::after { content: '▾'; font-size: .65rem; color: var(--text-light); }
.dropdown-menu {
  display: none; position: absolute;
  top: 100%; left: 0;
  padding-top: 8px; /* transparent bridge — keeps hover alive over the gap */
  background: transparent;
  min-width: 160px; z-index: 300;
}
.dropdown-menu::before {
  content: ''; display: block;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  position: absolute;
  top: 8px; left: 0; right: 0; bottom: 0;
  z-index: -1;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: .6rem 1rem;
  font-size: .85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--bg2); color: var(--accent); }

/* CTA button in nav */
.nav-cta {
  margin-left: .4rem;
  padding: .42rem .85rem !important;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--accent-dark) !important; }

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-xs); cursor: pointer; padding: 6px; flex-shrink: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  padding: 4.5rem 0 3rem; text-align: center;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: rgba(37,99,235,.05);
  top: -200px; right: -150px; pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(37,99,235,.1); color: var(--accent);
  border: 1px solid rgba(37,99,235,.2); border-radius: 999px;
  padding: .3rem .9rem; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700;
  color: var(--text); margin-bottom: .75rem; letter-spacing: -.02em;
}
.hero p { font-size: 1.05rem; color: var(--text-muted); max-width: 540px; margin: 0 auto 2rem; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn-group { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .62rem 1.35rem;
  border-radius: var(--radius-sm); font-size: .92rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform .1s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--bg2); color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }

/* ─── Section ───────────────────────────────────────────── */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header {
  display: flex; align-items: baseline;
  justify-content: space-between; margin-bottom: 2rem; gap: 1rem;
}
.section-header h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.section-header a { font-size: .9rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.section-header a:hover { text-decoration: underline; }

/* ─── Categories strip ──────────────────────────────────── */
.categories-strip { padding: 1.25rem 0; border-bottom: 1px solid var(--border); background: var(--bg2); }
.cats-row { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.cat-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .38rem .85rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--border);
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
  transition: all var(--transition); cursor: pointer; text-decoration: none;
}
.cat-chip:hover, .cat-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── Stats bar ─────────────────────────────────────────── */
.stats-bar { background: var(--accent); color: #fff; padding: 2rem 0; }
.stats-inner { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; text-align: center; }
.stat-item strong { display: block; font-size: 2rem; font-weight: 700; font-family: var(--font-head); line-height: 1; margin-bottom: .25rem; }
.stat-item span { font-size: .82rem; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }

/* ─── Cards grid ────────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

/* ─── Game Card ─────────────────────────────────────────── */
.game-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.game-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.game-thumb {
  aspect-ratio: 16/9; background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-bottom: 1px solid var(--border);
}
.game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-thumb-placeholder { font-size: 3.5rem; }
.game-body { padding: 1.1rem; display: flex; flex-direction: column; flex: 1; }
.game-meta { display: flex; gap: .4rem; margin-bottom: .65rem; flex-wrap: wrap; }
.badge {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: .18rem .52rem; border-radius: 999px;
  background: var(--bg2); color: var(--text-muted); border: 1px solid var(--border);
}
.badge-arcade  { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-puzzle  { background: #faf5ff; color: #7c3aed; border-color: #ddd6fe; }
.badge-sports  { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.badge-easy    { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.badge-medium  { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-hard    { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.game-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; color: var(--text); }
.game-desc { font-size: .88rem; color: var(--text-muted); margin-bottom: .7rem; flex: 1; }
.game-controls { font-size: .82rem; color: var(--text-light); margin-bottom: .9rem; display: flex; gap: .35rem; }

/* ─── Blog Card ─────────────────────────────────────────── */
.blog-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.blog-card-meta { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-light); margin-bottom: .6rem; }
.blog-card-cat {
  background: #eff6ff; color: var(--accent); border: 1px solid #bfdbfe;
  border-radius: 999px; padding: .15rem .55rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.blog-card-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; line-height: 1.35; }
.blog-card-title:hover { color: var(--accent); }
.blog-card-excerpt { font-size: .88rem; color: var(--text-muted); margin-bottom: 1rem; flex: 1; }
.blog-card-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.tag { font-size: .78rem; color: var(--text-muted); background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: .15rem .45rem; }

/* ─── Ad units ──────────────────────────────────────────── */
.ad-unit { text-align: center; margin: .75rem auto; }
.ad-label {
  display: block; text-align: center;
  font-size: .625rem; letter-spacing: .12em;
  color: var(--text-muted); padding: .35rem 0 .25rem;
  text-transform: uppercase;
}
.ad-inner { width: 100%; }

/* Test-mode placeholder box */
.ad-placeholder {
  display: flex; align-items: center; justify-content: center;
  max-width: 100%; margin: 0 auto;
  background: repeating-linear-gradient(
    45deg,
    #f3f4f6,
    #f3f4f6 10px,
    #e5e7eb 10px,
    #e5e7eb 20px
  );
  border: 2px dashed #9ca3af;
  border-radius: 4px;
  box-sizing: border-box;
}
.ad-placeholder-text {
  font-size: .75rem; font-weight: 600;
  color: #6b7280; letter-spacing: .05em;
  background: rgba(255,255,255,.8);
  padding: .25rem .6rem; border-radius: 3px;
}

/* Homepage large block — bordered, full-width with side margins on desktop */
.ad-homepage {
  border: 1px solid var(--border);
  margin: 0 auto 1.5rem;
  max-width: 1200px;
}
@media (max-width: 768px) {
  .ad-homepage { border-left: none; border-right: none; }
}

/* Leaderboard */
.ad-leaderboard { max-width: 728px; margin: 0 auto 1rem; }

/* ─── Single game page ──────────────────────────────────── */
.game-page-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.game-area { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.game-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.sidebar-box h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.controls-list { list-style: none; }
.controls-list li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; font-size: .88rem; border-bottom: 1px solid var(--border); }
.controls-list li:last-child { border-bottom: none; }
.key-badge { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: .15rem .4rem; font-size: .78rem; font-weight: 700; font-family: monospace; color: var(--text); min-width: 28px; text-align: center; }

/* D-pad */
.d-pad { display: grid; grid-template-columns: repeat(3, 48px); gap: 4px; justify-content: center; margin: 1rem auto; }
.d-btn { width: 48px; height: 48px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); touch-action: manipulation; }
.d-btn:active { background: var(--accent); color: #fff; }
.d-center { grid-column: 2; grid-row: 2; }

/* ─── Post page ─────────────────────────────────────────── */
.post-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
.post-content { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.post-header { padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.post-title { font-size: clamp(1.25rem, 5vw, 2.2rem); line-height: 1.25; margin-bottom: .75rem; color: var(--text); word-break: break-word; }
.post-meta { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; font-size: .875rem; color: var(--text-muted); }
/* .post-body typography — overridden by blog-post.css inside .wrap */
.post-body h2 { font-size: 1.3rem; margin: 1.75rem 0 .75rem; }
.post-body h3 { font-size: 1.1rem; margin: 1.5rem 0 .6rem; }
.post-body > p { margin-bottom: 1rem; }
.post-body a { text-decoration: underline; }

/* post page wrapper */
.post-page { padding: 1rem 1rem 1rem; overflow-x: hidden; }
.post-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

/* ─── About / Contact pages ─────────────────────────────── */
.page-hero { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 3rem 0 2.5rem; text-align: center; }
.page-hero h1 { font-size: 2.25rem; margin-bottom: .5rem; }
.page-hero p { color: var(--text-muted); max-width: 500px; margin: 0 auto; }
.page-content { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow-sm); max-width: 760px; margin: 2.5rem auto; }
.page-content h2 { font-size: 1.25rem; margin: 1.75rem 0 .75rem; }
.page-content p { color: var(--text-muted); margin-bottom: 1rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .9rem; font-weight: 600; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  padding: .6rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font); color: var(--text);
  background: var(--bg2); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: #fff;
}
.form-group textarea { min-height: 130px; resize: vertical; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.team-card { text-align: center; padding: 1.5rem 1rem; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); }
.team-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto .75rem; }
.team-card h4 { font-size: .95rem; margin-bottom: .2rem; }
.team-card span { font-size: .8rem; color: var(--text-muted); }

/* ─── Breadcrumb ────────────────────────────────────────── */
nav[aria-label="Breadcrumb"] { outline: none; overflow: hidden; }
.breadcrumb {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  padding: .9rem 0 1.1rem;
  margin: 0;
  font-size: .8rem;
  min-width: 0;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  min-width: 0;
  flex-shrink: 0;
}
.breadcrumb li:last-child {
  flex-shrink: 1;
  min-width: 0;
}
.breadcrumb li + li::before {
  content: '/';
  margin: 0 .45rem;
  color: var(--border);
  font-size: .75rem;
  flex-shrink: 0;
}
.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
  white-space: nowrap;
}
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb [aria-current="page"],
.breadcrumb .current {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ─── Post navigation ───────────────────────────────────── */
nav[aria-label="Post navigation"] { outline: none; }
.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.post-nav a {
  font-size: .875rem;
  color: var(--text-muted);
  max-width: 45%;
  line-height: 1.4;
  transition: color var(--transition);
}
.post-nav a:hover { color: var(--accent); }
.post-nav a:last-child { text-align: right; }
.post-nav-spacer { flex: 1; }

.post-back {
  margin-top: 2.5rem;
  text-align: center;
}

/* ─── Blog post — Play Now in-content button ────────────── */
.post-play-cta {
  margin: 2rem 0;
}
.post-play-cta-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  border-radius: 14px;
  padding: .85rem 1.25rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 4px 18px rgba(99,102,241,.35);
}
.post-play-cta-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #6d28d9);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 28px rgba(99,102,241,.5);
  color: #fff;
  text-decoration: none;
}
.post-play-cta-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.25);
  transition: transform .18s ease;
}
.post-play-cta-btn:hover .post-play-cta-thumb {
  transform: scale(1.06);
}
.post-play-cta-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.post-play-cta-label {
  font-size: .7rem;
  opacity: .8;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.post-play-cta-name {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-play-cta-action {
  font-size: .88rem;
  font-weight: 600;
  background: rgba(255,255,255,.2);
  padding: .45rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .18s ease;
}
.post-play-cta-btn:hover .post-play-cta-action {
  background: rgba(255,255,255,.32);
}
@media (max-width: 480px) {
  .post-play-cta-action { display: none; }
  .post-play-cta-thumb { width: 52px; height: 52px; }
}

/* ─── Pagination ────────────────────────────────────────── */
.pagination { display: flex; gap: .5rem; justify-content: center; padding: 2rem 0; }
.page-btn { padding: .5rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: .88rem; font-weight: 600; color: var(--text-muted); background: #fff; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.page-btn:hover, .page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── Footer ────────────────────────────────────────────── */
.site-footer { background: #fff; border-top: 1px solid var(--border); margin-top: auto; }

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem; padding: 3rem 0 2rem;
}

.footer-brand .logo { margin-bottom: .75rem; font-size: 1.1rem; }
.footer-brand p { font-size: .88rem; color: var(--text-muted); line-height: 1.6; max-width: 240px; margin-bottom: 1rem; }
.social-links { display: flex; gap: .6rem; }
.social-link {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-muted);
  transition: all var(--transition); text-decoration: none;
}
.social-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.social-link--pinterest:hover { background: #e60023; border-color: #e60023; }

.footer-col h3 {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul a {
  font-size: .85rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .03em;
  font-weight: 500; transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--accent); }

.footer-contact-btn {
  display: inline-block; margin-top: 1.25rem;
  padding: .55rem 1.1rem; background: var(--accent); color: #fff;
  border-radius: var(--radius-sm); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  transition: background var(--transition);
}
.footer-contact-btn:hover { background: var(--accent-dark); color: #fff; }

.footer-bottom {
  border-top: 1px solid var(--border); padding: 1rem 0;
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p { font-size: .82rem; color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 1.25rem; }
.footer-bottom-links a { font-size: .82rem; color: var(--text-muted); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--accent); }

/* ─── Recently Played ──────────────────────────────────── */
.recent-section {
  padding: 1.25rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
}
.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.recent-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.recent-clear {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .2rem .65rem;
  font-size: .78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.recent-clear:hover { color: var(--accent); border-color: var(--accent); }
.recent-row {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .75rem;
  scrollbar-width: none;
}
.recent-row::-webkit-scrollbar { display: none; }
.recent-card {
  flex: 0 0 auto;
  width: 100px;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: transform .15s;
}
.recent-card:hover { transform: translateY(-3px); }
.recent-thumb {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg2);
  margin-bottom: .35rem;
}
.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recent-label {
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text);
}

/* ─── Homepage tagline ──────────────────────────────────── */
.home-tagline {
  text-align: center;
  padding: 2.5rem 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.home-tagline h1 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--text);
  font-style: italic;
}
.home-tagline h1 strong {
  font-weight: 900;
  font-style: italic;
  color: var(--text);
}

/* ─── Home game grid ─────────────────────────────────────── */
.home-grid-wrap { padding-top: 2rem; padding-bottom: 4rem; }

.home-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.hgc {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.hgc:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
  border-color: transparent;
}

/* Play-button overlay on hover */
.hgc::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 16px)) scale(.7);
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 48px;
  text-align: center;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  z-index: 3;
}
.hgc:hover::after {
  opacity: 1;
  transform: translate(-50%, calc(-50% - 16px)) scale(1);
}

.hgc-thumb {
  aspect-ratio: 4/3;
  background: var(--bg2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hgc-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background .2s ease;
}
.hgc:hover .hgc-thumb::after { background: rgba(0,0,0,.18); }

.hgc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
  display: block;
}
.hgc:hover .hgc-thumb img { transform: scale(1.08); }
.hgc-placeholder { font-size: 3.5rem; }

.hgc-title {
  padding: .6rem .75rem .7rem;
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .01em;
}
.hgc:hover .hgc-title { color: var(--accent); }

/* Trending 🔥 badge — top-left corner of thumbnail */
.hgc-trending-badge {
  position: absolute;
  top: 7px;
  left: 8px;
  z-index: 2;
  font-size: 1.1rem;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
  pointer-events: none;
}

/* ─── Game detail page ──────────────────────────────────── */
.gd-wrap { padding: 2rem 0 3rem; }

.gd-center {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1rem;
}

.gd-title {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--text);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.gd-preview-static {
  display: flex;
  justify-content: center;
  margin: 0 auto 1.25rem;
  cursor: pointer;
}

.gd-thumb-img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: block;
  margin: 0 auto;
  transition: transform var(--transition);
}
.gd-preview-static:hover .gd-thumb-img { transform: scale(1.03); }
.gd-thumb-placeholder {
  width: 240px; height: 240px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}

.gd-canvas {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

/* ── START GAME + Share row ─────────────────────────── */
.gd-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
  position: relative;
}

.gd-start-btn {
  display: inline-block;
  padding: .85rem 3rem;
  background: var(--accent);
  color: #fff !important;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: .12em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
  transition: background var(--transition), transform .1s;
  text-decoration: none;
}
.gd-start-btn:hover  { background: var(--accent-dark); color: #fff !important; transform: translateY(-1px); }
.gd-start-btn:active { transform: scale(.97); }

.gd-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.15);
  background: rgba(0,0,0,.06);
  color: #555;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.gd-share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37,99,235,.08);
}
.gd-share-btn:active { transform: scale(.93); }

.gd-share-toast {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #111;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 99;
  transition: opacity .2s, transform .2s;
}
.gd-share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gd-desc {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  text-align: left;
}

.gd-tags {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}
.gd-tag {
  padding: .3rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg2);
}

.gd-more { margin-top: 2rem; }
.gd-more-tagline {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.25rem;
  letter-spacing: .02em;
}
.gd-more-tagline strong { font-weight: 900; color: var(--text); }

/* ─── 404 page ──────────────────────────────────────────── */
.error-page { text-align: center; padding: 6rem 1rem; }
.error-code { font-size: 7rem; font-weight: 700; color: var(--bg3); font-family: var(--font-head); line-height: 1; margin-bottom: .5rem; }
.error-page h1 { font-size: 1.75rem; margin-bottom: .75rem; }
.error-page p { color: var(--text-muted); margin-bottom: 2rem; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .game-page-layout { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
}

@media (max-width: 1024px) {
  .home-game-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; }
}

@media (max-width: 768px) {
  .home-game-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .gd-preview { width: 180px; }
  .gd-thumb-img, .gd-thumb-placeholder { width: 180px; height: 180px; }
  .header-search { display: none; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    padding: .75rem; gap: .2rem; box-shadow: var(--shadow); z-index: 199;
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: .7rem 1rem; text-align: left; }
  .nav-dropdown .dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .nav-cta { margin-left: 0; }
  .nav-toggle { display: flex; }
  .site-header { position: relative; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .stats-inner { gap: 1.5rem; }
  .hero { padding: 3rem 0 2rem; }
}

@media (max-width: 480px) {
  .footer-main { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: .4rem; }
}
