/* WM GAMES private portal. No JavaScript anywhere: the CSP denies scripts outright. */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/lato-latin-900-normal.woff2") format("woff2"); }

:root {
  --bg: #05080c;
  --panel: rgba(12, 18, 26, 0.72);
  --ink: #f3f6f9;
  --muted: #92a3b4;
  --dim: #5d6b78;
  --line: rgba(255, 255, 255, 0.09);
  --gold: #ffb02e;
  --gold-hi: #ffd36b;
  --teal: #16c6b4;
  --red: #ff5d5d;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100svh; display: flex; flex-direction: column; overflow-x: hidden;
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
main { flex: 1 0 auto; }

/* ---------- top bar ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px var(--gutter);
  background: linear-gradient(rgba(5, 8, 12, 0.78), rgba(5, 8, 12, 0));
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6)); }
.brand span { font-weight: 900; font-size: 15px; letter-spacing: 0.24em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.top nav { display: flex; align-items: center; gap: 8px; }
.top form { display: contents; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.chip:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.28); }
.chip.ok { color: #04140f; background: var(--teal); border-color: transparent; }
.chip.ok:hover { background: #3fe0cf; }
.chip.danger { color: #ffd9d9; background: rgba(255, 93, 93, 0.14); border-color: rgba(255, 93, 93, 0.45); }
.chip.danger:hover { background: rgba(255, 93, 93, 0.3); }
:is(.chip, .btn, a):focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; }
/* The studio's mark on top (23 Oct 2026: two games). Dark page, a warm glow behind the mark. */
.hero-brand {
  padding: clamp(104px, 12vw, 150px) var(--gutter) 0;
  background: radial-gradient(60% 70% at 50% 18%, rgba(255, 176, 46, 0.16), rgba(5, 8, 12, 0) 70%);
}
.hero-mark { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 1.6vw, 18px); }
.hero-mark img { width: clamp(92px, 12vw, 150px); height: auto; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)); }
.hero-name {
  font-weight: 900; font-size: clamp(30px, 5.4vw, 60px); line-height: 1; letter-spacing: 0.24em; padding-left: 0.24em;
  background: linear-gradient(180deg, #fff 0%, var(--gold-hi) 55%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.cta {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  width: min(100% - 32px, 560px); margin: clamp(22px, 3vw, 34px) auto 0;
}

/* Beta notice: Alberto, 20 Oct 2026, "solo BETA per pochi eletti" (not "non ufficiale"). */
.beta {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px;
  border: 1px solid rgba(255, 176, 46, 0.4); background: rgba(5, 8, 12, 0.66);
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap;
}
.beta b {
  padding: 4px 10px; border-radius: 999px; background: var(--gold); color: #1d1100;
  font-weight: 900; letter-spacing: 0.14em;
}

/* Supporter pitch on the sign-in page (Alberto, 20 Oct 2026). */
.pitch h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 900; line-height: 1.15; letter-spacing: 0.01em; }
.pitch h1 span {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #ff8f1f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pitch p { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--muted); text-wrap: balance; }

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-weight: 900; font-size: 18px; letter-spacing: 0.05em; text-decoration: none;
  border: 0; border-radius: 999px; padding: 18px 34px; min-height: 60px; cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 22px; height: 22px; flex: none; }

.btn-google {
  color: #1f1f1f; background: #fff; font-weight: 700; font-size: 17px; letter-spacing: 0.01em;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55);
}
.btn-google:hover { box-shadow: 0 16px 54px rgba(0, 0, 0, 0.65); }

.btn-get {
  color: #1d1100; padding-inline: 40px;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 55%, #ff8f1f 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 16px 56px rgba(255, 150, 40, 0.42);
}
.btn-get:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45) inset, 0 20px 70px rgba(255, 150, 40, 0.6); filter: saturate(1.08); }
.btn-get::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg); animation: shine 5s ease-in-out 1.2s infinite;
}
@keyframes shine { 0%, 62% { left: -60%; } 100% { left: 135%; } }
.btn-get b { font-weight: 900; }

.meta { font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.note { font-size: 12px; color: var(--dim); }
.note a { color: var(--muted); }
.notice { font-size: 14px; font-weight: 700; color: #ffcf96; }

.status {
  padding: 20px 28px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.status strong { display: block; font-size: 19px; font-weight: 900; letter-spacing: 0.03em; }
.status span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.status .dot {
  display: inline-block; width: 9px; height: 9px; margin-right: 10px; vertical-align: 2px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(255, 176, 46, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
.status.off .dot { background: var(--red); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 176, 46, 0.55); } 100% { box-shadow: 0 0 0 14px rgba(255, 176, 46, 0); } }

/* ---------- below the fold ---------- */
/* One card per game (portal/pages.go home): picture, name, download, older versions. Three games since 24 Oct 2026:
   three in a row on a desktop, one per row below, nothing in between (no card left alone on a row). From 1100px a
   card is wide enough for the download button and the rows of the older versions. */
.games {
  display: grid; grid-template-columns: 1fr; gap: clamp(20px, 3vw, 32px);
  width: min(100% - 32px, 1200px); margin: clamp(40px, 6vw, 72px) auto 0;
}
@media (min-width: 1100px) {
  .games { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.game {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
}
.game img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.game-body { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px clamp(16px, 3vw, 28px) 28px; text-align: center; }
.game h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 900; letter-spacing: 0.08em; }
.game .versions { width: 100%; margin: 10px 0 0; text-align: left; }
.versions { width: min(100% - 32px, 760px); margin: clamp(40px, 6vw, 80px) auto 0; }
.versions :is(h2, h3) { margin-bottom: 14px; font-size: 12px; font-weight: 900; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px 16px 22px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}
.row + .row { margin-top: 10px; }
.row b { font-size: 17px; font-weight: 900; letter-spacing: 0.02em; }
.row small { display: block; font-size: 13px; color: var(--muted); }

footer { margin-top: 64px; padding: 28px 16px 32px; text-align: center; font-size: 12px; letter-spacing: 0.08em; color: var(--dim); }
footer a { color: var(--muted); }

/* ---------- text pages (privacy, errors) ---------- */
.page { width: min(100% - 32px, 760px); margin: 120px auto 0; }
.page h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 900; letter-spacing: 0.02em; margin-bottom: 20px; }
.page h2 { font-size: 15px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 28px 0 8px; }
.page p, .page li { color: #c9d4de; }
.page ul { padding-left: 20px; }
.page .lead { font-size: 18px; color: var(--muted); }
.page .back { display: inline-flex; margin-top: 32px; }

/* ---------- admin ---------- */
.admin { width: min(100% - 32px, 1100px); margin: 104px auto 0; }
.admin h1 { font-size: 28px; font-weight: 900; letter-spacing: 0.04em; }
.admin h1 small { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); margin-left: 10px; }
.card { margin-top: 22px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.card h2 { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 900; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.card h2 .count { min-width: 24px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--ink); letter-spacing: 0.04em; text-align: center; }
.card.hot { border-color: rgba(255, 176, 46, 0.5); box-shadow: 0 0 0 1px rgba(255, 176, 46, 0.15) inset; }
.card.hot h2 { color: var(--gold); }
.list { list-style: none; }
.item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.who { min-width: 0; }
.who b { display: block; font-weight: 700; overflow-wrap: anywhere; }
.who small { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; }
.actions form { display: contents; }
.empty { color: var(--dim); font-size: 14px; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.trace { display: flex; flex-wrap: wrap; gap: 10px; }
.trace input {
  flex: 1 1 260px; min-width: 0; padding: 10px 14px; border-radius: 12px;
  font: 14px ui-monospace, Menlo, Consolas, monospace; color: var(--ink);
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.16);
}
.trace input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.trace-result { margin-top: 12px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 0 22px; }

/* ---------- news pop-up (templates/layout.html "news-card", portal/news.go) ---------- */
body:has(.news-layer) { overflow: hidden; }
.news-layer {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(2, 4, 8, 0.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: news-in 0.35s ease both;
}
.news-card {
  position: relative; width: min(520px, 100%); max-height: calc(100svh - 32px); overflow: auto;
  border-radius: 24px; border: 1px solid rgba(255, 176, 46, 0.38);
  background: linear-gradient(180deg, #121b26 0%, #0a1017 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 70px rgba(255, 176, 46, 0.14);
  animation: news-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}
.news-img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.news-body { padding: 26px 28px 28px; }
.news-tag {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.news-tag b { padding: 4px 10px; border-radius: 999px; background: var(--gold); color: #1d1100; font-weight: 900; letter-spacing: 0.14em; }
.news-card h2 { margin-top: 14px; padding-right: 36px; font-size: clamp(24px, 4vw, 30px); font-weight: 900; line-height: 1.1; }
.news-card ul { list-style: none; margin-top: 18px; display: grid; gap: 14px; }
.news-card li { position: relative; padding-left: 24px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.news-card li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 12px rgba(255, 176, 46, 0.75);
}
.news-card li b { display: block; margin-bottom: 2px; font-size: 17px; font-weight: 900; color: var(--ink); }
.news-actions { margin-top: 26px; }
.news-actions .btn { width: 100%; }
.news-x {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(5, 8, 12, 0.7);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.news-x:hover { border-color: var(--gold); }
.news-x:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@keyframes news-in { from { opacity: 0; } }
@keyframes news-pop { from { opacity: 0; transform: translateY(18px) scale(0.96); } }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  .top { position: relative; background: var(--bg); padding-block: 12px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 13px; letter-spacing: 0.2em; }
  .chip { padding: 7px 12px; font-size: 12px; }
  .hero-brand { padding-top: 28px; }
  .cta { margin-top: 18px; }
  .beta { font-size: 11px; letter-spacing: 0.1em; gap: 8px; padding-right: 12px; }
  .btn { font-size: 17px; padding: 16px 26px; width: 100%; }
  .row { padding: 14px 14px 14px 16px; }
  .page, .admin { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-get::before, .status .dot, .news-layer, .news-card { animation: none; }
  .btn, .chip { transition: none; }
}
