/* 5.28 — direction artistique « Nuit d'arcade ».
   Ink background, warm white text, one hot accent (lime) for what you press, violet for depth,
   poster-style game tiles. Loaded last: restyles the shell, never a game's rules or canvas. */
:root {
  --bg: #0c0a13;
  --bg-deep: #07060c;
  --surface: rgba(24, 21, 34, 0.86);
  --surface-solid: #181522;
  --surface-raised: #221d31;
  --surface-soft: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f4ec;
  --text-soft: #b9b3c9;
  --text-faint: #837d96;
  --primary: #9a7bff;
  --primary-2: #6d5cff;
  --hot: #c9f754;
  --hot-ink: #141a05;
  --coral: #ff7a59;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shell: min(1640px, 94vw);
  --display: "Arial Black", "Segoe UI Black", "Helvetica Neue", Impact, system-ui, sans-serif;
}
html[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-deep: #ebe7dd;
  --text: #17141f;
  --text-soft: #4d475c;
  --text-faint: #6f6980;
  --primary: #5b3df0;
  --primary-2: #4a36d6;
  --hot: #1c1730;
  --hot-ink: #f4f1ea;
}
body {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(154, 123, 255, 0.16), transparent 60%),
    radial-gradient(900px 480px at 96% 4%, rgba(201, 247, 84, 0.07), transparent 62%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.045) 1px, transparent 1.6px) 0 0 / 26px 26px,
    var(--bg);
  background-attachment: scroll, scroll, fixed, fixed;
}
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 1px 1px, rgba(23, 20, 31, 0.07) 1px, transparent 1.6px) 0 0 / 26px 26px,
    var(--bg);
}

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); }
.brand__copy strong { font-family: var(--display); font-size: 17px; letter-spacing: 0.02em; }
.brand__copy small { color: var(--hot); letter-spacing: 0.2em; }
.brand__mark { border-radius: 9px; background: var(--hot); box-shadow: none; }
.brand__mark span { background: var(--hot-ink); }
.desktop-nav { border-color: var(--line); background: transparent; }
.nav-link { border-radius: 999px; font-size: 13px; }
.nav-link.is-active { background: var(--text); color: var(--bg); }
.profile-button__avatar { background: var(--hot); color: var(--hot-ink); }

/* Buttons: what starts a game is lime. */
html body .primary-button, html body .hero__actions .primary-button, html body .control-button--primary {
  border: 0; border-radius: 999px; background: var(--hot); color: var(--hot-ink);
  box-shadow: 0 0 0 0 transparent; font-weight: 900; letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
html body .primary-button:hover { transform: translateY(-2px); box-shadow: 0 10px 34px color-mix(in srgb, var(--hot) 32%, transparent); }
.secondary-button { border-radius: 999px; border-color: var(--line-strong); background: transparent; }
.secondary-button:hover { border-color: var(--text); background: var(--surface-soft); }

/* Hero */
.hero { padding-top: clamp(28px, 4vw, 64px); padding-bottom: clamp(24px, 3vw, 48px); align-items: center; }
.hero__copy h1 {
  font-family: var(--display); font-size: clamp(44px, 6.4vw, 118px); line-height: 0.9;
  letter-spacing: -0.055em; text-transform: uppercase;
}
.hero__copy h1 em {
  font-style: normal; color: var(--hot); background: none; -webkit-text-fill-color: currentColor;
  text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.12em;
  text-decoration-color: color-mix(in srgb, var(--hot) 45%, transparent);
}
.hero__lead { max-width: 46ch; font-size: clamp(15px, 1.15vw, 19px); color: var(--text-soft); }
.hero__copy > .eyebrow { justify-content: flex-start; color: var(--text-soft); letter-spacing: 0.16em; }
.hero__copy > .eyebrow > span:first-child { background: var(--hot); }
.hero__meta span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--text-soft); }
.portal-feature { border-radius: var(--radius-lg); border-color: var(--line-strong); }
.portal-feature:hover { border-color: var(--hot); }

/* Section headings */
.section-heading h2 { font-family: var(--display); font-size: clamp(30px, 3.4vw, 60px); letter-spacing: -0.045em; line-height: 0.95; text-transform: uppercase; }
.section-heading .eyebrow > span:first-child { background: var(--hot); }

/* Filters */
.category-tab { border-radius: 999px; }
html body .category-tab.is-active, html body .category-tab[aria-pressed="true"] {
  border-color: var(--hot); background: var(--hot); color: var(--hot-ink);
}

/* Game tiles: the illustration is the tile; the title sits on it like a poster. */
.game-grid { gap: clamp(12px, 1.2vw, 22px); }
.game-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  border: 0; border-radius: var(--radius-lg); background: var(--surface-solid);
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.game-card:hover, .game-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 0 0 2px var(--hot), 0 22px 44px rgba(0, 0, 0, 0.45);
}
.game-card__art, .game-card.has-diorama .game-card__art {
  height: auto; flex: 0 0 auto; aspect-ratio: 1.42; border-radius: 0;
}
.game-card__art::after {
  content: ""; position: absolute; inset: 40% 0 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface-solid) 96%, transparent) 92%);
}
.game-card__badge { border: 0; border-radius: 999px; background: rgba(8, 7, 13, 0.78); color: var(--text); font-weight: 800; letter-spacing: 0.06em; }
.favorite-button { border-radius: 999px; }
.game-card__body { position: relative; z-index: 2; margin-top: -46px; padding: 0 18px 16px; }
.game-card.has-diorama .game-card__body { padding-top: 0; }
.game-card__meta { margin-bottom: 6px; }
.game-card__category, .game-card.has-diorama .game-card__category {
  color: var(--hot); font-size: 10px; font-weight: 900; letter-spacing: 0.14em; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
html[data-theme="light"] .game-card__category { text-shadow: none; }
.game-card h3 { font-family: var(--display); font-size: clamp(17px, 1.35vw, 24px); line-height: 1.05; letter-spacing: -0.035em; text-transform: uppercase; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55); }
html[data-theme="light"] .game-card h3 { text-shadow: none; }
.game-card__description { color: var(--text-soft); font-size: 13px; line-height: 1.5; }
.game-card__footer { border-top: 1px solid var(--line); }
.game-card__play {
  border-radius: 999px; background: var(--text); color: var(--bg); padding: 9px 16px; font-weight: 900;
  transition: background 0.15s ease;
}
.game-card:hover .game-card__play, .game-card:focus-visible .game-card__play { background: var(--hot); color: var(--hot-ink); }
@media (min-width: 1100px) { .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 2100px) { .game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .game-card { border-radius: 16px; }
  .game-card__art, .game-card.has-diorama .game-card__art { aspect-ratio: 1.25; border-radius: 0; }
  .game-card__body { margin-top: -30px; padding: 0 10px 10px; }
  .game-card h3 { font-size: 14px; min-height: 30px; }
  .game-card__play { background: rgba(255, 255, 255, 0.1); color: var(--text); }
}
@media (prefers-reduced-motion: reduce) { .game-card, .primary-button { transition: none; } .game-card:hover, html body .primary-button:hover { transform: none; } }
html[data-motion="reduce"] .game-card:hover, html[data-motion="reduce"] html body .primary-button:hover { transform: none; }

/* Dialogs */
.modal__card { border-radius: var(--radius-xl); border: 1px solid var(--line-strong); background: var(--surface-solid); }
.modal__card h2 { font-family: var(--display); letter-spacing: -0.035em; text-transform: uppercase; }
.modal__card .primary-button, .auth-modal button[type="submit"] { background: var(--hot); color: var(--hot-ink); border: 0; border-radius: 999px; }
.modal__card input:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }

/* Game page row */
body.is-game-open .game-view__title h1 { font-family: var(--display); }
body.is-game-open .game-view__title p { color: var(--hot); }
.back-button { border-radius: 999px; }
.back-button:hover { border-color: var(--text); color: var(--text); }
.game-stage { border-radius: var(--radius-lg); }

/* Hero showcase: bigger posters. */
.portal-feature .catalog-diorama { opacity: 1; }
.portal-feature__copy strong { font-family: var(--display); letter-spacing: -0.035em; text-transform: uppercase; }
@media (min-width: 1100px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 72px); } }
/* Score, ranking and achievement panels share the tile language. */
.panel, .leaderboard-card, .achievement-card, .stat-card { border-radius: var(--radius-lg); }

/* 5.30 — inside the games, each world keeps its own materials (felt, wood, neon), but the button that starts
   a run speaks the site's language: lime, like every other "play" on Arcadium. */
html body #gameStage :is(.se-start, .pr-primary, .op-primary, .ss-primary, .pz-primary, .cf-primary, .ca-primary, .fr-primary, #dsStart, [data-ns-action="new"]):not(:disabled) {
  border-color: transparent; background: var(--hot); background-image: none; color: var(--hot-ink); box-shadow: none; text-shadow: none;
}
html body #gameStage :is(.se-start, .pr-primary, .op-primary, .ss-primary, .pz-primary, .cf-primary, .ca-primary, .fr-primary, #dsStart, [data-ns-action="new"]):not(:disabled):hover {
  box-shadow: 0 8px 26px color-mix(in srgb, var(--hot) 30%, transparent);
}
