/* ─── Tokens ────────────────────────────────────────────────────────────── */

:root {
  --bg: #f6f5fc;
  --bg-soft: #eeecfb;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --border: rgba(29, 20, 60, 0.09);
  --border-strong: rgba(29, 20, 60, 0.16);

  --text: #17122b;
  --text-muted: #635d78;
  --text-faint: #948da8;

  --primary: #7c3aed;
  --primary-2: #4f46e5;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --gold: #f59e0b;

  --gradient-brand: linear-gradient(120deg, var(--primary), var(--cyan));
  --gradient-brand-2: linear-gradient(120deg, var(--pink), var(--primary));

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-card: 0 1px 2px rgba(23, 18, 43, 0.04), 0 12px 28px -12px rgba(76, 29, 149, 0.18);
  --shadow-card-hover: 0 1px 2px rgba(23, 18, 43, 0.06), 0 24px 48px -16px rgba(124, 58, 237, 0.32);
  --shadow-glow: 0 0 0 1px rgba(124, 58, 237, 0.12), 0 8px 30px rgba(124, 58, 237, 0.18);

  --container-w: 1240px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; width: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
dl { margin: 0; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.4rem); overflow-wrap: break-word; }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 56px 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.empty-state {
  padding: 48px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 1.05rem;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124, 58, 237, 0.34); }
.btn-ghost {
  background: var(--surface-glass);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ─── Nav ───────────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 245, 252, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-right: auto; }
.brand-name {margin-left: 10px;}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-glow);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -4px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
  transition: right 0.2s ease;
}
.nav-links a:hover::after { right: 0; }

.nav-search {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  min-width: 260px;
}
.nav-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text);
}
.nav-search input::placeholder { color: var(--text-faint); }
.nav-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--gradient-brand);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: none;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ─── Hero (detail pages) ──────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  background-color: #241a42;
  background-size: cover;
  background-position: center 30%;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 10, 35, 0.15) 0%, rgba(15, 10, 35, 0.55) 60%, var(--bg) 100%),
    linear-gradient(90deg, rgba(15, 10, 35, 0.55) 0%, rgba(15, 10, 35, 0.05) 55%);
}
.hero-inner {
  position: relative;
  padding-top: 90px;
  padding-bottom: 40px;
  color: #fff;
}
.hero-inner h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.hero-inner .eyebrow { color: #c9b8ff; }
.hero-subtitle { color: rgba(255, 255, 255, 0.82); max-width: 620px; font-size: 1.05rem; }

.tag-row, .detail-meta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.tag {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}
.tag-link:hover { background: rgba(255, 255, 255, 0.24); }
.meta-date { color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; }

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, #f59e0b, #f97316);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
}
.rating-pill-lg { padding: 7px 16px; font-size: 0.95rem; }

/* ─── Plain page header (no image) ─────────────────────────────────────── */

.page-header {
  position: relative;
  padding: 96px 0 44px;
  background:
    radial-gradient(680px 340px at 12% -10%, rgba(124, 58, 237, 0.16), transparent),
    radial-gradient(600px 300px at 100% 0%, rgba(6, 182, 212, 0.14), transparent),
    var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 10px; }
.page-header .hero-subtitle { color: var(--text-muted); }

/* ─── Home hero ─────────────────────────────────────────────────────────── */

.home-hero {
  position: relative;
  padding: 120px 0 90px;
  overflow: hidden;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.home-hero-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(560px 420px at 18% 20%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(520px 420px at 85% 15%, rgba(6, 182, 212, 0.24), transparent 60%),
    radial-gradient(480px 360px at 60% 90%, rgba(236, 72, 153, 0.18), transparent 60%);
  filter: blur(10px);
}
.home-hero-inner { position: relative; max-width: 720px; }
.home-hero h1 { max-width: 15ch; }
.home-hero h1 {
  background: linear-gradient(120deg, var(--text) 30%, var(--primary) 70%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-hero p { font-size: 1.1rem; max-width: 560px; }
.home-hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ─── Content rows / grids ─────────────────────────────────────────────── */

.content-row { padding: 44px 0; }
.row-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}
.row-heading h2 { margin: 0; }
.link-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  white-space: nowrap;
}
.link-more:hover { color: var(--primary-2); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}
.card-grid-games { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ─── Cards ─────────────────────────────────────────────────────────────── */

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(124, 58, 237, 0.35);
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: #241a42;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px;
  gap: 8px;
}
.card-grid-games .card-media { aspect-ratio: 3 / 4; align-items: flex-end; }
.card-body { padding: 18px 18px 20px; }
.card-body h3 { margin-bottom: 6px; font-size: 1.05rem; }
.card-body p { font-size: 0.9rem; margin-bottom: 10px; }
.card-kicker {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-faint); }

.card-badge {
  display: inline-flex;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(17, 12, 33, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.card-badge-hot { background: linear-gradient(120deg, var(--pink), #f97316); }

.badge-cheat { background: linear-gradient(120deg, var(--primary), var(--primary-2)); }
.badge-review { background: linear-gradient(120deg, var(--gold), #f97316); }
.badge-article { background: linear-gradient(120deg, var(--cyan), #0ea5e9); }
.badge-news { background: linear-gradient(120deg, var(--pink), var(--primary)); }
.badge-game { background: linear-gradient(120deg, #64748b, #334155); }

/* ─── Filter chips ──────────────────────────────────────────────────────── */

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.is-active { background: var(--gradient-brand); border-color: transparent; color: #fff; }

/* ─── Game detail ───────────────────────────────────────────────────────── */

.game-detail {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.game-detail-main h2 { margin-top: 36px; }
.game-detail-main h2:first-child { margin-top: 0; }
.prose { color: var(--text-muted); font-size: 1rem; }
.prose :is(h2, h3) { color: var(--text); margin-top: 1.4em; }
.prose-wide { font-size: 1.05rem; max-width: 760px; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1em; }

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.info-card h3 { margin-bottom: 14px; font-size: 1rem; }
.info-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.info-card dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); font-weight: 700; }
.info-card dd { margin: 0; font-size: 0.92rem; text-align: right; }

.release-list { display: flex; flex-direction: column; gap: 10px; }
.release-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 0.88rem; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.release-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.release-platform { font-weight: 700; }
.release-region { color: var(--text-faint); grid-column: 1; }
.release-date { color: var(--text-muted); font-weight: 600; grid-column: 2; grid-row: 1 / 3; align-self: center; white-space: nowrap; }

.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.screenshot { aspect-ratio: 16/9; border-radius: var(--radius-sm); background-size: cover; background-position: center; box-shadow: var(--shadow-card); }

.requirements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.requirement-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-card); }
.requirement-card h4 { font-family: var(--font-display); color: var(--primary); margin-bottom: 12px; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.06em; }
.requirement-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 0.88rem; }
.requirement-card dt { color: var(--text-faint); font-weight: 700; }
.requirement-notes { margin-top: 12px; font-size: 0.85rem; }

/* ─── Search ────────────────────────────────────────────────────────────── */

.search-form-large { display: flex; gap: 10px; margin-top: 24px; max-width: 560px; }
.search-form-large input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.95rem;
}
.search-form-large input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.search-results { display: flex; flex-direction: column; gap: 14px; }
.search-result {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.search-result:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.search-result-media { width: 120px; min-width: 120px; aspect-ratio: 4/3; border-radius: var(--radius-sm); background-size: cover; background-position: center; background-color: #241a42; }
.search-result-body h3 { margin: 6px 0; }
.search-result-body p { font-size: 0.9rem; margin: 0; }

/* ─── Pagination ────────────────────────────────────────────────────────── */

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; justify-content: center; }
.page-link {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.is-current { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.page-link.is-disabled { opacity: 0.4; pointer-events: none; }
.page-gap { display: inline-flex; align-items: center; color: var(--text-faint); }

/* ─── 404 ───────────────────────────────────────────────────────────────── */

.not-found { text-align: center; padding: 120px 0; }
.not-found p { max-width: 420px; margin: 0 auto 28px; }

/* ─── Footer ────────────────────────────────────────────────────────────── */

.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); margin-top: 60px; padding-top: 52px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 36px; }
.footer-brand { max-width: 320px; }
.footer-brand .brand-mark { margin-bottom: 12px; }
.footer-brand p { margin-top: 12px; font-size: 0.9rem; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-links h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 14px; }
.footer-links a { display: block; font-size: 0.92rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 500; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; font-size: 0.82rem; color: var(--text-faint); }

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .game-detail { grid-template-columns: 1fr; }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 14px 0; }
  .nav-search { display: none; order: 3; width: 100%; }
  .nav-links { display: none; order: 3; width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav-links a { width: 100%; padding: 10px 0; }
  .nav-toggle { display: flex; }
  .nav-search.is-open, .nav-links.is-open { display: flex; }
}

@media (max-width: 560px) {
  .section { padding: 36px 0; }
  .home-hero { padding: 80px 0 60px; }
  .hero { min-height: 340px; }
  .nav-inner { height: 64px; }
}
