/* Leon Games — night arcade theme */
:root {
  --bg: #0b0a1a;
  --bg-2: #12102a;
  --card: #1a1738;
  --card-2: #221e47;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f2ff;
  --muted: #aaa5d6;
  --amber: #ffb020;
  --orange: #ff6b3d;
  --pink: #ff4fa3;
  --cyan: #2ee6d6;
  --violet: #7c5cff;
  --grad-hot: linear-gradient(135deg, #ffc233 0%, #ff7a3d 50%, #ff4fa3 100%);
  --grad-cool: linear-gradient(135deg, #7c5cff 0%, #2ee6d6 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --font-display: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 92, 255, 0.28), transparent 60%),
    radial-gradient(700px 450px at -10% 20%, rgba(255, 79, 163, 0.16), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(46, 230, 214, 0.12), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #1b1640; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gradient-text { background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: 17px; text-decoration: none;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--grad-hot); color: #1b1640; box-shadow: 0 10px 30px -10px rgba(255, 122, 61, 0.8); }
.btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(255, 122, 61, 0.95); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); color: var(--text); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.06); }
.icon-btn svg { width: 18px; height: 18px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 26, 0.72); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 42px; height: 44px; transition: transform 0.4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.nav a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: 72px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(46, 230, 214, 0.1); border: 1px solid rgba(46, 230, 214, 0.3); color: var(--cyan);
  font-size: 14px; font-weight: 600;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(42px, 7vw, 76px); font-weight: 700; margin: 20px 0 18px; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--cyan); }

.hero-art { position: relative; aspect-ratio: 1; max-width: 440px; margin-inline: auto; width: 100%; }
.hero-art .ring { position: absolute; inset: 6%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.12); animation: spin 40s linear infinite; }
.hero-art .ring.r2 { inset: 18%; border-style: solid; border-color: rgba(124, 92, 255, 0.25); animation-duration: 60s; animation-direction: reverse; }
.hero-art .glow { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 122, 61, 0.5), transparent 70%); filter: blur(30px); }
.hero-art .lion { position: absolute; inset: 24%; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5)); }
.float-chip {
  position: absolute; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
  background: var(--card-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.float-chip svg { width: 30px; height: 30px; }
.float-chip.c1 { top: 4%; left: 8%; color: var(--pink); animation-delay: -1s; }
.float-chip.c2 { top: 14%; right: 2%; color: var(--cyan); animation-delay: -2.5s; }
.float-chip.c3 { bottom: 8%; left: 2%; color: var(--amber); animation-delay: -4s; }
.float-chip.c4 { bottom: 2%; right: 14%; color: var(--violet); animation-delay: -3s; }
@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { max-width: 300px; order: -1; }
  .float-chip { width: 50px; height: 50px; border-radius: 14px; }
  .float-chip svg { width: 24px; height: 24px; }
}

/* Sections */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.section h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 700; }
.section .sub { color: var(--muted); margin-top: 8px; max-width: 40em; }

/* Featured */
.featured {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.featured-art { position: relative; min-height: 280px; display: grid; place-items: center; overflow: hidden; }
.featured-art svg.big { width: 120px; height: 120px; color: rgba(255, 255, 255, 0.92); filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35)); animation: float 5s ease-in-out infinite; }
.featured-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.featured-body h3 { font-size: clamp(30px, 4vw, 44px); }
.featured-body p { color: var(--muted); }
.featured-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.08); color: var(--text); }
.tag svg { width: 14px; height: 14px; }
.tag.soon { background: rgba(255, 176, 32, 0.15); color: var(--amber); }
.tag.new { background: rgba(46, 230, 214, 0.15); color: var(--cyan); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .featured { grid-template-columns: 1fr; } .featured-art { min-height: 200px; } .featured-body { padding: 24px; } }

/* Filters */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.35); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Game grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--card); border: 1px solid var(--line); transition: transform 0.25s cubic-bezier(.3, 1.4, .5, 1), border-color 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 24px 50px -24px rgba(124, 92, 255, 0.6); }
.card-art { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; }
.card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.35)); }
.card-art svg { width: 64px; height: 64px; color: rgba(255, 255, 255, 0.95); transition: transform 0.3s; position: relative; z-index: 1; }
.card:hover .card-art svg { transform: scale(1.15) rotate(-6deg); }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-art .tag { position: absolute; top: 12px; left: 12px; z-index: 2; backdrop-filter: blur(6px); background: rgba(11, 10, 26, 0.6); }
.card-art .tag.soon { color: var(--amber); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 22px; }
.card-body p { color: var(--muted); font-size: 14px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.card-meta { font-size: 13px; color: var(--muted); }
.card .stretched { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card .card-foot .icon-btn { position: relative; z-index: 2; }
.card.more { border-style: dashed; background: transparent; align-items: center; justify-content: center; text-align: center; padding: 28px; min-height: 260px; gap: 10px; color: var(--muted); }
.card.more svg { width: 40px; height: 40px; color: var(--violet); }
.card.more h3 { color: var(--text); font-size: 20px; }

/* Art backgrounds */
.art-bg { position: absolute; inset: 0; }
.art-bg::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.25) 0 2px, transparent 3px) 0 0 / 38px 38px,
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.15) 0 1.5px, transparent 2.5px) 0 0 / 26px 26px;
  animation: drift 18s linear infinite;
}

/* Share band */
.share-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 40px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(46, 230, 214, 0.18)), var(--card);
  border: 1px solid var(--line-strong); display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
}
.share-band h2 { font-size: clamp(30px, 4vw, 42px); }
.share-band p { color: #d6d2f5; margin-top: 10px; }
.share-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.share-option {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius);
  background: rgba(11, 10, 26, 0.55); border: 1px solid var(--line-strong); cursor: pointer; text-decoration: none;
  font-weight: 600; transition: transform 0.15s, background 0.2s;
}
.share-option:hover { transform: translateY(-2px); background: rgba(11, 10, 26, 0.8); }
.share-option svg { width: 22px; height: 22px; flex-shrink: 0; }
.share-option.wa svg { color: #25d366; }
.share-option.mail svg { color: var(--amber); }
.share-option.copy svg { color: var(--cyan); }
.share-option.qr svg { color: var(--pink); }
.share-option.sms svg { color: #6fb6ff; }
.share-option.native svg { color: var(--violet); }
@media (max-width: 860px) { .share-band { grid-template-columns: 1fr; padding: 28px 22px; } }

/* Parents */
.promise-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.promise { padding: 22px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); }
.promise .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: rgba(46, 230, 214, 0.12); color: var(--cyan); }
.promise .ic svg { width: 24px; height: 24px; }
.promise h3 { font-size: 19px; margin-bottom: 6px; }
.promise p { color: var(--muted); font-size: 14px; }
@media (max-width: 960px) { .promise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .promise-grid { grid-template-columns: 1fr; } }

/* Support */
.support {
  position: relative; overflow: hidden; border-radius: 28px; padding: 48px;
  background: radial-gradient(600px 300px at 100% 0%, rgba(255, 79, 163, 0.35), transparent 70%),
              radial-gradient(500px 300px at 0% 100%, rgba(255, 176, 32, 0.3), transparent 70%), var(--card);
  border: 1px solid rgba(255, 176, 32, 0.35);
  display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center;
}
.support .lion-badge { width: 150px; height: 156px; animation: float 5s ease-in-out infinite; }
.support h2 { font-size: clamp(30px, 4.4vw, 46px); }
.support .big-note { font-size: clamp(18px, 2.2vw, 22px); margin-top: 14px; color: var(--text); }
.support .note { color: var(--muted); margin-top: 10px; }
.support ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: #e7e3ff; font-size: 15px; }
.support li { display: inline-flex; align-items: center; gap: 8px; }
.support li svg { width: 18px; height: 18px; color: var(--amber); }
.support-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; align-items: center; }
.support .kid-note { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .support { grid-template-columns: 1fr; padding: 30px 22px; text-align: left; } .support .lion-badge { width: 96px; height: 100px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 48px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.made-in { display: inline-flex; align-items: center; gap: 6px; }
.made-in svg { width: 16px; height: 16px; color: #ff5a5a; }

/* Share dialog */
dialog.share-dialog {
  width: min(100% - 32px, 440px); padding: 0; border: 1px solid var(--line-strong); border-radius: 24px;
  background: var(--bg-2); color: var(--text); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
}
dialog.share-dialog::backdrop { background: rgba(5, 4, 15, 0.7); backdrop-filter: blur(6px); }
dialog.share-dialog[open] { animation: pop 0.25s cubic-bezier(.3, 1.5, .5, 1); }
.dialog-inner { padding: 26px; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 6px; }
.dialog-head h2 { font-size: 26px; }
.dialog-sub { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.link-row { display: flex; gap: 8px; margin-bottom: 14px; }
.link-row input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05); color: var(--text); font: inherit; font-size: 14px;
}
.qr-box { display: none; margin-top: 16px; padding: 18px; border-radius: 16px; background: #fff; text-align: center; color: #1b1640; }
.qr-box.show { display: block; }
.qr-box canvas, .qr-box img { margin: 0 auto 10px; }
.qr-box p { font-size: 14px; font-weight: 600; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 200;
  padding: 12px 20px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700;
  transition: transform 0.3s cubic-bezier(.3, 1.5, .5, 1); pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }

/* Play page */
.play-wrap { padding: 28px 0 20px; }
.play-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.play-head h1 { font-size: clamp(28px, 4vw, 40px); }
.play-head .tags { margin-top: 8px; }
.play-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stage {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #000; border: 1px solid var(--line-strong);
  aspect-ratio: 16 / 9; max-height: calc(100vh - 220px); width: 100%; box-shadow: var(--shadow);
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.stage-empty .inner { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 420px; position: relative; z-index: 1; }
.stage-empty svg.big { width: 84px; height: 84px; color: #fff; animation: float 5s ease-in-out infinite; }
.stage-empty h2 { font-size: 30px; }
.stage-empty p { color: #e7e3ff; }
.play-desc { color: var(--muted); margin-top: 16px; max-width: 50em; }
@media (max-width: 640px) { .stage { aspect-ratio: 3 / 4; } }

/* Simple pages */
.page { padding: 56px 0; max-width: 760px; }
.page h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 18px; }
.page h2 { font-size: 24px; margin: 32px 0 10px; }
.page p, .page li { color: #d6d2f5; }
.page p + p { margin-top: 12px; }
.center-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.center-page .inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.center-page img { width: 120px; animation: float 5s ease-in-out infinite; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes drift { to { transform: translate(38px, 38px); } }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
