/* NoCodeSlots Games — light theme shared by every page (lobby, lists, game pages). */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f3f4f6;
  --bg-soft: #f9fafb;
  --surface: #ffffff;
  --line: #e5e7eb;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --red: #e23940;
  --red-hover: #cf2c3e;
  --purple-a: #8e2de2;
  --purple-b: #4a00e0;
  --amber: #f59e0b;
  --green: #16a34a;
  --dark: #111827;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.08), 0 4px 14px rgba(17, 24, 39, 0.06);
  --shadow-hover: 0 10px 28px rgba(17, 24, 39, 0.16);
  --head-font: "League Spartan", "Spartan", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html { background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  color: var(--text); background: var(--bg);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, .btn, .nav a { font-family: var(--head-font); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 760px) { .wrap { padding: 0 14px; } }
main { flex: 1; padding-bottom: 56px; }

/* ── Header ─────────────────────────────────────────────── */
#site-header { min-height: 68px; background: linear-gradient(90deg, var(--purple-a), var(--purple-b)); }
.hdr { position: sticky; top: 0; z-index: 50; background: linear-gradient(90deg, var(--purple-a), var(--purple-b)); box-shadow: 0 2px 12px rgba(74, 0, 224, 0.25); }
.hdr-in { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 8px; flex: none; }
.brand img { height: 40px; width: auto; filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.25)); }
.brand span { color: rgba(255, 255, 255, 0.85); font: 600 16px var(--head-font); }
.nav { display: flex; gap: 4px; }
.nav a { color: #fff; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 8px; opacity: 0.92; white-space: nowrap; }
.nav a:hover, .nav a.on { background: rgba(255, 255, 255, 0.16); opacity: 1; }
.hsearch { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.hsearch input {
  width: 100%; height: 40px; border: none; border-radius: 999px; padding: 0 16px 0 40px;
  background: #fff; color: var(--text); outline: none; box-shadow: inset 0 0 0 2px transparent;
}
.hsearch input:focus { box-shadow: inset 0 0 0 2px var(--amber); }
.hsearch .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.sresults {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-hover); overflow: hidden;
}
.sresults a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.sresults a:hover, .sresults a.active { background: var(--bg); }
.sresults img, .sresults .ph { width: 44px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--line); flex: none; }
.sresults b { display: block; font-size: 14px; }
.sresults small { color: var(--muted); font-size: 12px; }
.sresults .none { padding: 12px 14px; color: var(--muted); font-size: 14px; }
.sresults .all { justify-content: center; color: var(--red); font-weight: 700; font-size: 13px; border-top: 1px solid var(--line); }
.burger { display: none; background: none; border: none; color: #fff; font-size: 24px; width: 40px; height: 40px; cursor: pointer; }
@media (max-width: 980px) {
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--purple-b); padding: 8px 14px 14px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  .hdr.open .nav { display: flex; }
  .burger { display: block; }
  .hdr-cta { display: none; }
}
@media (max-width: 560px) {
  .brand span { display: none; }
  .brand img { height: 32px; }
  .hdr-in { gap: 10px; }
}

/* ── Buttons, badges ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; border-radius: 10px; font-weight: 700; white-space: nowrap;
  padding: 10px 18px; font-size: 15px; transition: background 0.15s, transform 0.15s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); }
.btn-white { background: #fff; color: var(--purple-b); }
.btn-white:hover { background: #f3f0ff; }
.btn-ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 30px; font-size: 18px; border-radius: 12px; }
.badge {
  display: inline-block; font: 700 11px var(--head-font); letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px; color: #fff;
}
.badge.new { background: var(--red); }
.badge.featured { background: linear-gradient(90deg, var(--purple-a), var(--purple-b)); }
.badge.soon { background: var(--amber); color: #3b2300; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(120deg, var(--purple-a), var(--purple-b));
  padding: 44px 0 52px; margin-bottom: 30px;
}
.hero::before, .hero::after, .shapes::before, .shapes::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before { width: 320px; height: 320px; right: -80px; top: -120px; background: rgba(255, 255, 255, 0.08); }
.hero::after { width: 180px; height: 180px; right: 22%; bottom: -90px; background: rgba(226, 57, 64, 0.35); filter: blur(2px); }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; max-width: 700px; position: relative; }
.hero p { margin-top: 12px; max-width: 620px; font-size: 17px; opacity: 0.92; position: relative; }
.hero .acts { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; position: relative; }
.hero-sm { padding: 30px 0 34px; }
.hero-sm h1 { font-size: clamp(26px, 3.2vw, 36px); }

/* ── Sections ────────────────────────────────────────────── */
.sec { margin: 0 0 36px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.sec-head .sub { color: var(--muted); font-size: 14px; }
.sec-head .more { margin-left: auto; color: var(--red); font: 700 14px var(--head-font); white-space: nowrap; }
.sec-head .more:hover { text-decoration: underline; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }

/* ── Game cards ──────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.row > * { scroll-snap-align: start; }
@media (min-width: 1100px) { .row { grid-auto-columns: calc((100% - 4 * 18px) / 5); } }
@media (max-width: 560px) { .row { grid-auto-columns: 72%; } .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card .thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #ede9fe, #e0e7ff); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card:hover .thumb img { transform: scale(1.05); }
.card .ovl {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(17, 24, 39, 0.55); opacity: 0; transition: opacity 0.15s;
}
.card:hover .ovl, .card .thumb:focus-visible .ovl { opacity: 1; }
@media (hover: none) { .card .ovl { display: none; } }
.card .badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; }
.heart {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 50%;
  border: none; cursor: pointer; display: grid; place-items: center; font-size: 16px; line-height: 1;
  background: rgba(255, 255, 255, 0.92); color: var(--muted); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.heart.on { color: var(--red); }
.card .info { padding: 10px 12px 12px; }
.card h3 { font-size: 16px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .by { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .by a:hover { color: var(--red); }
.card .by .plays::before { content: "·"; margin: 0 6px; }
.card .tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag { font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--bg); border-radius: 6px; padding: 2px 8px; }
.card-soon .thumb img { filter: grayscale(0.3) brightness(0.92); }

/* Continue playing */
.recent { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; }
.recent img, .recent .ph { width: 84px; height: 66px; border-radius: 10px; object-fit: cover; flex: none; background: var(--line); }
.recent .meta { min-width: 0; display: grid; gap: 2px; }
.recent h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent small { color: var(--muted); font-size: 12px; }
.recent .btn { margin-top: 4px; justify-self: start; }

/* ── Lists (All games, creators) ─────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar input, .toolbar select {
  height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 12px; outline: none;
}
.toolbar input { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--purple-a); }
.toolbar .count { margin-left: auto; color: var(--muted); font-size: 14px; }
.creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.creator { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; transition: box-shadow 0.15s; }
.creator:hover { box-shadow: var(--shadow-hover); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: #fff; font: 700 18px var(--head-font); background: linear-gradient(135deg, var(--purple-a), var(--purple-b));
}
.creator b { display: block; font-family: var(--head-font); font-size: 16px; }
.creator small { color: var(--muted); }

/* ── Breadcrumbs ─────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); padding: 16px 0 10px; }
.crumbs a:hover { color: var(--red); }
.crumbs span[aria-current] { color: var(--text-2); }

/* ── Game page ───────────────────────────────────────────── */
.game-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; }
.game-intro { color: var(--text-2); margin: 8px 0 18px; max-width: 900px; }
.player { background: var(--dark); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-hover); }
.stage { position: relative; aspect-ratio: 16 / 9; background: #0b0b14; }
.stage > img { width: 100%; height: 100%; object-fit: cover; filter: blur(2px) brightness(0.55); transform: scale(1.03); }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.stage .launch { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; color: #fff; text-align: center; }
.stage .launch img.cover { width: min(320px, 48%); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.stage .launch small { opacity: 0.8; font-size: 13px; }
.stage:fullscreen { aspect-ratio: auto; }
.ptools { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: #1f2937; }
.ptools .btn { background: rgba(255, 255, 255, 0.08); color: #fff; }
.ptools .btn:hover { background: rgba(255, 255, 255, 0.16); }
.ptools .btn.on { color: #ff6b74; }
.ptools .note { margin-left: auto; align-self: center; color: #9ca3af; font-size: 12px; }
.gcols { display: grid; grid-template-columns: 360px 1fr; gap: 22px; margin: 26px 0 36px; align-items: start; }
@media (max-width: 900px) { .gcols { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.panel h2 { font-size: 20px; margin-bottom: 10px; }
.facts { display: grid; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts div:last-child { border-bottom: none; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 700; text-align: right; }
.facts dd a { color: var(--red); }
.about p { color: var(--text-2); white-space: pre-line; }
.feats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.feats li { list-style: none; background: #f3f0ff; color: var(--purple-b); font-weight: 700; font-size: 13px; border-radius: 999px; padding: 4px 12px; }
.disclaimer { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 100;
  background: var(--dark); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-hover);
}

/* ── Promo + static pages ────────────────────────────────── */
.promo {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  border-radius: var(--radius); padding: 28px 30px; color: #fff; background: linear-gradient(120deg, var(--purple-a), var(--purple-b));
}
.promo h2 { font-size: 26px; }
.promo p { opacity: 0.92; max-width: 620px; margin-top: 4px; }
.doc { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px; max-width: 860px; }
.doc h2 { font-size: 20px; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc ul { padding-left: 20px; display: grid; gap: 4px; }
.doc a { color: var(--red); }

/* ── Footer ──────────────────────────────────────────────── */
#site-footer { background: var(--dark); color: #d1d5db; }
.ftr { padding: 40px 0 24px; }
.fcols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .fcols { grid-template-columns: 1fr 1fr; } }
.fcols img { height: 38px; width: auto; margin-bottom: 10px; }
.fcols h3 { color: #fff; font-size: 16px; margin-bottom: 10px; }
.fcols ul { list-style: none; display: grid; gap: 6px; font-size: 14px; }
.fcols a:hover { color: #fff; text-decoration: underline; }
.fcols p { font-size: 13.5px; color: #9ca3af; }
.fbottom { border-top: 1px solid #374151; margin-top: 28px; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #9ca3af; }
