/* =========================================================
   Shared theme for the Netpoleon event games.
   Loaded first on every page; each game's style.css wins.
   Dark by design: booth screens are viewed at an angle,
   in a bright room, from two metres away.
   ========================================================= */

:root {
  /* Professional security-operations palette: deep slate, cyan signal. */
  --bg:        #060a12;
  --bg-2:      #0a1120;
  --panel:     #0f172a;
  --panel-2:   #131d33;
  --panel-hi:  #1a2540;
  --line:      #1e2b45;
  --line-hi:   #2e405f;

  --text:      #e8eefb;
  --muted:     #94a7c4;
  --dim:       #64748b;

  --accent:    #22d3ee;
  --accent-2:  #6366f1;
  --ok:        #34d399;
  --danger:    #f43f5e;
  --warn:      #f59e0b;

  --r-sm: 6px;
  --r:    12px;
  --r-lg: 18px;

  --shadow: 0 18px 45px rgba(0,0,0,.5);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

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

/* Several components below set an explicit `display`, which would
   otherwise beat the `hidden` attribute. Keep `hidden` authoritative. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1000px 560px at 15% -10%, rgba(34,211,238,.10), transparent 62%),
    radial-gradient(900px 520px at 88% 0%,  rgba(99,102,241,.12), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; line-height: 1.55; }

/* ---------- layout helpers ---------- */

.wrap {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
  position: relative;
  z-index: 1;              /* sits above the live backdrop */
}

/* Interactive backdrop canvas — drawn by shared/backdrop.js */
#backdrop {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;    /* never intercepts a click meant for the game */
  opacity: .85;
}

.stack   { display: flex; flex-direction: column; gap: 1rem; }
.row     { display: flex; align-items: center; gap: .75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.spacer  { flex: 1; }
.center  { text-align: center; }

/* Screens: only one visible at a time. */
.screen { display: none; }
.screen.is-active { display: block; animation: fade-up .32s ease both; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- surfaces ---------- */

.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
}

.hair { height: 1px; background: var(--line); border: 0; margin: 1.25rem 0; }

/* ---------- type ---------- */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
}
.title    { font-size: clamp(1.9rem, 5vw, 3.2rem); }
.subtitle { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--muted); }
.muted    { color: var(--muted); }
.dim      { color: var(--dim); font-size: .85rem; }
.mono     { font-family: var(--mono); }

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  border: 1px solid var(--line-hi);
  background: var(--panel-hi);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease, border-color .18s ease;
  touch-action: manipulation;
}
.btn:hover  { background: #22304e; border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #04121c;
  font-weight: 800;
}
.btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.btn-lg   { padding: 1.05rem 2.2rem; font-size: 1.12rem; }
.btn-ghost{ background: transparent; }

/* ---------- pills / chips ---------- */

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}
.pill-ok     { color: var(--ok);     border-color: rgba(47,227,166,.4); background: rgba(47,227,166,.1); }
.pill-danger { color: var(--danger); border-color: rgba(255,93,115,.4); background: rgba(255,93,115,.1); }
.pill-warn   { color: var(--warn);   border-color: rgba(255,198,92,.4); background: rgba(255,198,92,.1); }

/* ---------- logo slots ----------
   Official Netpoleon / Check Point artwork only.
   Until the real files exist in assets/, a neutral labelled
   box renders. Nothing here draws or imitates a logo. */

.logo-slot { display: inline-flex; align-items: center; }

/* The supplied artwork is raster with a white background (the Check Point file
   is a JPG, so transparency isn't possible). Sitting it on a white plaque makes
   that read as deliberate instead of broken. */
.logo-slot img {
  display: block;
  height: var(--logo-h, 38px);
  width: auto; max-width: 240px;
  background: #fff;
  padding: .3rem .5rem;
  border-radius: 7px;
  box-shadow: 0 3px 12px rgba(0,0,0,.35);
}

.logo-ph {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--logo-h, 38px);
  padding: 0 .9rem;
  border: 1px dashed var(--line-hi);
  border-radius: var(--r-sm);
  color: var(--dim);
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- leaderboard ---------- */

.lb { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lb th {
  text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--dim); font-weight: 700; padding: .4rem .5rem;
}
.lb td { padding: .5rem; border-top: 1px solid var(--line); font-size: .95rem; }
.lb td:first-child { color: var(--dim); width: 2.5rem; }
.lb td:nth-child(2) { font-family: var(--mono); letter-spacing: .1em; font-weight: 700; }
.lb td:last-child  { text-align: right; font-weight: 700; }
.lb tr.is-you td   { color: var(--accent); }
.lb-empty { color: var(--dim); font-size: .9rem; padding: .75rem .5rem; }

/* ---------- initials entry ---------- */

.initials {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .35em;
  text-align: center;
  text-transform: uppercase;
  width: 6.5ch;
  padding: .5rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
}
.initials:focus { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- product panel (filled from content.js) ---------- */

.product-panel { border-left: 3px solid var(--accent); }
.product-points { margin: .75rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.product-points li { margin-bottom: .4rem; }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%);
  background: var(--panel-hi); border: 1px solid var(--line-hi);
  padding: .7rem 1.2rem; border-radius: 999px;
  font-size: .9rem; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  z-index: 60;
}
.toast.is-on { opacity: 1; }

/* ---------- footer ---------- */

.site-foot {
  margin-top: 2.5rem; padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--dim); font-size: .8rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
