/* ============================================================
   CodesBlox — main stylesheet
   Roblox-style dark theme: brand blue + "active code" green
   ============================================================ */

:root {
  /* Backgrounds */
  --bg:            #0e1216;
  --bg-elev:       #151a20;
  --surface:       #1a2027;
  --surface-2:     #212933;
  --border:        #2a323c;
  --border-soft:   #222932;

  /* Text */
  --text:          #e9eef4;
  --text-dim:      #9aa8b6;
  --text-faint:    #6c7885;

  /* Brand */
  --blue:          #00a2ff;
  --blue-dark:     #0079c1;
  --green:         #31d17e;
  --green-dark:    #1c8b52;
  --red:           #ff5c6c;
  --amber:         #ffb340;

  /* Other */
  --radius:        14px;
  --radius-sm:     10px;
  --shadow:        0 10px 30px rgba(0, 0, 0, .45);
  --ring:          0 0 0 3px rgba(0, 162, 255, .32);
  --header-h:      64px;

  --font:          'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:     'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(0, 162, 255, .13), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, rgba(49, 209, 126, .09), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }

/* The hidden attribute always wins over a component's display */
[hidden] { display: none !important; }

.container { width: min(1400px, calc(100% - 48px)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 16px; }

::selection { background: rgba(0, 162, 255, .35); }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: #333d49 transparent; }
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: #333d49; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #445162; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(14, 18, 22, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  height: 100%;
  width: min(1400px, calc(100% - 48px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(240px, 620px) minmax(150px, 1fr);
  align-items: center;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(150deg, #1d2733, #141a21);
  border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease;
}
.brand:hover .brand-mark { transform: translateY(-1px) rotate(-4deg); box-shadow: 0 6px 18px rgba(0, 162, 255, .25); }
.brand-text { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.brand-accent {
  background: linear-gradient(92deg, var(--blue), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Search box ---------- */
.search { position: relative; width: 100%; justify-self: center; }

.search-input {
  width: 100%; height: 40px;
  padding: 0 40px 0 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text); font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus {
  outline: none; background: var(--surface-2);
  border-color: var(--blue); box-shadow: var(--ring);
}
.search-input::-webkit-search-cancel-button { display: none; }

.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; fill: none; stroke: var(--text-faint);
  stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.search-input:focus ~ .search-icon { stroke: var(--blue); }

.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: #333d49; color: var(--text-dim); font-size: 16px; line-height: 1;
  display: grid; place-items: center;
}
.search-clear:hover { background: #414d5c; color: #fff; }

/* Suggestions */
.search-suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden; z-index: 70;
}
.suggest-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-bottom: 1px solid var(--border-soft);
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.is-active { background: var(--surface-2); }
.suggest-item img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.suggest-name { font-weight: 600; font-size: 14px; flex: 1; }
.suggest-count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  color: var(--green); background: rgba(49, 209, 126, .12);
  border: 1px solid rgba(49, 209, 126, .25);
  padding: 2px 8px; border-radius: 99px; white-space: nowrap;
}
.suggest-empty { padding: 14px; color: var(--text-dim); font-size: 14px; text-align: center; }

.header-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.header-nav-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 18px;
  font-weight: 800; font-size: 14px; letter-spacing: -.1px;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease,
              background-position .3s ease, border-color .18s ease, color .18s ease;
}
.header-nav-btn svg { width: 16px; height: 16px; }

/* Games — quiet, so it doesn't compete with the Guides button */
.header-games-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
}
.header-games-btn svg { fill: currentColor; }
.header-games-btn:hover { border-color: var(--blue); color: var(--blue); }

/* Guides — the accent button */
.header-guides-btn {
  background: linear-gradient(100deg, var(--blue), var(--green));
  background-size: 160% 160%; background-position: 0% 50%;
  color: #06231a;
  box-shadow: 0 6px 18px rgba(0, 162, 255, .3);
}
.header-guides-btn svg { fill: #06231a; }
.header-guides-btn:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow: 0 10px 24px rgba(0, 162, 255, .42);
}

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */
.hero { padding: 46px 0 30px; }
.hero-title {
  margin: 0 0 10px; font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 800; letter-spacing: -1px; line-height: 1.12;
}
.grad {
  background: linear-gradient(92deg, var(--blue), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 0 0 18px; color: var(--text-dim); font-size: 16px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats span {
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 99px;
  font-size: 13px; color: var(--text-dim);
}
.hero-stats strong { color: var(--text); font-weight: 700; }

/* ============================================================
   SECTIONS AND ROWS
   ============================================================ */
.section { padding: 14px 0 26px; }
.section-head { margin-bottom: 14px; }
.section-title {
  margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.3px;
  display: inline-flex; align-items: center; gap: 8px;
}
.section-title .arrow { color: var(--text-faint); transition: transform .16s ease, color .16s ease; }
.section-head:hover .arrow { transform: translateX(4px); color: var(--blue); }

.section-head-link { display: inline-block; color: inherit; }
.section-head-link:hover .section-title { color: var(--blue); }

.section-more { margin: 14px 0 0; text-align: right; font-size: 13px; }
.section-more a { color: var(--text-dim); transition: color .16s ease; }
.section-more a:hover { color: var(--blue); }
.section-sub { margin: 3px 0 0; font-size: 13px; color: var(--text-faint); }

.row-wrap { position: relative; }

.row {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 2px 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;      /* Firefox: no visible scrollbar, arrows only */
  -ms-overflow-style: none;   /* old Edge/IE */
}
.row::-webkit-scrollbar { display: none; }

.row-nav {
  position: absolute; top: calc(50% - 22px); transform: translateY(-50%);
  z-index: 5; width: 34px; height: 58px;
  display: grid; place-items: center;
  background: rgba(20, 25, 31, .92);
  border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; font-size: 22px; line-height: 1;
  opacity: 0; transition: opacity .18s ease, background .18s ease;
}
.row-wrap:hover .row-nav { opacity: 1; }
.row-nav:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.row-nav.prev { left: -12px; }
.row-nav.next { right: -12px; }
.row-nav[hidden] { display: none; }

/* Search results grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

/* ---------- Game card ---------- */
.game-card {
  flex: 0 0 150px; width: 150px;
  scroll-snap-align: start;
  display: block;
}
.grid .game-card { flex: initial; width: 100%; }

.game-card-thumb {
  position: relative; aspect-ratio: 1; border-radius: 12px;
  overflow: hidden; background: var(--surface);
  border: 1px solid var(--border-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-card:hover .game-card-thumb {
  transform: translateY(-4px);
  border-color: rgba(0, 162, 255, .55);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .5);
}

.badge-codes {
  position: absolute; left: 7px; bottom: 7px;
  background: rgba(10, 14, 18, .82);
  border: 1px solid rgba(49, 209, 126, .45);
  color: var(--green);
  font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 99px;
  backdrop-filter: blur(4px);
}

.game-card-title {
  margin: 9px 0 4px; font-size: 13.5px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 35px;
}
.game-card:hover .game-card-title { color: var(--blue); }

/* ---------- Homepage "Recent Guides" row ---------- */
.guide-row-card { flex: 0 0 220px; width: 220px; scroll-snap-align: start; display: block; }
.guide-row-thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px;
  overflow: hidden; background: var(--surface);
  border: 1px solid var(--border-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.guide-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-row-thumb-empty { display: block; width: 100%; height: 100%; background: linear-gradient(140deg, var(--surface-2), var(--bg-elev)); }
.guide-row-card:hover .guide-row-thumb {
  transform: translateY(-4px);
  border-color: rgba(0, 162, 255, .55);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .5);
}
.guide-row-title {
  margin: 9px 0 4px; font-size: 13.5px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 35px;
}
.guide-row-card:hover .guide-row-title { color: var(--blue); }

/* ============================================================
   GAME PAGE
   ============================================================ */
.breadcrumb { padding: 18px 0 14px; font-size: 13px; color: var(--text-faint); }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 6px; }
.breadcrumb span:last-child { color: var(--text); margin: 0; }

.game-hero {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .95fr);
  gap: 26px; align-items: start; margin-bottom: 26px;
}

.hero-media {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.hero-panel { padding-top: 4px; }
.game-title {
  margin: 0 0 20px; font-size: clamp(24px, 3vw, 34px);
  font-weight: 800; letter-spacing: -.7px; line-height: 1.15;
}
.btn-play {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px;
  background: linear-gradient(180deg, #00a9ff, #0080cc);
  color: #fff; font-weight: 700; font-size: 16px;
  border: 0; border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 132, 210, .35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-play:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 12px 28px rgba(0, 132, 210, .45); }
.btn-play svg { width: 22px; height: 22px; fill: #fff; }

/* ---------- Code summary (side panel) ---------- */
.codes-summary {
  margin-top: 55px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.cs-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 0; font-size: 14px; color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft);
}
.cs-row:last-of-type { border-bottom: 0; }
.cs-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cs-row.ok .cs-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(49, 209, 126, .15); }
.cs-row.ko .cs-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 92, 108, .14); }
.cs-num { margin-left: auto; font-weight: 700; font-size: 16px; color: var(--text); font-family: var(--font-mono); }
.cs-row.ok .cs-num { color: var(--green); }
.cs-row.ko .cs-num { color: var(--red); }
.cs-foot { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-faint); }

/* ---------- Panels ---------- */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 24px;
}
.panel-title {
  margin: 0 0 12px; font-size: 18px; font-weight: 700;
  padding-bottom: 10px; border-bottom: 1px solid var(--border-soft);
}
.panel-sub { margin: 4px 0 0; font-size: 13px; color: var(--text-faint); }

.game-desc p { margin: 0 0 12px; color: #c6d0da; max-width: 90ch; }

.feature-list { list-style: none; padding: 0; margin: 16px 0 18px; display: grid; gap: 8px; }
.feature-list li {
  position: relative; padding-left: 26px; color: #c6d0da; font-size: 14px;
}
.feature-list li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(140deg, var(--blue), var(--green));
}

.meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  border-top: 1px solid var(--border-soft);
}
.meta-cell {
  padding: 14px 10px; text-align: center;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.meta-cell:last-child { border-right: 0; }
.meta-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); }
.meta-v { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; }

/* ---------- Codes table ---------- */
.codes-head {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 18px;
}
.codes-head .panel-title { margin-bottom: 8px; }

.codes-filter { position: relative; }
.codes-filter svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; fill: none; stroke: var(--text-faint);
  stroke-width: 2; stroke-linecap: round;
}
.codes-filter input {
  height: 38px; width: 230px; padding: 0 14px 0 36px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 13.5px;
}
.codes-filter input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }

.table-caption {
  display: flex; align-items: center; gap: 9px;
  margin: 22px 0 12px; font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
}
.table-caption .dot { width: 9px; height: 9px; border-radius: 50%; }
.table-caption.ok { color: var(--green); }
.table-caption.ok .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(49, 209, 126, .16); }
.table-caption.ko { color: var(--red); }
.table-caption.ko .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 92, 108, .14); }

.table-wrap {
  border: 1px solid var(--border-soft); border-radius: 12px;
  overflow: auto; background: var(--surface);
}
.codes-table { width: 100%; border-collapse: collapse; }
.codes-table thead th {
  background: #161c23; text-align: left;
  padding: 12px 18px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}
.codes-table td { padding: 13px 18px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.codes-table tbody tr:last-child td { border-bottom: 0; }
.codes-table tbody tr { transition: background .14s ease; }
.codes-table tbody tr:hover { background: rgba(0, 162, 255, .06); }

.col-code { width: 30%; }
.col-reward { width: 48%; color: #c6d0da; }
.col-actions { width: 22%; text-align: left; }
.col-expired { width: 20%; color: var(--text-dim); font-size: 13px; white-space: nowrap; }
.codes-table.is-expired .col-code { width: 26%; }
.codes-table.is-expired .col-reward { width: 32%; }
.codes-table.is-expired .col-actions { width: 22%; }

.code-chip {
  display: inline-block;
  font-family: var(--font-mono); font-size: 13.5px; font-weight: 700;
  letter-spacing: .4px; color: var(--green);
  background: rgba(49, 209, 126, .1);
  border: 1px solid rgba(49, 209, 126, .28);
  padding: 5px 12px; border-radius: 8px;
  user-select: all;
}
.is-expired .code-chip {
  color: var(--red); background: rgba(255, 92, 108, .08);
  border-color: rgba(255, 92, 108, .25); text-decoration: line-through;
  text-decoration-color: rgba(255, 92, 108, .5);
}
.is-expired td { color: var(--text-faint); }

.btn-copy {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--blue); border: 1px solid var(--blue);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 8px;
  transition: all .15s ease;
}
.btn-copy svg { width: 14px; height: 14px; fill: currentColor; }
.btn-copy:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-1px); }
.btn-copy.ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-copy.ghost:hover { background: var(--surface-2); color: var(--text); border-color: #3a4552; }
.btn-copy.is-copied {
  background: var(--green) !important; border-color: var(--green) !important; color: #06210f !important;
}

.no-results, .empty-inline {
  margin: 14px 0 0; padding: 20px; text-align: center;
  color: var(--text-faint); font-size: 14px;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 12px;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center; padding: 60px 20px;
  background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: var(--radius);
}
.empty h3 { margin: 0 0 8px; font-size: 20px; }
.empty p { margin: 0 0 18px; color: var(--text-dim); }
.btn-ghost {
  display: inline-block; padding: 10px 20px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 40px; padding: 34px 0;
  border-top: 1px solid var(--border-soft);
  background: rgba(10, 13, 17, .55);
}
.footer-inner { width: min(1400px, calc(100% - 48px)); margin-inline: auto; }
.footer-top {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-start; gap: 24px; margin-bottom: 18px;
}
.footer-brand .brand-text { font-size: 18px; }
.footer-brand p { margin: 6px 0 0; color: var(--text-dim); font-size: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--blue); }
.footer-legal { margin: 0; color: var(--text-faint); font-size: 12.5px; max-width: 70ch; }

/* ============================================================
   LEGAL PAGES (Terms, Privacy, Cookies)
   ============================================================ */
.legal-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
}
.legal-nav a {
  padding: 8px 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); font-size: 13.5px; font-weight: 600;
}
.legal-nav a:hover { color: var(--text); border-color: #3a4552; }
.legal-nav a.is-active {
  color: #fff; background: var(--blue); border-color: var(--blue);
}

.legal-page h1 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.6px; }
.legal-page .legal-updated { margin: 0 0 26px; font-size: 13px; color: var(--text-faint); }
.legal-page h2 { margin: 28px 0 10px; font-size: 18px; font-weight: 700; }
.legal-page h2:first-of-type { margin-top: 0; }
.legal-page p { margin: 0 0 14px; color: #c6d0da; max-width: 78ch; }
.legal-page ul { margin: 0 0 14px; padding-left: 22px; color: #c6d0da; max-width: 78ch; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-page a:hover { color: var(--green); }
.legal-page strong { color: var(--text); }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; margin-top: 20px;
}
.contact-card p { color: #c6d0da; margin: 0 0 16px; font-size: 14px; }

/* ---------- Guides ---------- */
.guides-toolbar { display: flex; justify-content: flex-end; margin: 22px 0 -2px; }
.guides-toolbar .codes-filter input { width: 260px; }
.guide-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; margin-top: 20px;
}
.guide-card {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit; padding: 0; overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.guide-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.guide-card-img {
  display: block; flex: none;
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
}
.guide-card .panel-title {
  margin: 16px 18px 8px; padding: 0; border: 0; font-size: 16px;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.guide-card p {
  color: #c6d0da; font-size: 14px; margin: 0 18px 14px;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.guide-date { display: block; margin: 0 18px 18px; font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }
.guide-card .guide-date { margin-top: auto; }
.legal-page kbd {
  font-family: var(--font-mono); font-size: .85em; background: var(--surface-2);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: .1em .45em;
}

/* ---------- Single guide page ---------- */
.guide-article { --guide-col: 760px; }
.guide-article > h1,
.guide-article > .legal-updated {
  max-width: var(--guide-col); margin-inline: auto;
}
.guide-article-cover {
  display: block; width: 100%; max-width: var(--guide-col);
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-sm); margin: 6px auto 26px; border: 1px solid var(--border);
}
.guide-body { max-width: var(--guide-col); margin-inline: auto; }
.guide-body p { color: #c6d0da; max-width: none; }
.guide-body ul, .guide-body ol { color: #c6d0da; max-width: none; padding-left: 22px; margin: 0 0 14px; }
.guide-body li { margin-bottom: 6px; }
.guide-body h2 { margin: 28px 0 10px; font-size: 18px; font-weight: 700; }
.guide-body h2:first-child { margin-top: 0; }
.guide-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.guide-body a:hover { color: var(--green); }
.guide-body img {
  display: block; width: 80%; max-width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
  margin: 16px auto; border-radius: var(--radius-sm); border: 1px solid var(--border);
}

/* ---------- Compact "Guides" preview on a game's page ----------
   Fixed column count (not auto-fit) so 1-2 guides don't stretch to
   fill the whole row — capped at 3 per row, extra guides wrap. */
.guide-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .guide-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .guide-grid-compact { grid-template-columns: minmax(0, 1fr); }
}
.guide-preview {
  display: block; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.guide-preview:hover { border-color: var(--blue); transform: translateY(-2px); }
.guide-preview-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.guide-preview-img-empty { background: linear-gradient(140deg, var(--surface-2), var(--bg-elev)); }
.guide-preview-title { display: block; padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--text); }

/* ============================================================
   FAQ (homepage)
   ============================================================ */
#faq .section-head { text-align: center; }
.faq-list { display: grid; gap: 10px; max-width: 780px; margin-inline: auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 16px 46px 16px 18px;
  font-weight: 600; font-size: 14.5px;
  transition: color .15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 20px; font-weight: 400; line-height: 1; color: var(--text-faint);
  transition: transform .18s ease, color .18s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--blue); }
.faq-item summary:hover { color: var(--blue); }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--text-dim); font-size: 14px; max-width: 80ch; }
.faq-item p a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.faq-item p a:hover { color: var(--green); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-elev); border: 1px solid var(--green);
  color: var(--text); font-size: 14px; font-weight: 600;
  padding: 11px 20px; border-radius: 99px;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; z-index: 90;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast code { font-family: var(--font-mono); color: var(--green); }

/* ============================================================
   COOKIE CONSENT BANNER
   Bottom card, non-blocking (no cookie wall). "Reject all" and
   "Accept all" share the same row, size and weight on purpose —
   the AEPD requires rejecting to be as easy as accepting.
   ============================================================ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  padding: 0 16px 16px;
  pointer-events: none;
}
.cookie-banner-inner {
  pointer-events: auto;
  width: min(760px, 100%);
  margin-inline: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
  animation: cookie-in .28s ease both;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.cookie-banner-head { display: flex; gap: 14px; align-items: flex-start; }
.cookie-banner-icon {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(150deg, #1d2733, #141a21);
  border: 1px solid var(--border);
}
.cookie-banner-icon svg { width: 22px; height: 22px; fill: var(--amber); }
.cookie-banner-title { margin: 2px 0 4px; font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.cookie-banner-desc { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
.cookie-banner-desc strong { color: var(--text); }
.cookie-banner-desc a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner-desc a:hover { color: var(--green); }

/* Preferences panel ("Manage") */
.cookie-banner-prefs {
  margin-top: 14px; padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}
.cookie-pref {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.cookie-pref:last-child { border-bottom: 0; }
.cookie-pref-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cookie-pref-name { font-size: 14px; font-weight: 700; }
.cookie-pref-hint { font-size: 12.5px; color: var(--text-faint); }
.cookie-pref-hint code { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }

/* iOS-style switch built on a plain checkbox (keyboard + screen-reader friendly) */
.cookie-switch {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 42px; height: 24px; margin: 0;
  border-radius: 99px; background: #333d49; border: 1px solid var(--border);
  position: relative; cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.cookie-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .18s ease;
}
.cookie-switch:checked { background: var(--green); border-color: var(--green); }
.cookie-switch:checked::after { transform: translateX(18px); }
.cookie-switch:focus-visible { outline: 0; box-shadow: var(--ring); }
.cookie-switch:disabled { opacity: .55; cursor: not-allowed; }

/* Buttons */
.cookie-banner-actions {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 16px;
}
.cookie-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 18px; border-radius: 9px;
  font-size: 14px; font-weight: 700;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, filter .15s ease;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.cookie-btn-manage { margin-right: auto; background: transparent; color: var(--text-dim); }
.cookie-btn-manage:hover { color: var(--text); border-color: #3a4552; }
.cookie-btn-manage[aria-expanded="true"] { color: var(--text); border-color: var(--blue); }
.cookie-btn-save { border-color: var(--blue); color: var(--blue); }
.cookie-btn-save:hover { background: rgba(0, 162, 255, .12); }
/* Reject / Accept: identical size and prominence, only the colour differs */
.cookie-btn-reject, .cookie-btn-accept { min-width: 130px; }
.cookie-btn-reject:hover { border-color: #3a4552; background: var(--surface-2); }
.cookie-btn-accept {
  background: linear-gradient(180deg, #00a9ff, #0080cc); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(0, 132, 210, .3);
}
.cookie-btn-accept:hover { filter: brightness(1.06); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .game-hero { grid-template-columns: 1fr; }
  .hero-media img { aspect-ratio: 16 / 9; }
}

/* Between 780px and 1050px the desktop grid still applies, and its
   150px side column can't hold two labelled buttons — they spill over
   the search box. Drop the Games label first; Guides keeps its own. */
@media (max-width: 11330px) {
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .header-games-btn { width: 38px; padding: 0; gap: 0; justify-content: center; }
  .header-games-btn span { display: none; }
  .header-games-btn svg { width: 17px; height: 17px; }
}

@media (max-width: 780px) {
  .container, .header-inner, .footer-inner { width: calc(100% - 28px); }

  /* Three columns still: logo, search, Guides. minmax(0, 1fr) in the
     middle is what lets the input actually shrink — with a plain 1fr
     it refuses to go below its intrinsic width and overflows. */
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .brand-text { display: none; }
  .header-right { justify-self: end; gap: 6px; }

  /* Icon only — neither label fits next to the search box.
     Each link carries an aria-label so it stays announced. */
  .header-nav-btn { width: 36px; padding: 0; gap: 0; justify-content: center; }
  .header-nav-btn span { display: none; }
  .header-nav-btn svg { width: 17px; height: 17px; }

  .panel { padding: 18px 16px; }

  /* Cookie banner becomes a bottom sheet: full width, stacked buttons,
     Accept first in the stack so it's not the one pushed off-screen. */
  .cookie-banner { padding: 0 8px 8px; }
  .cookie-banner-inner { padding: 16px 16px 14px; max-height: calc(100vh - 16px); overflow-y: auto; }
  .cookie-banner-head { gap: 12px; }
  .cookie-banner-icon { width: 34px; height: 34px; border-radius: 9px; }
  .cookie-banner-icon svg { width: 19px; height: 19px; }
  .cookie-banner-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .cookie-btn { width: 100%; }
  .cookie-btn-manage { margin-right: 0; order: 3; }
  .cookie-btn-save { order: 2; }
  .cookie-btn-reject { order: 1; }
  .cookie-btn-accept { order: 0; }
  .codes-head { flex-direction: column; align-items: stretch; }
  .codes-filter input { width: 100%; }
  .guides-toolbar { justify-content: stretch; }
  .guides-toolbar .codes-filter { flex: 1; }
  .guides-toolbar .codes-filter input { width: 100%; }
  .row-nav { display: none; }
  .col-reward { font-size: 13px; }
  .col-expired { font-size: 11.5px; }
  .codes-table td, .codes-table thead th { padding: 11px 12px; }
  .btn-copy span { display: none; }
  .btn-copy { padding: 9px 12px; }
  .game-card, .grid .game-card { flex-basis: 132px; width: 132px; }
  .guide-row-card { flex-basis: 170px; width: 170px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .grid .game-card { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.cookie-list dt, .legal-bases dt { font-weight: 600; margin-top: 1rem; }
.cookie-list dd, .legal-bases dd { margin-left: 0; color: #a8b3bf; }

/* ============================================================
   ALL GAMES PAGE
   ============================================================ */
.az-nav {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 26px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}
.az-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--border-soft); border-radius: 8px;
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  transition: border-color .16s ease, color .16s ease;
}
.az-nav a:hover { border-color: var(--blue); color: var(--blue); }

.az-group { margin-bottom: 34px; scroll-margin-top: 84px; }
.az-group:last-child { margin-bottom: 0; }

.az-heading {
  margin: 0 0 14px; font-size: 18px; font-weight: 700;
  color: var(--text-dim); letter-spacing: .04em;
}

@media (max-width: 640px) {
  .az-nav { gap: 5px; margin-bottom: 20px; }
  .az-nav a { min-width: 28px; height: 28px; font-size: 12px; }
  .az-group { margin-bottom: 26px; }
}