/* ===== Sapphire design tokens ===== */
:root {
  --bg: #08090c;
  --bg-2: #0d0f14;
  --panel: #111318;
  --panel-2: #161922;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --grid: rgba(79, 140, 255, 0.07);
  --text: #e8eaf0;
  --muted: #9aa0ad;
  --dim: #6b7280;
  --accent: #4f8cff;        /* sapphire blue */
  --accent-2: #2f6df6;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --accent-glow: rgba(79, 140, 255, 0.35);
  --green: #22c55e;
  --amber: #f59e0b;
  --blue: #60a5fa;
  --red: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* keyboard focus ring: visible, never removed */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--accent-soft); color: #fff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-family: "Sora", "Inter", system-ui, sans-serif; }
p { margin: 0; }

/* the subtle grid that sits behind the whole site */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}

.container { width: min(1140px, 100% - 40px); margin-inline: auto; }
.section { padding-block: 96px; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.section-head h2 span { color: var(--accent); }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 17px; }

/* small label above headings */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.gem-dot { width: 8px; height: 8px; flex: none; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 10px var(--accent-glow); display: inline-block; }
.section-head h2 span { color: var(--accent); }


/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text); font-weight: 600; font-size: 14px;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.2); background: var(--panel-2); }
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 1px rgba(79,140,255,.3), 0 8px 24px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; }
.btn svg { width: 16px; height: 16px; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 9, 12, 0.75);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .12em; font-size: 13px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.brand-mark svg { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links a, .nav-links button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text); font-weight: 500; font-size: 14px;
  min-height: 40px;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.nav-links a:hover, .nav-links button:hover { background: rgba(255,255,255,.05); }
.nav-links a.active { background: rgba(255,255,255,.06); border-color: var(--line); }
.nav-links button.open { color: var(--accent); background: var(--accent-soft); border-color: rgba(79,140,255,.3); }
.nav-links button svg { width: 14px; height: 14px; transition: transform 180ms var(--ease-out); }
.nav-links button.open svg { transform: rotate(90deg); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
}
.icon-btn { transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.icon-btn:hover { background: rgba(255,255,255,.05); color: var(--text); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; }
.btn-signin { padding: 9px 18px; border-radius: 10px; font-size: 13px; color: var(--muted); }
.nav-toggle { display: none; }

/* products mega-menu (the dropdown under "Products") */
.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-38%);
  width: min(960px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px;
  display: grid; grid-template-columns: 380px 1fr; gap: 14px;
  transform-origin: 38% top;
  opacity: 0; visibility: hidden; transform: translateX(-38%) scale(0.97) translateY(-4px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
}
.mega.show { opacity: 1; visibility: visible; transform: translateX(-38%) scale(1) translateY(0); transition-delay: 0s; }
.mega-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feat-card {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
  min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
}
.feat-card .art {
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, transparent 55%, rgba(255,255,255,.06) 55.2%, rgba(255,255,255,.06) 70%, transparent 70.2%),
    conic-gradient(from 200deg at 72% 28%, #1c2f5e, #0f1a33 30%, #2c5fc4 52%, #0c1428 70%, #1c2f5e);
}
.feat-card .art::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; opacity: .6;
}
.feat-card .badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; gap: 6px; z-index: 1; }
.feat-card .badges .status { font-size: 11px; background: rgba(0,0,0,.45); padding: 3px 7px; border-radius: 999px; }
.badge-featured { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(79,140,255,.4); padding: 4px 8px; border-radius: 6px; }
.feat-card .body { position: relative; z-index: 1; }
.feat-card h4 { font-size: 15px; margin-bottom: 4px; }
.feat-card p { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.feat-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.feat-card .badges { overflow: hidden; }
.feat-card .badge-featured { white-space: nowrap; letter-spacing: .06em; padding: 4px 6px; }
.feat-card .badges .status { flex: none; }
.price-pill { font-size: 11px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line-2); padding: 6px 10px; border-radius: 8px; white-space: nowrap; flex: none; }
.price-pill b { color: var(--accent); font-size: 13px; }
.link-arrow { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mega-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.mini-card {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; padding: 10px; min-height: 60px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2);
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.mini-card:hover { border-color: rgba(79,140,255,.4); background: var(--panel-2); }
.mini-card:active, .feat-card:active { transform: scale(0.98); }
.feat-card { transition: transform 160ms var(--ease-out), border-color 150ms ease; }
.feat-card:hover { border-color: rgba(79,140,255,.4); }
.thumb {
  width: 40px; height: 40px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; letter-spacing: 0; color: var(--accent); white-space: nowrap; padding: 0 3px;
  background: linear-gradient(135deg, #1e3462, #0f1320); border: 1px solid var(--line-2);
}
.nav-links .mini-card { display: grid; }   /* beats the generic .nav-links a rule */
.mini-card .meta { min-width: 0; display: grid; gap: 3px; }
.mini-card .meta .status { justify-self: start; }
.mini-card .name { font-size: 13px; font-weight: 600; display: block; line-height: 1.2; }
.mini-card .price-pill { padding: 4px 8px; white-space: nowrap; justify-self: end; }
.mini-card .chev { color: var(--dim); display: grid; }
.mini-card .chev svg, .link-arrow svg { width: 14px; height: 14px; }
.mega-footer { grid-column: 1 / -1; padding: 4px 4px 0; font-size: 13px; color: var(--muted); }
.mega-footer a:hover { color: var(--text); }

/* status pill (dot + label) */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 6px currentColor; }
.status.green::before { background: var(--green); color: var(--green); }
.status.amber::before { background: var(--amber); color: var(--amber); }
.status.blue::before  { background: var(--blue);  color: var(--blue); }
.status.red::before   { background: var(--red);   color: var(--red); }

/* ===== Hero ===== */
.hero { position: relative; padding: 120px 0 72px; text-align: center; overflow: hidden; --mx: 50%; --my: 40%; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 420px at var(--mx) var(--my), rgba(79,140,255,.22), transparent 65%);
  transition: background-position 200ms ease;
}
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-size: clamp(44px, 7.5vw, 88px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
  max-width: 12ch; margin-inline: auto;
}
.hero-title span {
  /* starts and ends on the same colour so the repeating tile has no visible seam as it sweeps */
  background: linear-gradient(110deg, #ffffff 0%, #9cc1ff 30%, #4f8cff 50%, #9cc1ff 70%, #ffffff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: -200% 0; } }
.hero-text { color: var(--muted); font-size: 18px; max-width: 580px; margin: 22px auto 0; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--dim); }
.hero-gem {
  position: absolute; width: 150px; right: max(4vw, calc(50% - 620px)); top: 110px; z-index: 0;
  filter: drop-shadow(0 20px 40px rgba(79,140,255,.35));
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(4deg); } }

/* ===== Marquee of game names ===== */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 14px 0; background: rgba(255,255,255,.015); }
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { font-family: "Sora", sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.marquee-track .gem-dot { width: 6px; height: 6px; opacity: .6; box-shadow: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Stats strip ===== */
.stats { padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats-grid > div { text-align: center; padding: 18px 12px; border-left: 1px solid var(--line); }
.stats-grid > div:first-child { border-left: none; }
.stats-grid b { display: block; font-family: "Sora", sans-serif; font-size: clamp(28px, 3.5vw, 40px); font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.stats-grid b i { font-style: normal; font-size: .5em; color: var(--dim); }
.stats-grid span { font-size: 13px; color: var(--muted); }

/* ===== Feature bento grid (the "Why choose us" section) ===== */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento-card {
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  overflow: hidden; display: flex; flex-direction: column; min-height: 340px;
  transition: border-color 200ms ease, transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .bento-card:hover { border-color: rgba(79,140,255,.35); transform: translateY(-2px); }
}
.bento-card.wide { grid-column: span 2; }
.bento-visual { flex: 1; padding: 22px 22px 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.bento-caption { padding: 18px 22px 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.bento-caption b { color: var(--text); }

/* mock UI pieces used inside the bento cards */
.mock {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2);
  border-bottom: none; border-radius: 12px 12px 0 0; padding: 16px; font-size: 12px;
  box-shadow: 0 -10px 40px rgba(0,0,0,.35);
}
.mock-title { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 12px; }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 650ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mock-row { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); border-bottom: 1px dashed var(--line); }
.mock-row.total { color: var(--text); font-weight: 700; border-bottom: none; padding-top: 10px; }
.mock-row.total span:last-child { color: var(--accent); }
.mock-sidebar { display: flex; gap: 14px; }
.mock-sidebar .side { width: 90px; display: flex; flex-direction: column; gap: 4px; }
.mock-sidebar .side div { padding: 6px 8px; border-radius: 6px; color: var(--muted); }
.mock-sidebar .side div.on { background: var(--accent-soft); color: var(--accent); }
.mock-sidebar .main { flex: 1; }
.mock-sidebar .main h5 { margin: 0 0 2px; font-size: 13px; }
.mock-sidebar .main .sub { color: var(--muted); margin-bottom: 10px; }
.mock-stat { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 6px; }
.mock-stat span:last-child { color: var(--accent); font-weight: 600; }
.toggle-list { display: flex; flex-direction: column; gap: 6px; }
.toggle { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.toggle small { display: block; color: var(--dim); font-size: 11px; }
.switch { width: 30px; height: 16px; border-radius: 999px; background: #2a2f3b; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.switch.on { background: var(--accent); }
.switch.on::after { left: 16px; }
.mock-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.mock-tabs span { padding: 5px 10px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.mock-tabs span.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(79,140,255,.35); }
.terminal { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); line-height: 1.9; }
.terminal .ok { color: var(--green); }
.terminal .cursor { display: inline-block; width: 7px; height: 12px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.progress { height: 6px; border-radius: 999px; background: var(--panel); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; width: 70%; background: var(--accent); border-radius: inherit; animation: load 2.4s ease-in-out infinite; }
@keyframes load { 0% { width: 10%; } 60% { width: 85%; } 100% { width: 10%; } }
.spark { width: 100%; height: 90px; display: block; }
.spark-line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.6s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spark-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 6px; }
.shield-wrap { display: grid; place-items: center; width: 100%; padding-bottom: 20px; }
.shield { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid rgba(79,140,255,.4); box-shadow: 0 0 60px var(--accent-glow); }
.shield svg { width: 44px; height: 44px; color: var(--accent); }
.pay-logos { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pay-logos span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 12px; font-weight: 700; color: var(--muted); }

/* ===== Before / After ===== */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ba-card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 24px; }
.ba-card .tag { display: inline-block; width: auto; font-size: 11px; font-weight: 800; letter-spacing: .12em; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
  color: var(--dim); border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.ba-card.after .tag { color: var(--accent); border-color: rgba(79,140,255,.4); background: var(--accent-soft); }
.ba-card h3 { font-size: 22px; margin: 8px 0 16px; }
.ba-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 14px; }
.ba-card li { display: flex; gap: 10px; align-items: flex-start; }
.ba-card li svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.ba-card.before li svg { color: var(--red); }
.ba-card.after li svg { color: var(--green); }
.rank { margin-top: 20px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.rank .r-badge { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.before .r-badge { background: #2b2b2b; color: #9b9b9b; }
.after .r-badge { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(79,140,255,.4); }
.rank small { display: block; color: var(--dim); font-size: 11px; }

/* ===== CTA band ===== */
.cta-band { border: 1px solid rgba(79,140,255,.35); border-radius: 20px; padding: 48px; text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(79,140,255,.18), transparent 60%), var(--panel); }
.cta-band h2 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; }
.cta-band p { color: var(--muted); margin: 10px auto 26px; max-width: 520px; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 40px; background: rgba(0,0,0,.25); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 300px; }
.footer h5 { margin: 0 0 14px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer li a { color: var(--muted); font-size: 14px; display: inline-block; padding: 2px 0; transition: color 150ms ease; }
.footer li a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* ===== Page header (products / status / changelog) ===== */
.page-head { padding: 80px 0 48px; text-align: center; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 900; }
.page-head p { color: var(--muted); font-size: 17px; max-width: 620px; margin: 14px auto 0; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); padding-top: 18px; }
.crumbs a:hover { color: var(--text); }
.crumbs .cur { color: var(--muted); }

/* ===== Product cards (grid used on Products & Status pages) ===== */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card {
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 200ms ease, transform 200ms var(--ease-out);
  animation: rise 360ms var(--ease-out) both;
}
@media (hover: hover) and (pointer: fine) {
  .product-card:hover { border-color: rgba(79,140,255,.4); transform: translateY(-3px); }
}
.product-card:active { transform: scale(0.98); }
/* stagger cards in when a grid renders */
.product-card:nth-child(2) { animation-delay: 40ms; } .product-card:nth-child(3) { animation-delay: 80ms; }
.product-card:nth-child(4) { animation-delay: 120ms; } .product-card:nth-child(5) { animation-delay: 160ms; }
.product-card:nth-child(6) { animation-delay: 200ms; } .product-card:nth-child(7) { animation-delay: 240ms; }
.product-card:nth-child(8) { animation-delay: 280ms; } .product-card:nth-child(9) { animation-delay: 320ms; }
.product-card:nth-child(n+10) { animation-delay: 360ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.product-card .art {
  height: 150px; position: relative;
  background:
    linear-gradient(115deg, transparent 55%, rgba(255,255,255,.06) 55.2%, rgba(255,255,255,.06) 70%, transparent 70.2%),
    linear-gradient(245deg, transparent 60%, rgba(0,0,0,.35) 60.2%),
    conic-gradient(from 200deg at 72% 28%, #1c2f5e, #0f1a33 30%, #2c5fc4 52%, #0c1428 70%, #1c2f5e);
}
.product-card .art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; opacity: .5; }
.product-card .art .short { position: absolute; left: 18px; bottom: 14px; font-family: "Sora", sans-serif; font-size: 30px; font-weight: 800; letter-spacing: .04em; color: rgba(255,255,255,.9); z-index: 1; }
.product-card .art .status { position: absolute; top: 12px; right: 12px; z-index: 1; background: rgba(0,0,0,.5); padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-2); }
.product-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { font-size: 18px; }
.product-card .desc { color: var(--muted); font-size: 14px; flex: 1; }
.product-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.product-card .from { font-size: 12px; color: var(--dim); }
.product-card .from b { display: block; font-size: 20px; color: var(--accent); }

/* status filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.chip { min-height: 40px; padding: 8px 14px; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out); border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.chip b { background: rgba(255,255,255,.08); padding: 1px 7px; border-radius: 999px; font-size: 11px; }
.chip:active { transform: scale(0.96); }
.chip.on { color: var(--accent); border-color: rgba(79,140,255,.45); background: var(--accent-soft); }

/* ===== Product detail page ===== */
.art .art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.art.has-img::after { opacity: .2; }
.product-card .art.has-img .short { display: none; }   /* the artwork carries the name */
.pd-art img { object-position: 50% 50%; }
.feat-card .art .art-img { object-position: 100% 50%; }   /* tall crop: show the shapes side, not the name (the card has its own) */
.product-card .art.has-img::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55)); }
.pd-art { position: relative; width: 100%; aspect-ratio: 16 / 6; margin-top: 48px; border-radius: 16px; overflow: hidden;
  border: 1px dashed var(--line-2); background: var(--bg-2); display: grid; place-items: center; }
.pd-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-art.has-img { border-style: solid; }
.pd-art.has-img .pd-art-empty { display: none; }
.pd-art-empty { color: var(--dim); font-size: 13px; padding: 0 16px; text-align: center; }
.pd-art-empty code { color: var(--muted); }
.pd-hero { padding: 40px 0 40px; text-align: center; }
.pd-hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 900; }
.pd-hero .lead { color: var(--muted); font-size: 18px; margin-top: 12px; }
.pd-hero .from { margin-top: 26px; color: var(--muted); font-size: 14px; }
.pd-hero .from b { color: var(--accent); font-size: 18px; }
.tiers { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.tier {
  min-width: 120px; padding: 14px 18px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--text);
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out);
}
.tier:active { transform: scale(0.97); }
.tier small { font-size: 12px; color: var(--muted); }
.tier b { font-size: 22px; }
.tier:hover { border-color: rgba(79,140,255,.45); }
.tier.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px var(--accent-glow); }
.tier.on b { color: var(--accent); }
.pd-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 4px; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); }
.tabs button { padding: 10px 22px; min-height: 44px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out); }
.tabs button:active { transform: scale(0.96); }
.tabs button.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(79,140,255,.35); }
.tab-wrap { text-align: center; margin: 40px 0 36px; }
@media (max-width: 560px) {   /* phones: tabs become a 2x2 grid instead of overflowing the screen */
  .tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tabs button { padding: 10px 8px; font-size: 13px; }
}
.tab-panel:not(.on) { display: none !important; }
.tab-panel.on { display: block; animation: fade 200ms var(--ease-out); }
.tab-panel.docs.on { display: grid; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 22px;
  display: flex; flex-direction: column; gap: 10px; min-height: 200px;
}
.feature .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(79,140,255,.3); }
.feature .ico svg { width: 18px; height: 18px; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--muted); font-size: 14px; flex: 1; }
.feature .more { align-self: flex-start; background: none; border: none; color: var(--accent); font-weight: 600; font-size: 13px; padding: 8px 0; min-height: 40px; }
.feature ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: none; }
.feature.open ul { display: block; }
.feature.open p { display: none; }
.empty { text-align: center; color: var(--dim); padding: 40px; border: 1px dashed var(--line-2); border-radius: 16px; }
.reqs { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 28px; margin-top: 48px; }
.reqs h2 { font-size: 22px; }
.reqs .sub { color: var(--dim); font-size: 13px; margin: 4px 0 18px; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.req-list li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.req-list li b { color: var(--text); font-weight: 600; }
.req-list li span { color: var(--muted); }
@media (max-width: 760px) { .req-list { grid-template-columns: 1fr; } .req-list li { grid-template-columns: 1fr; gap: 2px; } }
.about { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 28px; margin-top: 48px; }
.about h2 { font-size: 22px; }
.about .sub { color: var(--dim); font-size: 13px; margin: 4px 0 14px; }
.about p { color: var(--muted); font-size: 15px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.docs .step { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 22px; }
.docs .n { font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: .1em; }
.docs h3 { font-size: 16px; margin: 8px 0 6px; }
.docs p { color: var(--muted); font-size: 14px; }

/* ===== Changelog ===== */
.log-filters { display: flex; gap: 10px; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }
.log-filters select { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; }
.log { display: flex; flex-direction: column; gap: 12px; max-width: 820px; margin-inline: auto; }
.log-item { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 20px 22px; }
.log-item h3 { font-size: 16px; }
.log-item p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.log-item .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.tag.Update { color: var(--green); border-color: rgba(34,197,94,.35); }
.tag.Fix { color: var(--amber); border-color: rgba(245,158,11,.35); }
.tag[class*="Status"] { color: var(--accent); border-color: rgba(79,140,255,.4); }
.log-item .date { margin-left: auto; font-size: 12px; color: var(--dim); }

/* ===== Stock labels ===== */
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--green); }
.stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.stock.low { color: var(--amber); }
.stock.out { color: var(--dim); }
.tier em { font-style: normal; font-size: 11px; color: var(--green); margin-top: 2px; }
.tier.sold-out em { color: var(--dim); }
.tier.sold-out b { color: var(--muted); }
.btn.disabled { opacity: .55; pointer-events: none; }
.key-reveal { max-width: 560px; margin: 24px auto 0; padding: 20px 22px; border-radius: 14px; border: 1px solid rgba(34,197,94,.35); background: rgba(34,197,94,.07); text-align: center; }
.key-reveal.error { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.07); }
.key-reveal-title { font-weight: 700; margin-bottom: 12px; }
.key-reveal p { color: var(--muted); font-size: 14px; margin-top: 12px; }
.key-reveal a { color: var(--accent); }
.key-chip.big { font-size: 18px; padding: 12px 18px; }
.dash-hint { color: var(--muted); font-size: 14px; margin: -8px 0 14px; }
.my-keys { display: flex; flex-direction: column; gap: 8px; }
.my-key { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); flex-wrap: wrap; }
.my-key-meta { display: flex; flex-direction: column; }
.my-key-meta span { font-size: 12px; color: var(--muted); }

/* ===== Purchased content (instructions + downloads) ===== */
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn.ok { color: var(--green); border-color: rgba(34,197,94,.35); }
.btn.ok:hover { background: rgba(34,197,94,.1); }
.btn.ok svg { width: 14px; height: 14px; }
.my-key { flex-direction: column; align-items: stretch; }
.my-key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.my-key-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.my-key-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.purchased { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(34,197,94,.25); text-align: left; }
.md { font-size: 14px; color: var(--muted); line-height: 1.65; }
.md h3, .md h4, .md h5 { color: var(--text); margin: 14px 0 6px; font-size: 16px; }
.md h3:first-child, .md h4:first-child { margin-top: 0; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.ts { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.tab-panel.help .ts { margin-top: 0; padding-top: 0; border-top: 0; max-width: 820px; margin-left: auto; margin-right: auto; }
.tab-panel.help .ts details { background: var(--panel); }
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ts-head h4 { margin: 0; font-size: 16px; color: var(--text); }
.ts-search { flex: 1; min-width: 200px; max-width: 320px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13px; }
.ts-search:focus { outline: none; border-color: var(--accent); }
.ts details { border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 10px 14px; margin-bottom: 8px; }
.ts summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text); }
.ts details .md { margin-top: 8px; }
.md code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; color: var(--text); }
.md a { color: var(--accent); text-decoration: underline; }
.md b { color: var(--text); }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.downloads .btn { border-radius: 10px; }
.downloads .btn .dim { font-size: 12px; }

/* ===== Checkout: payment method chooser, order page, orders lists ===== */
.pay-methods { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.crypto-note { max-width: 560px; margin: 16px auto 0; padding: 18px 20px; text-align: left; border-radius: 14px;
  border: 1px solid rgba(245,158,11,.45); background: rgba(245,158,11,.08); }
.crypto-note > b { display: block; color: #f59e0b; font-size: 15px; margin-bottom: 8px; }
.crypto-note p { color: var(--muted); font-size: 14px; margin: 6px 0; }
.crypto-note p b { color: var(--text); }
.crypto-note-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pay-method {
  display: flex; align-items: center; gap: 12px; min-width: 220px; padding: 12px 16px; text-align: left;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text);
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.pay-method:hover { border-color: rgba(79,140,255,.5); background: var(--panel-2); }
.pay-method:active { transform: scale(0.98); }
.pay-method svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.pay-method small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.order-page { display: grid; place-items: center; padding: 48px 0; }
.order-card { width: min(640px, 100%); text-align: center; padding: 36px 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.order-card h1 { font-size: 28px; margin: 14px 0 8px; }
.order-card .sub { color: var(--muted); font-size: 15px; margin-top: 10px; }
.order-card .sub a { color: var(--accent); }
.order-card .key-chip.big { margin-top: 18px; }
.order-card .purchased { text-align: left; }
.order-spinner .spinner { width: 28px; height: 28px; border-width: 3px; margin: 0 auto; }
.order-ok { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(34,197,94,.12); color: var(--green); font-size: 26px; font-weight: 800; border: 1px solid rgba(34,197,94,.4); }
.my-orders { display: flex; flex-direction: column; gap: 6px; }
.my-order { display: grid; grid-template-columns: 110px 1fr auto auto auto; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 14px; transition: border-color 150ms ease; }
.my-order:hover { border-color: rgba(79,140,255,.4); }
.admin-panel.waiting { border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.07); font-size: 14px; color: var(--muted); }
.admin-panel.waiting b { color: var(--amber); }
@media (max-width: 720px) { .my-order { grid-template-columns: 1fr 1fr; } }

/* ===== Legal pages + small admin helpers ===== */
.legal { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-top: 32px; align-items: start; }
.legal-body { padding: 28px 32px; }
.legal-body h3 { font-size: 26px; }
.legal-body i { color: var(--dim); }
.admin-test { display: block; margin: 12px auto 0; background: none; border: none; color: var(--dim); font-size: 12px; text-decoration: underline; }
.admin-test:hover { color: var(--accent); }
@media (max-width: 720px) { .legal { grid-template-columns: 1fr; } .legal-nav { flex-direction: row; flex-wrap: wrap; } }

/* ===== Out of stock panel ===== */
.oos { max-width: 560px; margin: 20px auto 0; padding: 20px 22px; border-radius: 14px; border: 1px solid rgba(245,158,11,.4); background: rgba(245,158,11,.07); text-align: center; }
.oos-title { font-weight: 700; color: var(--amber); margin-bottom: 8px; }
.oos p { color: var(--muted); font-size: 14px; }
.oos-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.oos-note { margin-top: 12px; font-size: 13px; color: var(--green); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

/* ===== Reviews ===== */
.stars { color: var(--amber); letter-spacing: 1px; white-space: nowrap; }
.stars.big { font-size: 22px; }
.review-summary { margin-top: 14px; color: var(--muted); font-size: 15px; }
.review-summary b { color: var(--text); font-size: 18px; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.review { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.review-head b { font-size: 14px; }
.review-meta { font-size: 12px; color: var(--dim); }
.review p { color: var(--muted); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.tab-count { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.review-form-wrap { max-width: 640px; margin: 0 auto 28px; padding: 20px 22px; border: 1px solid rgba(79,140,255,.35); border-radius: 14px; background: var(--panel); }
.review-form-wrap h3 { font-size: 17px; }
.review-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.star-input { display: flex; gap: 4px; }
.star-input button { font-size: 28px; line-height: 1; background: none; border: none; color: #3a3f4c; padding: 2px; transition: color 120ms ease, transform 120ms var(--ease-out); }
.star-input button.on { color: var(--amber); }
.star-input button:hover { transform: scale(1.15); }
.review-form textarea { resize: vertical; }
.review-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.review-note { margin-top: 10px; font-size: 14px; }
.review-note.good { color: var(--green); }
.review-note.bad { color: var(--red); }
.review-queue { display: flex; flex-direction: column; gap: 10px; }
.review-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.review-actions { display: flex; gap: 6px; align-items: center; }
@media (max-width: 960px) { .review-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .review-grid { grid-template-columns: 1fr; } .review-row { grid-template-columns: 1fr; } }

/* ===== Signed-in user menu ===== */
.user-menu { position: relative; }
.user-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; min-height: 40px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-weight: 600; font-size: 13px;
  transition: background-color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out);
}
.user-btn:hover { background: var(--panel-2); }
.user-btn:active { transform: scale(0.97); }
.user-btn svg { width: 14px; height: 14px; color: var(--dim); transform: rotate(90deg); }
.avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(79,140,255,.5); box-shadow: 0 0 24px var(--accent-glow); }
.user-drop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; z-index: 60;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transform-origin: top right;
  opacity: 0; visibility: hidden; transform: scale(0.97) translateY(-4px);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 0s linear 160ms;
}
.user-drop.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.user-drop a, .user-drop button {
  text-align: left; padding: 10px 12px; border-radius: 8px; border: none; background: none; color: var(--text); font-size: 14px; font-weight: 500;
  transition: background-color 150ms ease;
}
.user-drop a:hover, .user-drop button:hover { background: rgba(255,255,255,.06); }
.user-drop button { color: var(--red); }

/* ===== Dashboard ===== */
.dash { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-top: 32px; }
.dash-side { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); align-self: start; }
.dash-side a { padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 500; transition: background-color 150ms ease, color 150ms ease; }
.dash-side a:hover { background: rgba(255,255,255,.05); color: var(--text); }
.dash-side a.on { background: var(--accent-soft); color: var(--accent); }
.dash-main { display: flex; flex-direction: column; gap: 16px; }
.dash-welcome { display: flex; align-items: center; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.dash-welcome h1 { font-size: 26px; }
.dash-welcome .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dash-stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.dash-stat span { font-size: 13px; color: var(--muted); }
.dash-stat b { display: block; font-family: "Sora", sans-serif; font-size: 26px; margin-top: 4px; }
.dash-panel { padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.dash-panel h2 { font-size: 18px; margin-bottom: 14px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-card.wide { grid-column: span 2; }
  .product-grid, .feature-grid, .docs { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid > div:nth-child(3) { border-left: none; }
  .hero-gem { width: 110px; top: 80px; right: 4vw; opacity: .8; }
  .nav-links > li { position: static; }
  .mega { left: 0; right: 0; width: auto; transform: scale(0.98) translateY(-4px); transform-origin: 50% top; grid-template-columns: 1fr; }
  .mega.show { transform: none; }
  .mega-featured { display: none; }
}
@media (max-width: 720px) {
  .nav-toggle { display: grid; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: 12px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
  }
  .nav-links.show { display: flex; }
  .nav-links > li { position: static; }
  .mega { position: static; display: none; transform: none; width: 100%; margin-top: 8px; padding: 10px; }
  .mega-list { grid-template-columns: 1fr; }
  .mini-card .price-pill { white-space: nowrap; }
  .mega.show { display: grid; transform: none; }
  .btn-signin span { display: none; }
  .bento, .ba-grid, .product-grid, .feature-grid, .docs { grid-template-columns: 1fr; }
  .bento-card.wide { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { flex-direction: row; flex-wrap: wrap; }
  .dash-stats { grid-template-columns: 1fr; }
  .user-btn span { display: none; }
  .section { padding-block: 64px; }
  .hero { padding-top: 72px; }
  .hero-gem { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats-grid > div { padding: 12px 6px; }
  .cta-band { padding: 32px 20px; }
}

/* ===== Reduced motion: keep fades, drop movement & looping motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .spinner, .progress i, .cursor, .marquee-track, .hero-gem, .hero-title span { animation: none !important; }
  .product-card, .tab-panel.on { animation: none !important; opacity: 1; transform: none; }
}

/* ===== Admin panel ===== */
.admin { display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin-top: 24px; align-items: start; }
.admin-side { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 10px; position: sticky; top: 80px; }
.admin-side-title { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 8px 12px 10px; }
.game-row {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--text);
  transition: background-color 150ms ease, border-color 150ms ease;
}
.game-row:hover { background: rgba(255,255,255,.05); }
.game-row.on { background: var(--accent-soft); border-color: rgba(79,140,255,.3); }
.game-row .name { font-size: 14px; font-weight: 600; }
.game-row .counts { font-size: 12px; color: var(--muted); }
.game-row.on .counts b { color: var(--accent); }
.admin-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.admin-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 20px 22px; }
.admin-panel h2 { font-size: 18px; }
.coupon { margin-top: 14px; text-align: center; }
.coupon-toggle { background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline dotted; padding: 6px; }
.coupon-toggle:hover { color: var(--text); }
.coupon-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.coupon-form .input { width: 160px; text-transform: uppercase; padding: 9px 12px; }
.coupon-msg { font-size: 13px; }
.coupon-msg.good { color: var(--green); } .coupon-msg.bad { color: var(--red); }
#buyBtn s { opacity: .55; font-weight: 500; margin-right: 4px; }
.exp { font-style: normal; } .exp.soon { color: var(--amber); font-weight: 600; } .exp.over { color: var(--dim); }
tr.dim { opacity: .5; }
.stat-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cut-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.cut-field .input { width: 64px; padding: 6px 8px; text-align: right; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 14px; }
.stat { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 12px 14px; min-width: 0; }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.stat-value { font-family: "Sora", sans-serif; font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.stat-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.stat-list { display: grid; gap: 4px; font-size: 13px; }
.stat-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.stat-row.dim { color: var(--dim); border: 0; }
.stat-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.stat-bars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .8; min-height: 2px; }
.stat-bars i:hover { opacity: 1; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } .stat-cols { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }

.input {
  font: inherit; font-size: 14px; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 42px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.sm { padding: 6px 9px; min-height: 34px; font-size: 13px; width: 100%; }
.input::placeholder { color: var(--dim); }
select.input { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0ad' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.dim { color: var(--dim); font-size: 13px; white-space: nowrap; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); }
.seg button { padding: 7px 12px; border-radius: 8px; border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 600; transition: background-color 150ms ease, color 150ms ease; }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.seg button b { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 11px; }

.add-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.field.grow { flex: 1; min-width: 200px; }
.field.full { flex-basis: 100%; }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.6; }
.field label, .lookup label { font-size: 12px; font-weight: 600; color: var(--muted); }
.add-form .btn { min-height: 42px; border-radius: 10px; }
.add-result { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid rgba(34,197,94,.3); background: rgba(34,197,94,.06); }
.add-result-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; margin-bottom: 10px; }
.add-result-head .btn { padding: 7px 14px; font-size: 13px; }
.key-list { display: flex; flex-wrap: wrap; gap: 6px; }
.key-chip {
  font-size: 13px; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  cursor: copy; transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out); white-space: nowrap;
}
.key-chip:hover { border-color: rgba(79,140,255,.5); background: var(--panel-2); }
.key-chip:active { transform: scale(0.97); }

.lookup label { display: block; margin-bottom: 8px; }
.lookup-row { display: flex; gap: 8px; }
.lookup-row .input { flex: 1; }
.lookup-row .btn { border-radius: 10px; }
.lookup-result { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.lookup-result.good { border: 1px solid rgba(34,197,94,.35); background: rgba(34,197,94,.07); }
.lookup-result.neutral { border: 1px solid rgba(79,140,255,.35); background: var(--accent-soft); }
.lookup-result.bad { border: 1px solid rgba(239,68,68,.35); background: rgba(239,68,68,.07); }
.lookup-result .btn { padding: 6px 12px; font-size: 13px; margin-left: auto; }

.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.keys { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
table.keys th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.keys td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.keys tr:last-child td { border-bottom: none; }
table.keys tr.row-revoked td:first-child .key-chip, table.keys tr.row-redeemed td:first-child .key-chip { opacity: .6; text-decoration: line-through; }
table.keys tr.row-redeemed td:first-child .key-chip { text-decoration: none; }
.status-select { width: auto; min-width: 118px; font-weight: 600; }
.status-select.green { color: var(--green); } .status-select.amber { color: var(--amber); } .status-select.blue { color: var(--blue); } .status-select.red { color: var(--red); }
.icon-btn.danger { width: 34px; height: 34px; color: var(--dim); }
.icon-btn.danger:hover { color: var(--red); background: rgba(239,68,68,.1); }
.icon-btn.danger svg { width: 16px; height: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px); z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition-delay: 0s; }
.user-drop .admin-link { color: var(--accent); }

@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  #gameList { display: flex; flex-wrap: wrap; gap: 4px; }
  .game-row { width: auto; }
}
