/* ==========================================================================
   Boxing Arcade — boxingarcade.xyz
   style.css — core design system, layout, components
   Original stylesheet. No third-party frameworks.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces — deep "arena at night" palette */
  --c-bg:            #0b0d13;
  --c-bg-alt:        #10131c;
  --c-surface:       #151a26;
  --c-surface-2:     #1b2130;
  --c-surface-3:     #222a3c;
  --c-border:        #262f42;
  --c-border-soft:   #1d2433;

  /* Text */
  --c-text:          #e9edf6;
  --c-text-soft:     #c2cade;
  --c-muted:         #94a0b8;
  --c-muted-2:       #6d7a92;

  /* Accents */
  --c-accent:        #ff4b34;   /* glove red — primary action */
  --c-accent-dim:    #d13b28;
  --c-accent-soft:   rgba(255, 75, 52, 0.12);
  --c-gold:          #ffc247;   /* championship gold */
  --c-gold-soft:     rgba(255, 194, 71, 0.12);
  --c-mint:          #3ad2a4;   /* success / stamina */
  --c-mint-soft:     rgba(58, 210, 164, 0.12);
  --c-blue:          #5aa9ff;   /* info / links */
  --c-violet:        #9b7bff;

  /* Difficulty chips */
  --c-easy:          #3ad2a4;
  --c-medium:        #ffc247;
  --c-hard:          #ff8a3d;
  --c-expert:        #ff4b34;

  /* Typography */
  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-xs:   0.75rem;
  --fs-sm:   0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md:   1.0625rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  1.875rem;
  --fs-3xl:  2.25rem;
  --fs-4xl:  2.875rem;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  /* Shape */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Elevation */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --sh-2: 0 4px 16px rgba(0, 0, 0, 0.35);
  --sh-3: 0 12px 40px rgba(0, 0, 0, 0.45);

  /* Layout */
  --wrap: 1200px;
  --wrap-narrow: 760px;
  --header-h: 62px;

  --t-fast: 120ms ease;
  --t-base: 200ms ease;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle canvas-of-the-arena backdrop: two radial pools of light, no images. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(255, 75, 52, 0.10), transparent 62%),
    radial-gradient(760px 420px at 88% 4%, rgba(90, 169, 255, 0.07), transparent 60%);
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, svg { height: auto; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--sp-3);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { margin: 0 0 var(--sp-4); }

a {
  color: var(--c-blue);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: #8ec5ff; text-decoration: underline; }

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.35rem; }
li { margin-bottom: var(--sp-2); }

strong { color: #fff; font-weight: 700; }
small { font-size: var(--fs-sm); }

code, kbd, pre { font-family: var(--font-mono); font-size: 0.9em; }

code {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 0.1em 0.4em;
  color: var(--c-gold);
}

kbd {
  display: inline-block;
  background: linear-gradient(180deg, var(--c-surface-3), var(--c-surface-2));
  border: 1px solid var(--c-border);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: 0.12em 0.5em;
  font-size: 0.82em;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

hr {
  border: 0;
  border-top: 1px solid var(--c-border);
  margin: var(--sp-6) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-sm);
}
th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
th {
  color: #fff;
  font-weight: 700;
  background: var(--c-surface);
  white-space: nowrap;
}
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Any wide block scrolls inside itself rather than pushing the page sideways. */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

::selection { background: var(--c-accent); color: #fff; }

/* Focus: always visible, never removed. */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--c-gold);
  color: #16181f;
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus {
  left: 0;
  text-decoration: none;
}

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--sp-7); }
.section--tight { padding-block: var(--sp-6); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.section-head h2 { margin: 0; }
.section-head p {
  margin: var(--sp-1) 0 0;
  color: var(--c-muted);
  font-size: var(--fs-sm);
  max-width: 62ch;
}
.section-head .link-more {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-2);
}

.lede {
  font-size: var(--fs-md);
  color: var(--c-text-soft);
  max-width: 68ch;
}

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-auto-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 19, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand__mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--c-accent), var(--c-accent-dim));
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(255, 75, 52, 0.35);
}
.brand__mark svg { width: 19px; height: 19px; }
.brand__text small {
  display: block;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted-2);
  line-height: 1;
  margin-top: 2px;
}

.main-nav { margin-left: auto; }
.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav li { margin: 0; }
.main-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--r-sm);
  color: var(--c-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background var(--t-fast), color var(--t-fast);
}
.main-nav a:hover {
  background: var(--c-surface-2);
  color: #fff;
  text-decoration: none;
}
.main-nav a[aria-current="page"] {
  color: #fff;
  background: var(--c-accent-soft);
  box-shadow: inset 0 -2px 0 var(--c-accent);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  padding: 0;
}
.icon-btn:hover {
  color: #fff;
  border-color: var(--c-surface-3);
  background: var(--c-surface-2);
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn__count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
}
.icon-btn__count[hidden] { display: none !important; }

.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn--primary {
  background: linear-gradient(140deg, var(--c-accent), var(--c-accent-dim));
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 75, 52, 0.28);
}
.btn--primary:hover {
  color: #fff;
  box-shadow: 0 6px 22px rgba(255, 75, 52, 0.4);
}

.btn--gold {
  background: linear-gradient(140deg, var(--c-gold), #e0a423);
  color: #1a1408;
  box-shadow: 0 4px 16px rgba(255, 194, 71, 0.24);
}
.btn--gold:hover { color: #1a1408; }

.btn--ghost {
  background: var(--c-surface);
  border-color: var(--c-border);
  color: var(--c-text);
}
.btn--ghost:hover {
  background: var(--c-surface-2);
  border-color: var(--c-surface-3);
  color: #fff;
}

.btn--sm { padding: 0.45rem 0.9rem; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn--lg { padding: 0.9rem 1.9rem; font-size: var(--fs-md); }
.btn--block { width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, var(--c-bg-alt), var(--c-bg));
}

/* Ring-rope motif: three horizontal bands rather than a decorative image. */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 26px,
    rgba(255, 75, 52, 0.16) 26px 28px,
    transparent 28px 30px
  );
  mask-image: linear-gradient(180deg, transparent, #000);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--sp-7);
  align-items: center;
  padding-block: var(--sp-8) var(--sp-7);
}

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  margin-bottom: var(--sp-3);
}
.hero h1 .accent { color: var(--c-accent); }

.hero__tagline {
  font-size: clamp(1.02rem, 2.2vw, 1.3rem);
  font-weight: 700;
  color: var(--c-gold);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
}

.hero__text {
  color: var(--c-text-soft);
  font-size: var(--fs-md);
  max-width: 56ch;
  margin-bottom: var(--sp-5);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-5); }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border);
}
.hero__stat b {
  display: block;
  font-size: var(--fs-xl);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}
.hero__stat span {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted-2);
  font-weight: 700;
}

.hero__art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-3);
  background: var(--c-surface);
}
.hero__art img, .hero__art svg { width: 100%; height: 100%; object-fit: cover; }

/* --------------------------------------------------------------------------
   7. Cards — games
   -------------------------------------------------------------------------- */

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-surface-3);
  box-shadow: var(--sh-2);
}

.game-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--c-bg-alt);
  overflow: hidden;
}
.game-card__media img, .game-card__media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}
.game-card:hover .game-card__media img { transform: scale(1.04); }

.game-card__badges {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - 52px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.18rem 0.5rem;
  border-radius: var(--r-pill);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(11, 13, 19, 0.82);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  backdrop-filter: blur(4px);
}
.badge--new    { background: var(--c-mint); color: #08241c; border-color: transparent; }
.badge--hot    { background: var(--c-accent); color: #fff; border-color: transparent; }
.badge--mobile { background: rgba(90, 169, 255, 0.18); color: #9ccbff; border-color: rgba(90, 169, 255, 0.3); }
.badge--score  { background: var(--c-gold-soft); color: var(--c-gold); border-color: rgba(255, 194, 71, 0.3); }

.game-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  gap: var(--sp-2);
}

.game-card__title {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.game-card__title a { color: #fff; }
.game-card__title a:hover { color: var(--c-accent); text-decoration: none; }

.game-card__desc {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--c-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-muted-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.18rem 0.55rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c-muted);
  white-space: nowrap;
}
.chip--easy   { color: var(--c-easy);   border-color: rgba(58, 210, 164, 0.3); }
.chip--medium { color: var(--c-medium); border-color: rgba(255, 194, 71, 0.3); }
.chip--hard   { color: var(--c-hard);   border-color: rgba(255, 138, 61, 0.3); }
.chip--expert { color: var(--c-expert); border-color: rgba(255, 75, 52, 0.3); }

.game-card__actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.game-card__actions .btn { flex: 1; }

/* Favourite toggle — a star, never a fake rating. */
.fav-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-surface-2);
  color: var(--c-muted-2);
  cursor: pointer;
  padding: 0;
  transition: all var(--t-fast);
}
.fav-btn:hover { color: var(--c-gold); border-color: rgba(255, 194, 71, 0.4); }
.fav-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-btn[aria-pressed="true"] { color: var(--c-gold); border-color: rgba(255, 194, 71, 0.45); background: var(--c-gold-soft); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }

.game-card__fav {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  z-index: 2;
  background: rgba(11, 13, 19, 0.75);
  backdrop-filter: blur(4px);
}

/* --------------------------------------------------------------------------
   8. Category cards
   -------------------------------------------------------------------------- */

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base);
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--c-surface-3); text-decoration: none; }
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cat-accent, var(--c-accent));
}
.cat-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--cat-accent, var(--c-accent)) 14%, transparent);
  color: var(--cat-accent, var(--c-accent));
  margin-bottom: var(--sp-2);
}
.cat-card__icon svg { width: 22px; height: 22px; }
.cat-card h3 { margin: 0; font-size: var(--fs-md); color: #fff; }
.cat-card p { margin: 0; font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.55; }
.cat-card__count {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cat-accent, var(--c-accent));
}

/* --------------------------------------------------------------------------
   9. Article / guide cards
   -------------------------------------------------------------------------- */

.post-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  transition: border-color var(--t-base), transform var(--t-base);
}
.post-card:hover { border-color: var(--c-surface-3); transform: translateY(-2px); }
.post-card__kicker {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.post-card h3 { margin: 0; font-size: var(--fs-md); }
.post-card h3 a { color: #fff; }
.post-card h3 a:hover { color: var(--c-gold); text-decoration: none; }
.post-card p { margin: 0; font-size: var(--fs-sm); color: var(--c-muted); }
.post-card__meta {
  margin-top: auto;
  padding-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-muted-2);
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  align-items: center;
}

/* --------------------------------------------------------------------------
   10. Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumb {
  padding-block: var(--sp-3);
  font-size: var(--fs-sm);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: 0.4rem; color: var(--c-muted-2); }
.breadcrumb li + li::before { content: "/"; color: var(--c-border); }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb [aria-current="page"] { color: var(--c-text); }

/* --------------------------------------------------------------------------
   11. Forms, search, filters
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: var(--sp-4); }
.field label { font-size: var(--fs-sm); font-weight: 700; color: var(--c-text); }
.field .hint { font-size: var(--fs-xs); color: var(--c-muted-2); }

input[type="text"], input[type="search"], input[type="email"],
input[type="url"], select, textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  color: var(--c-text);
  font-family: inherit;
  font-size: var(--fs-base);
  transition: border-color var(--t-fast), background var(--t-fast);
}
input::placeholder, textarea::placeholder { color: var(--c-muted-2); }
input:hover, select:hover, textarea:hover { border-color: var(--c-surface-3); }
input:focus, select:focus, textarea:focus {
  border-color: var(--c-accent);
  background: var(--c-surface);
}
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a0b8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 15px;
  padding-right: 2.2rem;
  cursor: pointer;
}

.search-bar { position: relative; }
.search-bar input {
  padding-left: 2.6rem;
  height: 48px;
  font-size: var(--fs-md);
}
.search-bar__icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--c-muted-2);
  pointer-events: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
  padding: var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  margin-bottom: var(--sp-5);
}
.filter-bar .field { margin: 0; min-width: 165px; flex: 1 1 165px; }
.filter-bar .field label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted-2);
}
.filter-bar__actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }

.result-count {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  margin-bottom: var(--sp-4);
}
.result-count b { color: #fff; }

.empty-state {
  padding: var(--sp-7) var(--sp-4);
  text-align: center;
  border: 1px dashed var(--c-border);
  border-radius: var(--r-lg);
  color: var(--c-muted);
}
.empty-state h2, .empty-state h3 { color: #fff; font-size: var(--fs-lg); }
.empty-state p { max-width: 46ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   12. Editorial / article body
   -------------------------------------------------------------------------- */

.article-head { padding-block: var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--c-border); }
.article-head h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); }
.article-head .lede { margin-bottom: var(--sp-4); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--c-muted);
}
.article-meta time { color: var(--c-muted-2); }

.prose { max-width: 72ch; }
.prose h2 {
  font-size: var(--fs-xl);
  margin-top: var(--sp-7);
  padding-top: var(--sp-2);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.prose h3 {
  font-size: var(--fs-lg);
  margin-top: var(--sp-5);
  color: var(--c-text);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.prose h4 { margin-top: var(--sp-4); color: var(--c-gold); font-size: var(--fs-base); }
.prose > *:first-child { margin-top: 0; }
.prose li { line-height: 1.7; }
.prose blockquote {
  margin: var(--sp-5) 0;
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
  border-left: 3px solid var(--c-accent);
  color: var(--c-text-soft);
  font-style: italic;
}

.toc {
  padding: var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  margin-bottom: var(--sp-6);
}
.toc h2 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted-2);
}
.toc ol { margin: 0; padding-left: 1.2rem; font-size: var(--fs-sm); }
.toc li { margin-bottom: 0.3rem; }

.callout {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-blue);
  background: var(--c-surface);
  margin: var(--sp-5) 0;
}
/* Callout titles are styled by class, not by tag, so a page can use whatever
   heading level keeps its document outline correct. */
.callout h2, .callout h3, .callout h4, .callout__title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-blue);
  line-height: 1.4;
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout--tip  { border-left-color: var(--c-mint); }
.callout--warn { border-left-color: var(--c-hard); }
.callout--key  { border-left-color: var(--c-gold); background: var(--c-surface-2); }
.callout--tip  .callout__title, .callout--tip  h2, .callout--tip  h3, .callout--tip  h4 { color: var(--c-mint); }
.callout--warn .callout__title, .callout--warn h2, .callout--warn h3, .callout--warn h4 { color: var(--c-hard); }
.callout--key  .callout__title, .callout--key  h2, .callout--key  h3, .callout--key  h4 { color: var(--c-gold); }

.author-box {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-4);
  margin-top: var(--sp-6);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
}
.author-box__avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--c-border);
  background: var(--c-surface-2);
}
.author-box__avatar img, .author-box__avatar svg { width: 100%; height: 100%; object-fit: cover; }
.author-box b { display: block; color: #fff; font-size: var(--fs-md); }
.author-box .role { font-size: var(--fs-sm); color: var(--c-gold); margin-bottom: var(--sp-2); }
.author-box p { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: var(--sp-2); }
.author-box .dates { font-size: var(--fs-xs); color: var(--c-muted-2); }

/* --------------------------------------------------------------------------
   13. FAQ (accordion — details/summary, works without JS)
   -------------------------------------------------------------------------- */

.faq { display: flex; flex-direction: column; gap: var(--sp-2); }

.faq details {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  overflow: hidden;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  list-style: none;
  transition: background var(--t-fast);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--c-surface-2); }
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--c-accent);
  transition: transform var(--t-base);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div {
  padding: 0 var(--sp-4) var(--sp-4);
  color: var(--c-muted);
  font-size: var(--fs-base);
}
.faq details > div > :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   14. Advertising slots
   Neutral, clearly-labelled containers kept well away from game controls.
   -------------------------------------------------------------------------- */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  margin-block: var(--sp-6);
  border: 1px dashed var(--c-border-soft);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
}
.ad-slot::before {
  content: "Advertisement";
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted-2);
  opacity: 0.55;
}
.ad-slot:has(iframe)::before, .ad-slot:has(ins)::before { content: none; }
.ad-slot--inline { min-height: 250px; }
.ad-slot--leaderboard { min-height: 100px; }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: var(--sp-8);
  border-top: 1px solid var(--c-border);
  background: var(--c-bg-alt);
  padding-block: var(--sp-7) var(--sp-5);
  font-size: var(--fs-sm);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}
.site-footer h3 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-muted-2);
  margin-bottom: var(--sp-3);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--c-muted); }
.site-footer a:hover { color: #fff; }
.site-footer__about p { color: var(--c-muted); max-width: 42ch; }
.site-footer__about .brand { margin-bottom: var(--sp-3); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border);
  color: var(--c-muted-2);
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   16. Misc components
   -------------------------------------------------------------------------- */

.notice {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  font-size: var(--fs-sm);
  color: var(--c-muted);
  margin-bottom: var(--sp-4);
}
.notice--ok   { border-left: 3px solid var(--c-mint); }
.notice--warn { border-left: 3px solid var(--c-hard); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.tag-list a {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  color: var(--c-muted);
}
.tag-list a:hover { color: #fff; border-color: var(--c-surface-3); text-decoration: none; }

.page-head { padding-block: var(--sp-6) var(--sp-5); }
.page-head h1 { margin-bottom: var(--sp-3); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--sp-6);
  align-items: start;
}
.sidebar { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.sidebar-block {
  padding: var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  margin-bottom: var(--sp-4);
}
.sidebar-block h3 {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted-2);
  margin-bottom: var(--sp-3);
}
.sidebar-block ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.sidebar-block li { margin-bottom: 0.5rem; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--c-border-soft);
  margin: 0;
}
.mini-list li:last-child { border-bottom: 0; }
.mini-list img, .mini-list svg {
  width: 56px;
  height: 36px;
  object-fit: cover;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  background: var(--c-surface-2);
}
.mini-list b { display: block; font-size: var(--fs-sm); }
.mini-list span { font-size: var(--fs-xs); color: var(--c-muted-2); }

/* Local high-score table — explicitly device-local, never a global ladder. */
.scores-note {
  font-size: var(--fs-xs);
  color: var(--c-muted-2);
  margin-top: var(--sp-2);
}

/* 404 */
.error-page { text-align: center; padding-block: var(--sp-8); }
.error-page h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
.error-page .code {
  font-size: 5rem;
  font-weight: 900;
  color: var(--c-accent);
  line-height: 1;
  letter-spacing: -0.05em;
  opacity: 0.85;
}
.error-page .cluster { justify-content: center; margin-top: var(--sp-5); }

/* --------------------------------------------------------------------------
   17. Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .game-card:hover, .cat-card:hover, .post-card:hover { transform: none; }
  .game-card:hover .game-card__media img { transform: none; }
}

/* --------------------------------------------------------------------------
   18. Print
   -------------------------------------------------------------------------- */

@media print {
  body { background: #fff; color: #000; }
  body::before, .site-header, .site-footer, .ad-slot, .game-shell, .sidebar { display: none !important; }
  .prose { max-width: none; }
  a { color: #000; text-decoration: underline; }
}
