/* AnonArcade — shared design system */

:root {
  /* Dark, game-platform theme. Cyan + pink are the site's own brand colors
     (already used in the header's glitch-effect logo) — reused here as the
     primary/accent pair instead of introducing new, unrelated colors. */
  --color-bg: #0e0f13;
  --color-bg-alt: #16171d;
  --color-surface: #1b1c23;
  --color-surface-hover: #23252e;
  --color-primary: #4fd8e0;
  --color-primary-dark: #33b8c0;
  --color-accent: #ee6fa8;
  --color-accent-dark: #d8558e;
  --color-success: #4ade80;
  --color-text: #f3f4f8;
  --color-text-soft: #9aa1ad;
  --color-border: #2a2c35;
  --color-on-accent: #0e0f13;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 14px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(79, 216, 224, 0.28);
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--color-primary); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; color: #7ee6ec; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-on-accent);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: #0a0b0e;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.4rem;
}
.site-logo:hover { text-decoration: none; }
.site-logo__text {
  position: relative;
  display: inline-block;
  color: #ffffff;
  letter-spacing: 0.01em;
}
.site-logo__text::before,
.site-logo__text::after {
  content: "AnonArcade";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}
.site-logo__text::before {
  color: #4fd8e0;
  transform: translate(-4px, -3px);
}
.site-logo__text::after {
  color: #ee6fa8;
  transform: translate(4px, 3px);
}
.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.site-nav a {
  color: #c8ccd4;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  padding: 8px 4px;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--color-primary); text-decoration: none; }
/* magnifier: always-visible way into search (the link goes to /category.html#search; site.js focuses an on-page search box instead when there is one) */
.site-nav .site-nav__search { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 8px; border-radius: 10px; }
.site-nav .site-nav__search svg { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px;
  background: #0a0b0e;
  border-top: 1px solid var(--color-border);
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 20px 40px;
  text-align: center;
  color: var(--color-text-soft);
}
.site-footer__brand { font-weight: 700; color: var(--color-text); margin-bottom: 10px; }
.site-footer__links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.site-footer__note { font-size: 0.92rem; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 54px 0 34px;
  text-align: center;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  width: 900px;
  max-width: 100%; /* was 160vw: a 900px glow centred on a phone-width hero made every .hero page scroll sideways; % also ignores the scrollbar that 100vw counts */
  height: 340px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(79, 216, 224, 0.16), transparent),
    radial-gradient(closest-side at 75% 40%, rgba(238, 111, 168, 0.13), transparent);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--color-text-soft);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 26px;
}

/* ---------- Search + filters ---------- */
.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-bottom: 34px;
}
.search-box {
  width: 100%;
  max-width: 460px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border-radius: 999px;
  border: 2px solid var(--color-border);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa1ad' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 16px center;
  background-size: 18px;
}
.search-box input::placeholder { color: var(--color-text-soft); }
.search-box input:focus { outline: none; border-color: var(--color-primary); }

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.chip {
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}
.chip:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.chip[aria-pressed="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-accent);
}

/* ---------- Game grid + cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  margin: 20px 0 56px;
}
.game-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.game-card:hover, a.game-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(79, 216, 224, 0.5);
  text-decoration: none;
}
.game-card__thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.6rem;
  transition: transform .2s ease;
}
a.game-card:hover .game-card__thumb { transform: scale(1.06); }
.game-card__body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.game-card__title { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 6px; }
.game-card__tagline { font-size: 0.92rem; color: var(--color-text-soft); margin: 0 0 14px; flex: 1; }
.game-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: rgba(79, 216, 224, 0.14);
  color: var(--color-primary);
  padding: 4px 9px;
  border-radius: 999px;
}
.game-card--soon { opacity: 0.65; cursor: default; }
.game-card--soon .game-card__thumb::after { content: ""; }
.badge-soon {
  position: absolute;
  margin: 10px;
  background: var(--color-accent-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.game-card__thumb-wrap { position: relative; }

.empty-state {
  text-align: center;
  color: var(--color-text-soft);
  padding: 40px 20px;
  font-size: 1.05rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--color-text-soft);
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--color-border); }
.breadcrumb a { color: var(--color-text-soft); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: none; }
.breadcrumb li[aria-current="page"] { color: var(--color-text); font-weight: 700; }

/* ---------- Long-form SEO copy (category pages, game "about" sections) ---------- */
.seo-content { max-width: 760px; }
.seo-content h2 { font-size: 1.25rem; margin: 32px 0 12px; }
.seo-content h2:first-child { margin-top: 0; }
.seo-content h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.seo-content p { color: var(--color-text-soft); line-height: 1.65; margin: 0 0 14px; }
.seo-content ul, .seo-content ol { color: var(--color-text-soft); line-height: 1.65; padding-left: 1.3em; margin: 0 0 14px; }
.seo-content li { margin-bottom: 6px; }
.seo-content a { color: var(--color-primary); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px 18px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--color-primary); font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 16px; }

/* ---------- Category hub intro ---------- */
.category-hero { padding: 40px 0 18px; }
.category-hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin-bottom: 10px; }
.category-hero p { color: var(--color-text-soft); font-size: 1.08rem; max-width: 680px; margin: 0 0 6px; }

/* ---------- Homepage intro lede (extends the hero, not a plain text block) ---------- */
.home-intro {
  text-align: center;
  color: var(--color-text-soft);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 44px;
}

/* ---------- Homepage section headings ---------- */
.home-section { padding: 8px 0 44px; }
.home-section h2 {
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}
.home-section__lede {
  text-align: center;
  color: var(--color-text-soft);
  max-width: 620px;
  margin: 0 auto 26px;
}

/* ---------- Category card grid (homepage "Browse by category") ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  color: var(--color-text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.category-card:hover, .category-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(79, 216, 224, 0.5);
  text-decoration: none;
}
.category-card__icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--category-tint, #2a2c35);
}
.category-card__title { display: block; font-size: 1rem; font-weight: 800; margin: 0 0 2px; }
.category-card__blurb { font-size: 0.86rem; color: var(--color-text-soft); margin: 0; }

/* ---------- Trust panel (homepage "Why parents and teachers pick AnonArcade") ---------- */
.trust-panel {
  background: linear-gradient(135deg, rgba(79, 216, 224, 0.08), rgba(238, 111, 168, 0.05));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  max-width: 820px;
  margin: 0 auto;
}
.trust-panel__list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 24px;
}
.trust-panel__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text);
  line-height: 1.5;
}
.trust-panel__list li::before {
  content: "✓";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.trust-panel__note { color: var(--color-text-soft); margin: 0; line-height: 1.6; }
.trust-panel__note a { color: var(--color-primary); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-weight: 800;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-primary); color: var(--color-on-accent); }
.btn-primary:hover { background: #7ee6ec; }
.btn-accent { background: var(--color-accent); color: var(--color-on-accent); }
.btn-accent:hover { background: var(--color-accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-text); border: 2px solid var(--color-border); }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ---------- Generic content page ---------- */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 20px 70px;
}
.page-content h1 { font-size: 2rem; margin-bottom: 0.4em; }
.page-content h2 { font-size: 1.35rem; margin-top: 1.6em; }
.page-content ul { padding-left: 1.2em; }
.page-content li { margin-bottom: 0.5em; }

@media (max-width: 640px) {
  .site-header__inner { justify-content: center; text-align: center; padding: 8px 12px 2px; gap: 0 10px; }
  /* Phone header: the sticky bar was 116px (179px at 360px, where "Parents & Safety" wrapped to a third row) = a quarter of the
     screen on every page. Logo row + one nav row that always fits (down to 320px), ~84px. */
  .site-logo { font-size: 1.3rem; line-height: 1.25; }
  .site-nav { gap: 12px; flex-wrap: nowrap; justify-content: center; }
  .site-nav a { font-size: 0.88rem; white-space: nowrap; }
  .site-nav a[href="/"] { display: none; } /* the logo is the home link; frees room for the search magnifier */
  /* Phone footer: 21 category links sat in ~44px rows (18px gap on 26px lines) = a 750px footer, a whole screen. Tighter rows and a
     smaller top margin bring it to roughly half; every link stays (same HTML) with a 32px tap height. */
  .site-footer { margin-top: 36px; }
  .site-footer__inner { padding: 22px 20px 28px; }
  .site-footer__brand { margin-bottom: 8px; }
  .site-footer__links { gap: 2px 14px; margin-bottom: 8px; }
  .site-footer__links a { font-size: 0.88rem; padding: 3px 0; }
  .site-footer__note { font-size: 0.85rem; }
  .hero { padding: 36px 0 24px; }
}
