.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr minmax(180px, 280px);
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(219, 226, 234, 0.9);
  background: rgba(246, 247, 251, 0.92);
  backdrop-filter: blur(18px);
  /* CLS fix: reserve height so content below doesn't jump */
  min-height: 76px;
  contain: layout;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
  transition: transform 0.2s ease;
}

.brand:hover .logo-img {
  transform: scale(1.05);
}



.nav-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-chips::-webkit-scrollbar {
  display: none;
}

.chip,
.collection-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.chip {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.chip.is-active,
.collection-btn.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 12px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 44px) 42px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  min-height: 280px;
  padding: clamp(38px, 7vw, 82px) 0 28px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.04rem;
}

.hero-copy p:last-child {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.hero-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  color: var(--muted);
}

.primary-action {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 0 var(--brand-dark), 0 15px 20px rgba(0,0,0,0.1);
  transition: transform 0.1s, box-shadow 0.1s;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.primary-action:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--brand-dark), 0 5px 10px rgba(0,0,0,0.1);
}

.secondary-action {
  min-height: 42px;
  padding: 0 16px;
  border: 2px solid var(--brand);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--brand-dark);
  font-weight: 800;
  box-shadow: 0 4px 0 var(--brand);
  transition: transform 0.1s, box-shadow 0.1s;
}
.secondary-action:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--brand);
}

.ad-row,
.mini-ad {
  display: grid;
  place-items: center;
}

.ad-row {
  /* CLS fix: reserve space for responsive banner ad (90px) + padding */
  min-height: 100px;
  margin: 22px 0;
  border: 1px dashed #b6c3d2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  /* Prevent ad from shifting surrounding content */
  contain: layout;
}

.ad-slot,
.ad-box {
  display: grid;
  place-items: center;
  color: #718093;
  font-size: 0.88rem;
  /* CLS fix: ensure ad container doesn't collapse before ad loads */
  min-height: 90px;
  width: 100%;
}

.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 10px;
}

.side-panel h2 {
  margin-bottom: 6px;
  font-size: 1.06rem;
}

.collection-btn {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  text-align: left;
}

.stats-status {
  margin: 2px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.mini-ad {
  min-height: 220px;
  margin-top: 10px;
  border: 1px dashed #b6c3d2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.section-head,
.play-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head > p {
  margin-bottom: 4px;
  color: var(--muted);
}

/* ── Homepage Sections ── */
.home-section {
  padding: 0 clamp(16px, 4vw, 44px) 32px;
  max-width: 1440px;
  margin: 0 auto;
}

.see-all-link {
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.see-all-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* Trending grid — larger cards */
.trending-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Category cards grid */
.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.12);
}

.category-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.category-card-info {
  min-width: 0;
}

.category-card-info strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 900;
}

.category-card-info span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

/* Collection sidebar — now uses <a> tags */
a.collection-btn {
  text-decoration: none;
  display: block;
  width: 100%;
  text-align: left;
}

/* Hero action — now uses <a> tag */
a.primary-action {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Nav chips as links (SEO-friendly) ── */
a.chip {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* ── Game card as link (SEO-friendly) ── */
a.game-card {
  text-decoration: none;
  color: var(--ink);
}

/* ── Breadcrumbs ── */
.breadcrumb-bar {
  padding: 10px clamp(16px, 4vw, 44px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.breadcrumb-link {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s;
}

.breadcrumb-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--muted);
  opacity: 0.5;
  font-size: 1rem;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 800;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.page-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Footer (multi-column, Poki-inspired) ── */
.footer {
  margin-top: 48px;
  padding: 40px clamp(16px, 4vw, 44px) 24px;
  background: var(--footer-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1440px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-logo {
  display: inline-block;
  text-decoration: none;
}

.footer-logo-img {
  height: 40px;
  width: auto;
}

.footer-tagline {
  color: var(--footer-muted);
  font-size: 0.92rem;
  font-weight: 700;
  font-style: italic;
  margin: 0;
}

.footer-copy {
  color: var(--footer-muted);
  font-size: 0.78rem;
  margin: 8px 0 0;
  opacity: 0.7;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h4 {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--footer-muted);
  opacity: 0.7;
}

.footer-col a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--brand);
}

@media (max-width: 880px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
