/* GodlyGaming.io — "Heavenly epic" theme. Black night sky, silver and divine gold, crystal-blue currency. */
:root {
  --bg: #05060c;
  --bg-2: #0a0d1a;
  --panel: rgba(15, 19, 37, 0.78);
  --panel-solid: #0d1122;
  --panel-2: #121731;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-gold: rgba(245, 181, 68, 0.38);
  --text: #eef0f7;
  --muted: #a0a8bf;
  --dim: #6c7491;
  --gold: #f5b544;
  --gold-hi: #ffe2a3;
  --gold-lo: #c9821f;
  --amber: #ff9a2e;
  --silver: #dfe4ee;
  --crystal: #7fd8ff;
  --violet: #8b6cff;
  --good: #4ade80;
  --bad: #f87171;
  --info: #7fb8ff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow-gold: 0 0 0 1px rgba(245, 181, 68, 0.45), 0 10px 40px rgba(245, 181, 68, 0.22);
  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #120c02; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }
.only-mobile { display: none; }

/* ---------- Sky ---------- */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(60, 74, 140, 0.35), transparent 60%),
    radial-gradient(900px 600px at 0% 10%, rgba(80, 50, 140, 0.18), transparent 60%),
    linear-gradient(#05060c, #070912 60%, #05060c);
}
.stars { position: absolute; inset: 0; background-repeat: repeat; opacity: 0.7; }
.stars.s1 {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 200px 150px, #ffe9b8, transparent),
    radial-gradient(1px 1px at 300px 40px, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 380px 210px, #fff, transparent),
    radial-gradient(1px 1px at 60px 260px, rgba(255,255,255,.6), transparent);
  background-size: 420px 300px;
  animation: twinkle 7s ease-in-out infinite alternate;
}
.stars.s2 {
  background-image:
    radial-gradient(1px 1px at 90px 120px, rgba(200,220,255,.8), transparent),
    radial-gradient(2px 2px at 260px 60px, rgba(255,226,163,.9), transparent),
    radial-gradient(1px 1px at 340px 280px, #fff, transparent),
    radial-gradient(1px 1px at 160px 330px, rgba(255,255,255,.7), transparent);
  background-size: 520px 380px;
  opacity: 0.5;
  animation: twinkle 11s ease-in-out infinite alternate-reverse;
}
.horizon {
  position: absolute; left: -10%; right: -10%; bottom: -30vh; height: 60vh;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 154, 46, 0.14), transparent 70%);
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.85; } }

/* ---------- Buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 800; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .ui-ico { width: 18px; height: 18px; }
.btn-gold {
  color: #1d1303;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  box-shadow: 0 6px 24px rgba(245, 181, 68, 0.28), inset 0 1px 0 rgba(255,255,255,.6);
}
.btn-gold:hover { color: #1d1303; box-shadow: 0 8px 32px rgba(245, 181, 68, 0.45), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { color: #fff; border-color: var(--line-gold); background: rgba(245,181,68,.06); }
.btn-crystal {
  color: #06121f;
  background: linear-gradient(135deg, #dff7ff, var(--crystal) 45%, var(--violet));
  box-shadow: 0 6px 24px rgba(127, 216, 255, 0.25);
}
.btn-crystal:hover { color: #06121f; box-shadow: 0 8px 32px rgba(127, 216, 255, 0.4); }
.btn-danger { color: #fff; background: #7f1d1d; border-color: #b91c1c; }
.btn-lg { --h: 54px; padding: 0 28px; font-size: 17px; }
.btn-sm { --h: 34px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5, 6, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 226, 163, 0.5), 0 0 22px rgba(245, 181, 68, 0.35);
}
.brand-word {
  font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffffff, #c9cfdb 60%, #9aa2b4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-word span {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-weight: 700; padding: 8px 14px; border-radius: 999px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.05); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .ui-ico { width: 22px; height: 22px; }
.coin-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(127,216,255,.12), rgba(139,108,255,.12));
  border: 1px solid rgba(127,216,255,.3); color: #e6f7ff; font-weight: 800;
}
.coin-pill:hover { color: #fff; border-color: rgba(127,216,255,.6); }
.coin { width: 28px; height: 28px; }
.coin-sm { width: 28px; height: 28px; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 700; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; padding: 8px;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
}
.user-menu .menu a, .user-menu .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  color: var(--text); background: none; border: 0; text-align: left; cursor: pointer; font-weight: 700;
}
.user-menu .menu a:hover, .user-menu .menu button:hover { background: rgba(255,255,255,.06); }
.user-menu .ui-ico { width: 18px; height: 18px; color: var(--gold); }

/* ---------- Avatars ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, #2b2f6b, #6b4bd8); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.avatar .ico { width: 58%; height: 58%; }
.avatar-sm { width: 34px; height: 34px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 84px; height: 84px; }
.av-star { background: linear-gradient(135deg, #3b2a0b, #f5b544); }
.av-crown { background: linear-gradient(135deg, #4a1d3f, #f5b544); }
.av-shield { background: linear-gradient(135deg, #142057, #60a5fa); }
.av-lamp { background: linear-gradient(135deg, #3a1e05, #fb923c); }
.av-fish { background: linear-gradient(135deg, #053344, #22d3ee); }
.av-ark { background: linear-gradient(135deg, #0b2f4d, #38bdf8); }
.av-dove { background: linear-gradient(135deg, #283046, #cbd5e1); }
.av-harp { background: linear-gradient(135deg, #3b0e40, #f0abfc); }
.av-flame { background: linear-gradient(135deg, #450a0a, #f97316); }
.av-anchor { background: linear-gradient(135deg, #0c2440, #7dd3fc); }
.av-tree { background: linear-gradient(135deg, #0b3a1f, #4ade80); }
.av-paw { background: linear-gradient(135deg, #3d1d06, #fbbf24); }

/* ---------- Flash ---------- */
.flashes { margin-top: 18px; display: grid; gap: 10px; }
.flash { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 700; }
.flash-success { border-color: rgba(74, 222, 128, .45); color: #c9f7d9; }
.flash-error { border-color: rgba(248, 113, 113, .5); color: #ffd4d4; }
.flash-info { border-color: rgba(127, 184, 255, .45); color: #d7e8ff; }
.flash-secret { border-color: var(--line-gold); color: var(--gold-hi); word-break: break-all; font-family: ui-monospace, Menlo, monospace; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; left: 50%; bottom: -220px; width: 1400px; height: 440px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 154, 46, .22), transparent 70%); pointer-events: none; z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-gold); background: rgba(245,181,68,.07);
  color: var(--gold-hi); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: .01em;
  font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; margin: 22px 0 18px;
  background: linear-gradient(180deg, #ffffff 10%, #d7dbe6 55%, #9ba3b5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance;
}
.hero h1 .gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 26px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-weight: 700; font-size: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust .ui-ico { width: 18px; height: 18px; color: var(--gold); }
.hero-art { position: relative; aspect-ratio: 1 / 0.9; }
.hero-art .emblem {
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  filter: saturate(1.05);
  animation: breathe 8s ease-in-out infinite;
}
.hero-art .float-coin { position: absolute; width: 18%; filter: drop-shadow(0 10px 30px rgba(127,216,255,.45)); animation: float 6s ease-in-out infinite; }
.hero-art .float-coin.c1 { right: 6%; top: 10%; }
.hero-art .float-coin.c2 { left: 4%; bottom: 14%; width: 12%; animation-delay: -2s; }
.hero-art .float-coin.c3 { right: 14%; bottom: 4%; width: 9%; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; }
.stat {
  padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
}
.stat b { display: block; font-family: var(--font-display); font-size: 30px; color: var(--gold-hi); line-height: 1.1; }
.stat span { color: var(--muted); font-weight: 700; font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2, .page-title {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.6vw, 44px); margin: 10px 0 6px;
  background: linear-gradient(180deg, #fff, #c8cedb); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head p { color: var(--muted); max-width: 620px; margin: 0; }
.kicker { color: var(--gold); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-gold), transparent); border: 0; margin: 0; }

/* ---------- Game cards ---------- */
.game-art {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--a), color-mix(in srgb, var(--a) 40%, var(--b)) 55%, var(--b));
}
.game-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-rays {
  position: absolute; inset: -40%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.10) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent 75%); mask-image: radial-gradient(closest-side, #000, transparent 75%);
  animation: spin 80s linear infinite;
}
.art-glow { position: absolute; inset: 0; background: radial-gradient(40% 40% at 50% 50%, rgba(255,240,210,.45), transparent 70%); }
.art-icon {
  position: relative; width: 42%; height: auto; color: #fff;
  filter: drop-shadow(0 0 10px rgba(255, 226, 163, .75)) drop-shadow(0 6px 18px rgba(0,0,0,.35));
}
.game-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5,6,12,.55)); }
@keyframes spin { to { transform: rotate(360deg); } }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.game-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--line-gold); box-shadow: var(--glow-gold); color: var(--text); }
.game-card:hover .art-rays { animation-duration: 20s; }
.game-card .badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.game-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-body h3 { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: .005em; }
.game-body p { margin: 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--silver); background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.chip-gold { color: var(--gold-hi); border-color: var(--line-gold); background: rgba(245,181,68,.08); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .03em; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.badge-soon { color: #e7ebf5; background: rgba(10, 12, 24, .55); border: 1px solid rgba(255,255,255,.22); }
.badge-live { color: #1d1303; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.badge-live .ui-ico { width: 12px; height: 12px; }
.badge-hidden { color: #fff; background: #4b5563; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.featured-grid .game-art { aspect-ratio: 16 / 10; }
.featured-grid .art-icon { width: 30%; }
.featured-grid .game-body { padding: 18px 20px 20px; }
.featured-grid .game-body h3 { font-family: var(--font-display); font-size: 21px; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chips button {
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  color: var(--muted); font-weight: 800; cursor: pointer;
}
.filter-chips button:hover { color: #fff; }
.filter-chips button[aria-pressed="true"] { color: #1d1303; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: transparent; }
.search { position: relative; margin-left: auto; min-width: 240px; }
.search .ui-ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--dim); }
.search input { width: 100%; height: 42px; padding: 0 14px 0 42px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); }
.search input:focus { outline: none; border-color: var(--line-gold); box-shadow: 0 0 0 3px rgba(245,181,68,.15); }
.no-results { display: none; }

/* ---------- Cryst Coins ---------- */
.coins-panel {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center;
  padding: 48px; border-radius: 28px; border: 1px solid rgba(127,216,255,.22);
  background:
    radial-gradient(600px 400px at 15% 50%, rgba(127,216,255,.12), transparent 70%),
    radial-gradient(500px 400px at 90% 10%, rgba(139,108,255,.14), transparent 70%),
    var(--panel);
}
.coin-stage { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.coin-stage .ring { position: absolute; border-radius: 50%; border: 1px dashed rgba(127,216,255,.28); animation: spin 60s linear infinite; }
.coin-stage .ring.r1 { inset: 4%; }
.coin-stage .ring.r2 { inset: 16%; border-style: solid; border-color: rgba(245,181,68,.22); animation-direction: reverse; animation-duration: 90s; }
.coin-stage .big-coin { width: 58%; filter: drop-shadow(0 0 40px rgba(127,216,255,.45)); animation: float 7s ease-in-out infinite; }
.coin-title { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 42px); margin: 10px 0 12px; }
.coin-title .crystal { background: linear-gradient(135deg, #e8f9ff, var(--crystal) 50%, #a993ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.step { padding: 18px; border-radius: var(--radius-sm); background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.step b { display: block; font-size: 16px; margin: 8px 0 4px; }
.step span { color: var(--muted); font-size: 14px; }
.step .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; font-size: 14px; color: #06121f; background: linear-gradient(135deg, #dff7ff, var(--crystal)); }

/* ---------- Feature tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.tile .ui-ico { width: 30px; height: 30px; color: var(--gold); margin-bottom: 12px; }
.tile h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.tile p { color: var(--muted); font-size: 14px; margin: 0; }

.cta-band {
  position: relative; overflow: hidden; text-align: center; padding: 64px 24px; border-radius: 28px;
  border: 1px solid var(--line-gold);
  background: radial-gradient(60% 120% at 50% 100%, rgba(255,154,46,.25), transparent 70%), var(--panel);
}
.cta-band h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 46px); margin-bottom: 10px; }
.cta-band p { color: var(--muted); max-width: 560px; margin: 0 auto 24px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: rgba(5,6,12,.7); padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--muted); font-weight: 700; padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-brand .brand { display: inline-flex; margin-bottom: 14px; padding: 0; }
.footer-brand p { max-width: 360px; }
.verse { font-family: var(--font-display); font-size: 15px; color: var(--silver); }
.verse span { display: block; color: var(--gold); font-family: var(--font-body); font-weight: 800; font-size: 13px; margin-top: 4px; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }

/* ---------- Forms ---------- */
.auth { min-height: calc(100vh - 72px - 260px); display: grid; place-items: center; padding: 48px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.auth .card { width: min(480px, 100%); }
.card-head { text-align: center; margin-bottom: 22px; }
.card-head img { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; box-shadow: 0 0 0 1px rgba(255,226,163,.5), 0 0 30px rgba(245,181,68,.35); }
.card-head h1 { font-family: var(--font-display); font-size: 28px; margin-bottom: 6px; }
.card-head p { color: var(--muted); margin: 0; }
.field { display: grid; gap: 6px; margin-bottom: 16px; align-content: start; }
.field label, .label { font-weight: 800; font-size: 14px; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(3, 4, 10, .55); color: var(--text);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,181,68,.16); }
.field input[type=color] { width: 64px; height: 42px; padding: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; }
.hint { color: var(--dim); font-size: 13px; }
.errors { margin: 0 0 16px; padding: 12px 16px 12px 34px; border-radius: 12px; border: 1px solid rgba(248,113,113,.5); background: rgba(127,29,29,.2); color: #ffd4d4; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--gold); flex-shrink: 0; }
.alt { text-align: center; color: var(--muted); margin: 18px 0 0; font-size: 15px; }
.avatar-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-pick label { cursor: pointer; display: grid; place-items: center; padding: 6px; border-radius: 14px; border: 1px solid transparent; }
.avatar-pick input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-pick input:checked + .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.avatar-pick input:focus-visible + .avatar { outline: 2px solid var(--gold); outline-offset: 3px; }
.notice { padding: 12px 14px; border-radius: 12px; background: rgba(127,216,255,.07); border: 1px solid rgba(127,216,255,.25); color: #d8f2ff; font-size: 14px; margin-bottom: 16px; }

/* ---------- Account / wallet ---------- */
.page { padding: 48px 0; }
.wallet-hero {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 28px; border-radius: 24px;
  border: 1px solid rgba(127,216,255,.25);
  background: radial-gradient(500px 300px at 0% 50%, rgba(127,216,255,.14), transparent 70%), var(--panel);
}
.wallet-hero .coin { width: 88px; height: 88px; filter: drop-shadow(0 0 24px rgba(127,216,255,.45)); }
.balance { font-family: var(--font-display); font-size: clamp(36px, 5vw, 56px); line-height: 1; color: #eafaff; }
.balance small { font-family: var(--font-body); font-size: 15px; font-weight: 800; color: var(--crystal); margin-left: 6px; letter-spacing: .04em; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--dim); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.02); font-weight: 800; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--good); font-weight: 800; }
.neg { color: #fca5a5; font-weight: 800; }
.card h2, .card h3 { font-size: 18px; font-weight: 800; }
.linked-games { display: grid; gap: 10px; }
.linked-games a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; color: var(--text); font-weight: 700; }
.linked-games a:hover { background: rgba(255,255,255,.04); }
.linked-games .game-art { width: 56px; aspect-ratio: 1; border-radius: 10px; }
.linked-games .art-icon { width: 60%; }
.linked-games .art-rays { display: none; }

/* ---------- Store ---------- */
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 20px 22px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); }
.pack.hot { border-color: var(--line-gold); box-shadow: var(--glow-gold); }
.pack .badge { position: absolute; top: -12px; }
.pack .coin { width: 72px; height: 72px; margin-bottom: 6px; filter: drop-shadow(0 0 18px rgba(127,216,255,.4)); }
.pack h3 { font-size: 16px; font-weight: 800; color: var(--muted); margin: 0; }
.pack .amount { font-family: var(--font-display); font-size: 34px; color: #eafaff; line-height: 1; }
.pack .bonus { color: var(--gold-hi); font-weight: 800; font-size: 14px; min-height: 22px; }
.pack .price { font-size: 22px; font-weight: 800; margin: 6px 0 12px; }
.pack form { width: 100%; margin-top: auto; }

/* ---------- Game detail ---------- */
.game-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; padding: 48px 0 24px; }
.game-hero .game-art { border-radius: 24px; aspect-ratio: 16 / 11; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.game-hero .art-icon { width: 34%; }
.game-hero h1 { font-family: var(--font-display); font-size: clamp(32px, 4.6vw, 54px); margin: 12px 0; }
.prose { color: var(--muted); font-size: 17px; }
.prose h2 { color: var(--text); font-size: 22px; margin-top: 1.4em; }
.legal { max-width: 780px; }
.legal h2 { font-size: 20px; color: var(--text); margin-top: 1.6em; }
.draft-note { padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--line-gold); color: var(--gold-hi); margin-bottom: 24px; }

/* ---------- Admin ---------- */
body.admin { background: #070912; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px; border-right: 1px solid var(--line); background: #05060c; display: flex; flex-direction: column; gap: 18px; }
.admin-side .brand-word { font-size: 19px; }
.admin-side .brand-mark { width: 36px; height: 36px; }
.admin-side nav { display: grid; gap: 2px; }
.admin-side nav a, .admin-side nav button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; background: none; border: 0; cursor: pointer; }
.admin-side nav a:hover, .admin-side nav button:hover { color: #fff; background: rgba(255,255,255,.04); }
.admin-side nav a[aria-current="page"] { color: #1d1303; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.admin-side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; width: 100%; }
.admin-me { margin-top: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; }
.admin-main { padding: 28px 32px 60px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-top h1 { font-family: var(--font-display); font-size: 30px; margin: 0; }
.admin-main .flashes { margin: 0 0 18px; width: 100%; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-grid .stat b { font-size: 28px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 220px; min-height: 40px; }
.toolbar select.input { min-width: 150px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.inline-form { display: inline; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .game-art { width: 46px; aspect-ratio: 1; border-radius: 10px; }
.table .art-icon { width: 60%; }
.table .art-rays { display: none; }
.code, pre.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
  background: #03040a; border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; overflow-x: auto; color: #dbe4ff; line-height: 1.55;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 6px; }
pre.code code { background: none; padding: 0; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--dim); font-weight: 800; }
.kv dd { margin: 0; word-break: break-all; }
.docs h2 { font-size: 22px; margin-top: 32px; }
.docs h3 { font-size: 17px; margin-top: 22px; }
.docs p, .docs li { color: var(--muted); }
.pager { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 18px; color: var(--muted); }
.card + .card { margin-top: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .packs { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid .game-card:last-child { display: none; }
}
@media (max-width: 900px) {
  .nav { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; gap: 2px; margin: 0;
    padding: 12px 16px 18px; background: rgba(5,6,12,.97); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 17px; }
  .only-mobile { display: block; }
  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-art { order: -1; width: min(420px, 90%); margin: 0 auto; }
  .hero-copy { text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero-cta, .trust { justify-content: center; }
  .coins-panel { grid-template-columns: 1fr; padding: 28px 22px; gap: 12px; }
  .coin-stage { width: min(260px, 70%); margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: 1fr; }
  .game-hero { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-side nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-side nav a, .admin-side nav button { width: auto; }
  .admin-side hr, .admin-me { display: none; }
  .admin-main { padding: 20px 16px 48px; }
  .form-grid { grid-template-columns: 1fr; }
  .search { margin-left: 0; width: 100%; }
}
@media (max-width: 600px) {
  .hide-sm { display: none !important; }
  .brand-word { font-size: 19px; }
  .brand-mark { width: 38px; height: 38px; }
  .nav-right .btn { --h: 38px; padding: 0 14px; font-size: 14px; }
  .coin-pill { height: 36px; padding-right: 10px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 12px; }
  .stat b { font-size: 22px; }
  .stat span { font-size: 12px; line-height: 1.35; display: block; }
  .section { padding: 52px 0; }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-body { padding: 10px 12px 12px; }
  .game-body h3 { font-size: 15px; }
  .game-body p { font-size: 13px; }
  .game-card .meta .chip:nth-child(n+3) { display: none; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-grid .game-card:last-child { display: flex; }
  .tiles { grid-template-columns: 1fr; }
  .packs { grid-template-columns: 1fr; }
  .wallet-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .avatar-pick { grid-template-columns: repeat(4, 1fr); }
  .card { padding: 22px 18px; }
  .kv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.span-2 { grid-column: 1 / -1; }

/* Code of Conduct */
.rules-box { max-height: 260px; overflow-y: auto; padding: 16px 18px; margin-bottom: 16px; border-radius: 14px; border: 1px solid var(--line-gold); background: rgba(3, 4, 10, .55); }
.rules-box:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.rules-list { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.rules-list strong { color: var(--text); }
.rules-report { color: var(--muted); font-size: 14px; }
.rules-card .rules-list { font-size: 17px; gap: 14px; }
.rules-card .verse, .rules-box .verse { margin: 14px 0 0; }
