/* ==========================================================================
   HangerPlayz — premium dark-purple design system
   ========================================================================== */
:root {
  --bg: #090611;
  --bg-2: #120b20;
  --card: #171025;
  --card-2: #1d1430;
  --p1: #8b5cf6;
  --p2: #a855f7;
  --p3: #c084fc;
  --text: #f5f3ff;
  --muted: #a7a0b8;
  --line: rgba(192, 132, 252, .16);
  --gold: #f4c76a;
  --silver: #cfd6e4;
  --bronze: #d99a6c;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-d: "Space Grotesk", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-d); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--p3); text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: rgba(139, 92, 246, .14); padding: .15em .5em; border-radius: 8px; font-size: .92em; word-break: break-all; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(168, 85, 247, .45); }

:focus-visible { outline: 2px solid var(--p3); outline-offset: 3px; border-radius: 10px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--p1); color: #fff; padding: 10px 16px; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 12px; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 40px); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
[data-icon], .ico { display: inline-flex; vertical-align: -.15em; }
[hidden] { display: none !important; }

.grad-text { background: linear-gradient(100deg, #c084fc, #8b5cf6 45%, #e879f9); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Loader / page entrance ---------- */
.loader { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: grid; place-content: center; justify-items: center; gap: 18px;
  animation: loaderOut .5s ease 1.8s forwards; }
.loader img { image-rendering: pixelated; animation: bob 1.4s ease-in-out infinite; }
.loader-bar { width: 160px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--p1), var(--p3)); border-radius: 4px; animation: slide 1s ease-in-out infinite; }
.loader.done { animation: loaderOut .45s ease forwards; }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- Background ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 700px at 80% -10%, rgba(139, 92, 246, .16), transparent 60%), radial-gradient(900px 600px at -10% 40%, rgba(168, 85, 247, .10), transparent 60%), var(--bg); }
.bg-orbs i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(90px); opacity: .22; will-change: transform; }
.bg-orbs i:nth-child(1) { background: #7c3aed; top: -18vmax; right: -12vmax; animation: drift 26s ease-in-out infinite alternate; }
.bg-orbs i:nth-child(2) { background: #a855f7; bottom: -22vmax; left: -14vmax; animation: drift 32s ease-in-out infinite alternate-reverse; opacity: .16; }
.bg-orbs i:nth-child(3) { background: #6d28d9; top: 40%; left: 40%; width: 30vmax; height: 30vmax; opacity: .09; animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(6vmax, 5vmax, 0) scale(1.08); } }

.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); z-index: 120; background: linear-gradient(90deg, var(--p1), var(--p3)); }

/* ---------- Navbar ---------- */
.navbar { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100; transition: background .35s, box-shadow .35s, border-color .35s; border-bottom: 1px solid transparent; }
.navbar.scrolled { background: rgba(12, 8, 22, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.nav-inner { position: relative; width: min(1180px, 100% - 40px); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-d); font-weight: 700; font-size: 1.12rem; }
.brand img { image-rendering: pixelated; border-radius: 9px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: rgba(139, 92, 246, .12); }
.nav-links a.active { color: #fff; }
.nav-indicator { position: absolute; bottom: 10px; left: 0; height: 2px; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--p1), var(--p3)); box-shadow: 0 0 12px rgba(168, 85, 247, .6); transition: transform .4s var(--ease), width .4s var(--ease), opacity .3s; opacity: 0; }
.icon-btn.nav-toggle { display: none; }

.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: rgba(23, 16, 37, .7); font-size: 1.25rem; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.icon-btn:hover { background: rgba(139, 92, 246, .22); border-color: rgba(192, 132, 252, .45); }

@media (max-width: 860px) {
  .icon-btn.nav-toggle { display: inline-grid; }
  .nav-indicator { display: none; }
  .nav-links { position: absolute; top: calc(var(--nav-h) - 6px); left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px; border-radius: 18px; background: rgba(18, 11, 32, .96); border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(0, 0, 0, .5);
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98); transform-origin: top; transition: opacity .25s, transform .3s var(--ease), visibility .3s; }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 14px 16px; border-radius: 12px; }
  .nav-links a.active { background: rgba(139, 92, 246, .18); }
}

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 14px; border: 1px solid transparent; font-weight: 600; cursor: pointer; overflow: hidden; isolation: isolate; transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s; }
.btn:active { transform: scale(.97); }
.btn-primary { color: #fff; background: linear-gradient(120deg, var(--p1), var(--p2)); box-shadow: 0 10px 28px rgba(139, 92, 246, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(139, 92, 246, .5); }
.btn-ghost { background: rgba(23, 16, 37, .65); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(139, 92, 246, .18); border-color: rgba(192, 132, 252, .5); transform: translateY(-2px); }
.btn-sm { min-height: 42px; padding: 8px 16px; font-size: .92rem; border-radius: 12px; }
.btn-block { width: 100%; font-size: 1.05rem; min-height: 54px; }
.btn-shine::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(64px, 9vw, 112px) 0; }
.section.alt { background: linear-gradient(180deg, transparent, rgba(18, 11, 32, .75) 12%, rgba(18, 11, 32, .75) 88%, transparent); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head.left { text-align: left; margin: 0 0 20px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; font-weight: 600; color: var(--p3); margin-bottom: 10px; }

.card { background: linear-gradient(160deg, rgba(29, 20, 48, .9), rgba(23, 16, 37, .9)); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); box-shadow: 0 18px 50px rgba(0, 0, 0, .28); transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.card h3 { font-size: 1.2rem; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 30px) 0 90px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 500px at 75% 45%, rgba(139, 92, 246, .28), transparent 65%), radial-gradient(500px 400px at 15% 80%, rgba(168, 85, 247, .14), transparent 65%); animation: heroGlow 12s ease-in-out infinite alternate; }
@keyframes heroGlow { to { opacity: .65; transform: scale(1.06); } }
.particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); margin-bottom: .3em; }
.lead { font-size: clamp(1.1rem, 2vw, 1.35rem); color: #e4dcf7; max-width: 34em; }
.sub { color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 22px; }
.made-for { font-size: .88rem; color: var(--muted); letter-spacing: .03em; }
.hero-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 440px; margin-inline: auto; width: 100%; }
.hero-logo { position: relative; width: 78%; image-rendering: pixelated; filter: drop-shadow(0 24px 40px rgba(139, 92, 246, .45)); animation: float 6s ease-in-out infinite; }
.hero-ring { position: absolute; inset: 6%; border-radius: 50%; border: 1px solid var(--line); box-shadow: inset 0 0 60px rgba(139, 92, 246, .2), 0 0 70px rgba(139, 92, 246, .18); animation: spin 40s linear infinite; background: conic-gradient(from 0deg, transparent, rgba(168, 85, 247, .22), transparent 40%); }
.hero-ring.r2 { inset: -2%; animation-duration: 60s; animation-direction: reverse; opacity: .6; background: none; border-style: dashed; }
.float-chip { position: absolute; display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; font-size: .85rem; font-weight: 500; background: rgba(23, 16, 37, .85); border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); animation: float 5s ease-in-out infinite; }
.float-chip.c1 { top: 8%; left: -2%; } .float-chip.c2 { top: 38%; right: -6%; animation-delay: -1.6s; } .float-chip.c3 { bottom: 8%; left: 4%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 16px; display: grid; justify-items: center; padding-top: 8px; }
.scroll-hint span { width: 4px; height: 8px; border-radius: 3px; background: var(--p3); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lead, .hero-copy .sub { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { order: -1; max-width: 280px; }
  .float-chip.c2 { right: -2%; }
}

/* ---------- Payment ---------- */
.pay-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.pay-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
@media (max-width: 920px) { .pay-grid { grid-template-columns: minmax(0, 1fr); } .qr-card { max-width: 440px; margin-inline: auto; width: 100%; } }

.qr-card { position: sticky; top: calc(var(--nav-h) + 20px); padding: 2px; border-radius: 26px; isolation: isolate; box-shadow: 0 0 80px rgba(139, 92, 246, .22), 0 30px 60px rgba(0, 0, 0, .4); }
@media (max-width: 920px) { .qr-card { position: relative; top: 0; } }
.qr-border { position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: conic-gradient(from var(--ang, 0deg), #6d28d9, #c084fc, #8b5cf6, #e879f9, #6d28d9); animation: borderSpin 6s linear infinite; }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes borderSpin { to { --ang: 360deg; } }
.qr-inner { background: linear-gradient(160deg, #1d1430, #140d22); border-radius: 24px; padding: 24px; text-align: center; }
.qr-inner h3 { font-size: 1.1rem; display: flex; justify-content: center; gap: 8px; align-items: center; }
/* The QR image is shown exactly as supplied: no filters, overlays or recolouring. */
.qr-frame { margin: 14px auto 16px; width: min(100%, 300px); border-radius: 18px; overflow: hidden; cursor: zoom-in; transition: transform .35s var(--ease); background: transparent; }
.qr-frame:hover { transform: scale(1.02); }
.qr-frame img { width: 100%; height: auto; }
.qr-help { font-size: .92rem; color: var(--muted); }
.qr-help strong { color: var(--text); }
.qr-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.upi-line { margin: 16px 0 0; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: .9rem; }
.qr-card.pulse .qr-border { animation-duration: 1.6s; }

.amount-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin: 14px 0 22px; }
.amt { position: relative; min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: rgba(18, 11, 32, .8); font-weight: 600; font-size: 1.05rem; cursor: pointer; transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s; }
.amt:hover { transform: translateY(-2px); border-color: rgba(192, 132, 252, .55); }
.amt[aria-pressed="true"] { background: linear-gradient(135deg, var(--p1), var(--p2)); border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgba(139, 92, 246, .45); transform: translateY(-2px) scale(1.04); }
.amt[aria-pressed="true"]::after { content: ""; position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; }

.custom-amount label { display: block; font-size: .92rem; color: var(--muted); margin-bottom: 8px; }
.input-row { display: flex; align-items: stretch; gap: 10px; }
.prefix { display: grid; place-items: center; padding: 0 14px; border-radius: 14px 0 0 14px; background: rgba(139, 92, 246, .16); border: 1px solid var(--line); border-right: 0; font-weight: 600; }
.input-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 0 14px 14px 0; margin-left: -10px; border: 1px solid var(--line); background: rgba(9, 6, 17, .8); color: var(--text); font: inherit; font-size: 1.05rem; transition: border-color .2s, box-shadow .2s; }
.input-row input::placeholder { color: #6f6784; }
.input-row input:focus { outline: none; border-color: var(--p3); box-shadow: 0 0 0 3px rgba(168, 85, 247, .25); }
.input-row input[aria-invalid="true"] { border-color: var(--bad); }
.hint { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
.error { margin: 6px 0 0; font-size: .85rem; color: var(--bad); min-height: 1.3em; }

.summary-list { margin: 0 0 12px; display: grid; gap: 2px; }
.summary-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.summary-list dt { color: var(--muted); font-size: .92rem; flex: none; }
.summary-list dd { margin: 0; text-align: right; font-weight: 500; word-break: break-word; }
.sum-amount dd { font-size: 1.6rem; font-family: var(--font-d); font-weight: 700; }
.amount-value { display: inline-block; background: linear-gradient(100deg, #c084fc, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.amount-value.swap { animation: swap .45s var(--ease); }
@keyframes swap { 0% { opacity: 0; transform: translateY(10px) scale(.92); } 100% { opacity: 1; transform: none; } }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge.warn { background: rgba(251, 191, 36, .14); color: var(--warn); border: 1px solid rgba(251, 191, 36, .3); }
.badge.demo { background: rgba(251, 191, 36, .14); color: var(--warn); border: 1px solid rgba(251, 191, 36, .3); }

.app-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; margin: 18px 0; }
.app-btn { display: grid; justify-items: center; gap: 8px; padding: 14px 8px; border-radius: 16px; background: rgba(18, 11, 32, .8); border: 1px solid var(--line); cursor: pointer; font-size: .82rem; font-weight: 500; transition: transform .25s var(--ease), border-color .25s, background .25s; }
.app-btn:hover { transform: translateY(-3px); border-color: rgba(192, 132, 252, .55); background: rgba(139, 92, 246, .14); }
.app-badge { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 700; font-family: var(--font-d); color: #fff; overflow: hidden; }
.app-badge img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.copy-row { display: flex; flex-wrap: wrap; gap: 10px; }
.notice { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; font-size: .88rem; background: rgba(139, 92, 246, .12); border: 1px solid var(--line); animation: swap .4s var(--ease); }
.notice.info { display: flex; gap: 10px; color: #d8cff0; }
.notice.info > span:first-child { font-size: 1.2rem; color: var(--p3); flex: none; margin-top: 1px; }
.notice.warn { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .3); }
.card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 26px 22px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(23, 16, 37, .8); transition: transform .35s var(--ease), border-color .3s; }
.step:hover { transform: translateY(-6px); border-color: rgba(192, 132, 252, .5); }
.step-num { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; font-family: var(--font-d); font-weight: 700; margin-bottom: 14px; background: linear-gradient(135deg, var(--p1), var(--p2)); box-shadow: 0 8px 20px rgba(139, 92, 246, .4); }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Leaderboard ---------- */
.empty { text-align: center; padding: 44px 24px; border: 1px dashed rgba(192, 132, 252, .3); border-radius: var(--radius); background: rgba(23, 16, 37, .5); }
.empty .ico { font-size: 2.4rem; color: var(--p3); margin-bottom: 8px; animation: float 4s ease-in-out infinite; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 auto; max-width: 440px; }
.lb-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: end; margin-bottom: 18px; }
.lb-card { position: relative; padding: 24px; border-radius: var(--radius); background: linear-gradient(160deg, #1f1534, #171025); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.lb-card:hover { transform: translateY(-6px); }
.lb-card .rank { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-family: var(--font-d); font-weight: 700; margin-bottom: 12px; color: #1a1124; }
.lb-card .name { font-weight: 600; font-size: 1.15rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.lb-card .total { font-family: var(--font-d); font-size: 1.6rem; font-weight: 700; }
.lb-card .msg { margin: 10px 0 0; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.lb-1 { order: 2; padding-block: 38px; border-color: rgba(244, 199, 106, .5); background: linear-gradient(160deg, #2b1f3a, #1a1226); box-shadow: 0 0 60px rgba(244, 199, 106, .12); }
.lb-1 .rank { background: linear-gradient(135deg, #f9e19a, #d9a441); width: 54px; height: 54px; }
.lb-1 .total { color: var(--gold); font-size: 2rem; }
.lb-2 { order: 1; border-color: rgba(207, 214, 228, .35); } .lb-2 .rank { background: linear-gradient(135deg, #f1f4fa, #a7b0c2); } .lb-2 .total { color: var(--silver); }
.lb-3 { order: 3; border-color: rgba(217, 154, 108, .4); } .lb-3 .rank { background: linear-gradient(135deg, #f0c09a, #b9773f); } .lb-3 .total { color: var(--bronze); }
.crown { position: absolute; top: 14px; right: 16px; font-size: 1.6rem; color: var(--gold); }
.lb-list { display: grid; gap: 10px; }
.lb-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 16px; background: rgba(23, 16, 37, .8); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.lb-row:hover { transform: translateX(6px); border-color: rgba(192, 132, 252, .5); }
.lb-row .rank { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: rgba(139, 92, 246, .18); font-weight: 600; }
.lb-row .name { font-weight: 600; overflow-wrap: anywhere; }
.lb-row .msg { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.lb-row .total { font-family: var(--font-d); font-weight: 700; }
.js .anim-in { animation: rise .7s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@media (max-width: 760px) { .lb-top { grid-template-columns: 1fr; } .lb-1, .lb-2, .lb-3 { order: 0; } .lb-1 { order: -1; } }
.data-note { text-align: center; margin-top: 18px; }

/* ---------- Recent + Wall ---------- */
.recent-list { display: grid; gap: 12px; }
.recent-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; background: rgba(23, 16, 37, .85); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.recent-item:hover { transform: translateY(-3px); border-color: rgba(192, 132, 252, .5); }
.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--p1), var(--p2)); }
.recent-item .who { font-weight: 600; overflow-wrap: anywhere; } .recent-item .meta { font-size: .82rem; color: var(--muted); } .recent-item .amt-out { font-family: var(--font-d); font-weight: 700; color: var(--p3); } .recent-item .says { font-size: .9rem; color: #d8cff0; margin-top: 2px; overflow-wrap: anywhere; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.wall-card { padding: 22px; border-radius: var(--radius); background: linear-gradient(160deg, rgba(29, 20, 48, .9), rgba(23, 16, 37, .9)); border: 1px solid var(--line); transition: transform .35s var(--ease), border-color .3s, box-shadow .3s; }
.wall-card:hover { transform: translateY(-6px) rotate(-.4deg); border-color: rgba(192, 132, 252, .5); box-shadow: 0 20px 40px rgba(139, 92, 246, .18); }
.wall-card blockquote { margin: 0 0 14px; font-size: 1rem; color: #ebe4fb; overflow-wrap: anywhere; }
.wall-card .by { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--muted); }
.wall-card .by strong { color: var(--text); }

/* ---------- Milestones ---------- */
.milestone-card { padding: clamp(24px, 4vw, 44px); }
.ms-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 36px; }
.ms-count { font-family: var(--font-d); font-size: 1.5rem; font-weight: 700; }
.ms-track { position: relative; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); margin: 0 22px 90px; }
.ms-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--p1), var(--p3)); box-shadow: 0 0 18px rgba(168, 85, 247, .6); transition: width 1.6s var(--ease); }
.ms-node { position: absolute; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; }
.ms-dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; background: var(--bg-2); border: 2px solid rgba(167, 160, 184, .35); color: var(--muted); transition: all .5s var(--ease); }
.ms-node.unlocked .ms-dot { background: linear-gradient(135deg, var(--p1), var(--p2)); border-color: transparent; color: #fff; box-shadow: 0 0 22px rgba(168, 85, 247, .6); }
.ms-node.next .ms-dot { border-color: var(--p3); color: var(--p3); animation: nextPulse 2s ease-in-out infinite; }
@keyframes nextPulse { 50% { box-shadow: 0 0 0 10px rgba(192, 132, 252, .12); } }
.ms-label { position: absolute; top: 54px; width: 90px; text-align: center; font-size: .78rem; line-height: 1.3; color: var(--muted); }
.ms-node.next .ms-label { color: var(--p3); font-weight: 600; }
.ms-node.unlocked .ms-label { color: var(--text); }
.ms-tag { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.ms-note { text-align: center; margin: 0; }
.ms-short { display: none; }
@media (max-width: 640px) {
  .ms-track { margin: 0 18px 56px; }
  .ms-dot { width: 34px; height: 34px; font-size: .95rem; }
  .ms-label { width: 44px; top: 42px; font-size: .78rem; font-weight: 600; }
  .ms-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* kept for screen readers */
  .ms-short { display: block; }
  .ms-tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Updates ---------- */
.update-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.update-card { padding: 22px; }
.update-card .tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: rgba(139, 92, 246, .2); color: var(--p3); margin-bottom: 12px; }
.update-card h3 { font-size: 1.08rem; } .update-card p { color: var(--muted); font-size: .92rem; } .update-card .date { font-size: .8rem; color: var(--muted); }
.example-flag { margin-bottom: 18px; text-align: center; }

/* ---------- About + Social ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.about-art { position: relative; display: grid; place-items: center; }
.about-art img { position: relative; width: min(100%, 340px); image-rendering: pixelated; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 20px 36px rgba(139, 92, 246, .4)); }
.about-glow { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(139, 92, 246, .4), transparent 70%); filter: blur(30px); animation: heroGlow 6s ease-in-out infinite alternate; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 24px; }
.project { padding: 18px; border-radius: 16px; background: rgba(23, 16, 37, .85); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.project:hover { transform: translateY(-4px); border-color: rgba(192, 132, 252, .5); }
.project .ico { font-size: 1.5rem; color: var(--p3); margin-bottom: 8px; }
.project h3 { font-size: 1rem; margin-bottom: 4px; } .project p { font-size: .86rem; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } .about-art { max-width: 260px; margin-inline: auto; } }

.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.social-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius); color: var(--text); background: linear-gradient(160deg, rgba(29, 20, 48, .9), rgba(23, 16, 37, .9)); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.social-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(240px 120px at 50% 0, rgba(168, 85, 247, .3), transparent 70%); opacity: 0; transition: opacity .35s; }
a.social-card:hover { transform: translateY(-6px); border-color: rgba(192, 132, 252, .6); box-shadow: 0 0 36px rgba(139, 92, 246, .3); }
a.social-card:hover::before { opacity: 1; }
.social-card .ico { position: relative; font-size: 2rem; color: var(--p3); }
.social-card strong { position: relative; font-family: var(--font-d); font-size: 1.15rem; }
.social-card span.h, .social-card .b { position: relative; font-size: .88rem; color: var(--muted); }
.social-card.soon { opacity: .6; border-style: dashed; }
.social-card .go { position: absolute; top: 18px; right: 18px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq-item { border-radius: 18px; border: 1px solid var(--line); background: rgba(23, 16, 37, .85); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.faq-item.open { border-color: rgba(192, 132, 252, .5); box-shadow: 0 0 30px rgba(139, 92, 246, .14); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: none; border: 0; text-align: left; font-weight: 600; font-size: 1.02rem; cursor: pointer; min-height: 56px; }
.faq-q::after { content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(139, 92, 246, .2); font-size: 1.3rem; line-height: 1; transition: transform .35s var(--ease), background .3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); background: var(--p1); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(9, 6, 17, .9); padding: 56px 0 24px; padding-bottom: calc(24px + 70px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.2fr; gap: 40px; }
.footer h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .12em; color: var(--p3); }
.foot-links { display: grid; gap: 8px; } .foot-links a { color: var(--muted); } .foot-links a:hover { color: var(--text); }
.foot-social { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.foot-social a { display: grid; place-items: center; width: 42px; height: 42px; font-size: 1.2rem; border-radius: 12px; border: 1px solid var(--line); color: var(--text); transition: transform .25s, background .25s, border-color .25s; }
.foot-social a:hover { background: rgba(139, 92, 246, .22); transform: translateY(-3px); border-color: rgba(192, 132, 252, .5); }
.foot-social span { opacity: .4; cursor: not-allowed; }
.foot-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .88rem; }
.foot-bottom p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Floating actions ---------- */
.fab-stack { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab { display: grid; place-items: center; width: 48px; height: 48px; font-size: 1.3rem; border-radius: 16px; border: 1px solid var(--line); background: rgba(23, 16, 37, .92); box-shadow: 0 10px 26px rgba(0, 0, 0, .4); cursor: pointer; transition: transform .25s var(--ease), background .25s, opacity .3s, visibility .3s; }
.fab:hover { background: rgba(139, 92, 246, .3); transform: translateY(-3px); }
.fab-chat { width: 56px; height: 56px; font-size: 1.5rem; border: 0; background: linear-gradient(135deg, var(--p1), var(--p2)); box-shadow: 0 12px 30px rgba(139, 92, 246, .5); }
.fab-top { opacity: 0; visibility: hidden; transform: translateY(10px); }
.fab-top.show { opacity: 1; visibility: visible; transform: none; }
.fab[aria-expanded="true"].fab-chat { transform: scale(.92); }
.audio-panel { width: 250px; padding: 16px; border-radius: 18px; background: #120b20; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); display: grid; gap: 12px; animation: swap .3s var(--ease); }
.audio-panel p { margin: 0; }
.switch { display: flex; align-items: center; gap: 10px; font-size: .92rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: relative; width: 40px; height: 22px; border-radius: 22px; background: rgba(255, 255, 255, .12); transition: background .25s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked + span { background: var(--p1); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--p3); outline-offset: 2px; }
.vol { display: grid; gap: 6px; font-size: .86rem; color: var(--muted); }
.vol input { width: 100%; accent-color: var(--p2); }

/* ---------- Chat ---------- */
.chat { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 74px); z-index: 95; width: min(390px, 100vw - 32px); height: min(580px, 100svh - 120px); display: flex; flex-direction: column; border-radius: 22px; background: #120b20; border: 1px solid rgba(192, 132, 252, .3); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 50px rgba(139, 92, 246, .2); overflow: hidden; transform-origin: bottom right; animation: chatIn .4s var(--ease); }
.chat.closing { animation: chatOut .25s ease forwards; }
@keyframes chatIn { from { opacity: 0; transform: translateY(20px) scale(.92); } }
@keyframes chatOut { to { opacity: 0; transform: translateY(14px) scale(.94); } }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(120deg, rgba(139, 92, 246, .3), rgba(168, 85, 247, .12)); border-bottom: 1px solid var(--line); }
.chat-head .icon-btn { width: 38px; height: 38px; border-radius: 12px; font-size: 1.1rem; }
.chat-title { flex: 1; display: grid; line-height: 1.25; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; overscroll-behavior: contain; }
.bubble { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: .93rem; animation: msgIn .4s var(--ease); overflow-wrap: anywhere; }
.bubble.bot { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble.user { align-self: flex-end; background: linear-gradient(135deg, var(--p1), var(--p2)); border-bottom-right-radius: 5px; }
.bubble p { margin: 0 0 .6em; } .bubble p:last-child { margin: 0; }
.bubble ul { list-style: disc; padding-left: 1.2em; margin: .4em 0; } .bubble li { margin-bottom: .25em; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--p3); animation: dots 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.chips { display: flex; flex-direction: column; gap: 8px; }
.chip { text-align: left; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(139, 92, 246, .08); cursor: pointer; font-size: .9rem; transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s; animation: msgIn .4s var(--ease) both; animation-delay: var(--d, 0ms); }
.chip:hover { background: rgba(139, 92, 246, .22); border-color: rgba(192, 132, 252, .6); transform: translateX(4px); box-shadow: 0 0 20px rgba(139, 92, 246, .2); }
.chip.picked { background: linear-gradient(135deg, var(--p1), var(--p2)); border-color: transparent; }
.chip.center { text-align: center; }
@media (max-width: 520px) { .chat { right: 8px; left: 8px; width: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px); height: min(560px, 100svh - 100px); } }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 100vw; max-height: 100vh; margin: auto; overflow: visible; }
.lightbox::backdrop { background: rgba(6, 3, 12, .82); backdrop-filter: blur(6px); animation: fade .3s ease; }
.lightbox[open] .lightbox-card { animation: zoomIn .4s var(--ease); }
.lightbox-card { position: relative; display: grid; justify-items: center; gap: 12px; padding: 18px; border-radius: 24px; background: #171025; border: 1px solid rgba(192, 132, 252, .4); box-shadow: 0 0 90px rgba(139, 92, 246, .4); }
.lightbox-card img { width: min(86vw, 460px, calc((100vh - 140px) * .86)); height: auto; border-radius: 16px; }
.lightbox-card p { margin: 0; }
.lightbox-close { position: absolute; top: -14px; right: -14px; background: var(--p1); border-color: transparent; }
@keyframes fade { from { opacity: 0; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.85); } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); z-index: 250; padding: 12px 20px; border-radius: 14px; background: #241a3a; border: 1px solid rgba(192, 132, 252, .5); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .3s, transform .35s var(--ease); max-width: calc(100vw - 32px); text-align: center; font-size: .92rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { border-color: rgba(251, 191, 36, .6); }

/* ---------- Custom cursor (only enabled by JS on mouse devices) ---------- */
.cursor { display: none; }
html.custom-cursor, html.custom-cursor * { cursor: none !important; }
html.custom-cursor .cursor { display: block; }
.cursor { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; }
.cursor-shape { position: absolute; left: 0; top: 0; pointer-events: none; transition: opacity .18s ease, transform .22s var(--ease); will-change: transform, opacity; }
.cursor-arrow { filter: drop-shadow(0 0 6px rgba(168, 85, 247, .8)); }
.cursor-hand { opacity: 0; transform: translate(-10px, -4px) scale(.7); filter: drop-shadow(0 0 8px rgba(192, 132, 252, .9)); }
.cursor-text { opacity: 0; transform: translate(-50%, -50%) scale(.7); filter: drop-shadow(0 0 6px rgba(168, 85, 247, .8)); }
.cursor-ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid rgba(192, 132, 252, .55); opacity: 0; transform: scale(.4); background: rgba(139, 92, 246, .12); }
.cursor[data-mode="link"] .cursor-arrow, .cursor[data-mode="text"] .cursor-arrow { opacity: 0; }
.cursor[data-mode="link"] .cursor-hand { opacity: 1; transform: translate(-10px, -4px) scale(1); }
.cursor[data-mode="link"] .cursor-ring { opacity: 1; transform: scale(1); }
.cursor[data-mode="text"] .cursor-text { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor[data-down="1"] .cursor-ring { transform: scale(.7); }
.cursor[data-hidden="1"] .cursor-shape { opacity: 0 !important; }
.trail-dot { position: fixed; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: radial-gradient(circle, #c084fc, transparent 70%); pointer-events: none; z-index: 9998; will-change: transform, opacity; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .loader { display: none; }
  .ms-fill { transition: none; }
}

/* ---------- Small-screen polish: keep floating controls out of the way ---------- */
.summary-list dd .small { display: block; margin-top: 2px; }
@media (max-width: 600px) {
  .fab-stack { gap: 8px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
  .fab { width: 42px; height: 42px; font-size: 1.15rem; border-radius: 14px; }
  .fab-chat { width: 50px; height: 50px; }
  .chat { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 64px); }
  .container { width: min(1180px, 100% - 32px); }
}

/* ---------- Admin preview page (admin-preview.html) ---------- */
.preview-banner { position: sticky; top: 0; z-index: 150; padding: 12px 20px; text-align: center; font-weight: 600; background: #3b2a06; color: var(--warn); border-bottom: 1px solid rgba(251, 191, 36, .5); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.admin-card h3 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.admin-card ul { list-style: disc; padding-left: 1.2em; color: var(--muted); font-size: .92rem; }
.admin-card .btn[disabled] { opacity: .5; cursor: not-allowed; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { padding: 18px; border-radius: 16px; border: 1px dashed var(--line); background: rgba(23, 16, 37, .6); }
.stat b { display: block; font-family: var(--font-d); font-size: 1.6rem; }
