/* Yakato Topup — storefront theme (2026 refresh) */

:root {
  --bg: #04060f;
  --bg-soft: #060b1c;
  --panel: rgba(12, 20, 42, 0.72);
  --panel-solid: #0a1024;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f3f5ff;
  --muted: #9aa3c7;
  --dim: #6f7899;
  --violet: #2f6bff;
  --violet-2: #5b8cff;
  --pink: #38d6ff;
  --cyan: #4de2ff;
  --gold: #ffc94d;
  --gold-2: #f59e0b;
  --green: #3ee6a4;
  --red: #ff6b81;
  --radius: 22px;
  --font: "Kantumruy Pro", "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Sora", "Kantumruy Pro", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; }
::selection { background: rgba(47, 107, 255, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.muted { color: var(--muted); }
.fine { color: var(--dim); font-size: 0.7rem; line-height: 1.7; margin: 0; }
.center { text-align: center; }

/* ------------------------------------------------------------------ */
/* Background                                                          */
/* ------------------------------------------------------------------ */

.bg-video {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: #04060f;
  transform: translateZ(0);
}
.bg-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}
.bg-video-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(4, 6, 15, 0.3), rgba(4, 6, 15, 0.3)),
    linear-gradient(90deg, rgba(4, 6, 15, 0.8) 0%, rgba(4, 6, 15, 0.46) 46%, rgba(4, 6, 15, 0.3) 100%),
    linear-gradient(180deg, rgba(4, 6, 15, 0.22) 0%, rgba(4, 6, 15, 0.55) 70%, rgba(4, 6, 15, 0.78) 100%);
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(4, 8, 22, 0.9);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled {
  background: rgba(4, 8, 22, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px -20px rgba(0, 0, 0, 0.8);
}
.header-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  flex-shrink: 0;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
  mix-blend-mode: screen;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1; gap: 4px; }
.brand-copy strong { font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-copy small { font-size: 0.52rem; letter-spacing: 0.22em; color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a,
.nav-link {
  padding: 9px 11px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover,
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-signin { display: none; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.lang-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 11px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.lang-btn:hover { color: var(--text); border-color: var(--line-strong); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.user-chip:hover { border-color: var(--line-strong); }
.user-chip .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  font-size: 0.78rem;
  font-weight: 700;
}
.user-chip .user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
}
.user-chip svg { width: 15px; height: 15px; color: var(--muted); }

.menu-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.menu-btn span { width: 16px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 11px 19px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #2f6bff 0%, #3b82f6 45%, #38d6ff 100%);
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(47, 107, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -16px rgba(47, 107, 255, 1); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.btn-sm { padding: 8px 13px; font-size: 0.76rem; border-radius: 10px; }
.btn-lg { padding: 15px 25px; font-size: 0.94rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-tiny { padding: 6px 11px; font-size: 0.68rem; border-radius: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--text); }
.btn-tiny:hover { border-color: var(--line-strong); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 40px;
  padding: 72px 0 60px;
  min-height: 640px;
}
.hero-copy { position: relative; z-index: 2; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
html[lang="km"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 0.8rem; }
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(62, 230, 164, 0.12), 0 0 14px var(--green);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.8rem, 5.4vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  margin: 0 0 20px;
  font-weight: 800;
}
html[lang="km"] .hero h1 { font-size: clamp(2.25rem, 4.6vw, 3.9rem); line-height: 1.55; letter-spacing: 0; }
.grad {
  background: linear-gradient(100deg, #93c5fd 0%, #67e8f9 45%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
  max-width: 580px;
  margin: 0 0 30px;
}
html[lang="en"] .lede { line-height: 1.75; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; padding: 0; margin: 0; }
.hero-trust li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.78rem; }
.trust-icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.trust-icon svg { width: 14px; height: 14px; }

.hero-visual { position: relative; height: 560px; display: grid; place-items: center; }
.hero-halo {
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.28), rgba(56, 214, 255, 0.08) 45%, transparent 70%);
}
.orbit { position: absolute; border: 1px dashed rgba(255, 255, 255, 0.14); border-radius: 50%; }
.orbit-a { width: 410px; height: 410px; }
.orbit-b { width: 530px; height: 530px; border-color: rgba(255, 255, 255, 0.07); }

/* Only the small orbiters animate. Rotating the big rings was expensive,
   so the rings stay static and the dots/coins travel around them. */
.orbit-spin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  animation: spin 26s linear infinite;
  will-change: transform;
}
.orbit-spin-b { animation-duration: 40s; animation-direction: reverse; }
.orbit-spin-c { animation-duration: 34s; }
.orbit-spin-d { animation-duration: 48s; animation-direction: reverse; }

.orbit-orb {
  position: absolute;
  left: -205px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan), 0 0 38px rgba(95, 227, 255, 0.45);
}
.orbit-orb-alt {
  left: -265px;
  top: -5px;
  background: var(--pink);
  box-shadow: 0 0 18px var(--pink), 0 0 38px rgba(56, 214, 255, 0.45);
}

.orbit-coin {
  position: absolute;
  left: -15px;
  top: -205px;
  width: 30px;
  height: 30px;
  animation: spin-reverse 34s linear infinite;
  transform-origin: center;
  will-change: transform;
}
.orbit-coin-alt {
  left: -12px;
  top: -265px;
  width: 24px;
  height: 24px;
  animation: spin 48s linear infinite;
}
.orbit-coin img { width: 100%; height: 100%; display: block; }

.coin-wrap { position: relative; z-index: 2; animation: floatY 7s ease-in-out infinite; will-change: transform; }
.coin {
  width: 270px; height: 270px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 30px 55px -18px rgba(245, 158, 11, 0.45);
}
.coin-img { width: 100%; height: 100%; display: block; }
.coin::after {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 77, 0.32), transparent 66%);
  animation: pulse 4.5s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 15px;
  background: rgba(12, 15, 29, 0.88);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  animation: floatY 6s ease-in-out infinite;
  will-change: transform;
}
.float-card strong { display: block; font-size: 0.76rem; }
.float-card small { display: block; color: var(--muted); font-size: 0.63rem; margin-top: 2px; }
.fc-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(47, 107, 255, 0.16);
  color: var(--violet-2);
}
.fc-icon svg { width: 17px; height: 17px; }
.float-qr { top: 12%; left: -2%; animation-delay: -1s; }
.float-fast { top: 24%; right: -2%; animation-delay: -3s; }
.float-fast .fc-icon { background: rgba(255, 201, 77, 0.14); color: var(--gold); }
.float-support { bottom: 8%; left: 3%; animation-delay: -4.5s; }
.float-support .fc-icon { background: rgba(95, 227, 255, 0.12); color: var(--cyan); }

.spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.spark-a { top: 16%; right: 26%; animation: pulse 3s infinite; }
.spark-b { bottom: 20%; right: 18%; width: 4px; height: 4px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 4s infinite; }
.spark-c { top: 48%; left: 4%; width: 3px; height: 3px; background: var(--pink); box-shadow: 0 0 10px var(--pink); animation: pulse 3.5s infinite; }

/* ------------------------------------------------------------------ */
/* Ticker                                                              */
/* ------------------------------------------------------------------ */

.ticker {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ticker 120s linear infinite;
  will-change: transform;
}
/* Trailing margin (not flex gap) keeps each copy's width exact, so
   translateX(-50%) lands perfectly on the seam with no jump. */
.ticker-track > * { margin-right: 34px; }
.ticker-track span {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--dim);
  font-weight: 700;
}
.ticker-track i { color: var(--violet); font-style: normal; font-size: 0.58rem; }

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.section { padding: 100px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}
.section-head.center { display: block; text-align: center; max-width: 720px; margin-inline: auto; }
.section-head.center .section-sub { margin-inline: auto; }
.section h2 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
}
html[lang="km"] .section h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.5; letter-spacing: 0; }
.section-sub { color: var(--muted); max-width: 620px; margin: 0; line-height: 1.8; font-size: 0.9rem; }

.rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.rate-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ------------------------------------------------------------------ */
/* Packages                                                            */
/* ------------------------------------------------------------------ */

.package-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pack-card {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.pack-card::after {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  right: -80px; top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.pack-card:hover { transform: translateY(-5px); border-color: rgba(47, 107, 255, 0.55); box-shadow: 0 24px 50px -26px rgba(47, 107, 255, 0.8); }
.pack-card:hover::after { opacity: 1; }
.pack-card.popular {
  border-color: rgba(56, 214, 255, 0.4);
  background: linear-gradient(160deg, rgba(56, 214, 255, 0.12), rgba(47, 107, 255, 0.06) 45%, rgba(255, 255, 255, 0.02));
  box-shadow: 0 24px 50px -30px rgba(56, 214, 255, 0.5);
}
.pack-card.popular:hover { border-color: rgba(56, 214, 255, 0.75); }
.pack-tag {
  position: absolute;
  top: 14px; right: 14px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  box-shadow: 0 6px 16px -8px rgba(56, 214, 255, 0.9);
}
.pack-card.popular .pack-tag { background: linear-gradient(135deg, var(--pink), #ff8a5c); }
.pack-coin {
  width: 38px; height: 38px;
  display: block;
  margin-bottom: 20px;
}
.pack-amount { display: block; font-family: var(--display); font-size: 2.05rem; line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.pack-amount small { font-size: 0.85rem; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 3px; }
.pack-price { display: block; margin-top: 12px; font-size: 1rem; font-weight: 700; color: var(--gold); }
.pack-price em { font-style: normal; color: var(--dim); font-size: 0.64rem; font-weight: 600; margin-left: 4px; letter-spacing: 0.05em; }
.pack-khr { display: block; margin-top: 4px; color: var(--dim); font-size: 0.66rem; }
.pack-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}
.pack-cta svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.pack-card:hover .pack-cta { color: var(--text); }
.pack-card:hover .pack-cta svg { transform: translateX(3px); }
.package-note { margin-top: 18px; }
.loading-card { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Steps                                                               */
/* ------------------------------------------------------------------ */

.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps::before {
  content: "";
  position: absolute;
  top: 62px; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 107, 255, 0.4), rgba(95, 227, 255, 0.3), transparent);
}
.step-card {
  position: relative;
  padding: 28px 24px 26px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border-radius: var(--radius);
  overflow: hidden;
}
.step-num {
  position: absolute;
  right: 18px; top: 12px;
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
}
.step-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.2), rgba(56, 214, 255, 0.12));
  border: 1px solid rgba(47, 107, 255, 0.25);
  color: var(--violet-2);
  margin-bottom: 20px;
}
.step-icon svg { width: 22px; height: 22px; }
.step-card h3 { font-size: 1.02rem; margin: 0 0 8px; }
.step-card p { color: var(--muted); font-size: 0.82rem; line-height: 1.8; margin: 0; }
.steps-note { text-align: center; color: var(--dim); font-size: 0.78rem; margin: 28px 0 0; }

/* Quick Sign-in guide */
.qs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.qs-card {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 27, 52, 0.86), rgba(7, 12, 26, 0.9));
  box-shadow: 0 24px 60px -38px rgba(0, 0, 0, 0.95);
}
.qs-shot {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0f1d;
  margin-bottom: 14px;
}
.qs-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.qs-num {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 20px -8px rgba(47, 107, 255, 0.9);
}
.qs-card h3 { font-size: 0.9rem; margin: 0 0 6px; }
.qs-card p { color: var(--muted); font-size: 0.76rem; line-height: 1.75; margin: 0; }
.qs-note {
  max-width: 780px;
  margin: 26px auto 0;
  padding: 13px 16px;
  border: 1px solid rgba(255, 201, 77, 0.35);
  border-radius: 14px;
  background: rgba(255, 201, 77, 0.07);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.75;
  text-align: center;
}
.qs-note::before { content: "⚠ "; color: var(--gold); }
.nowrap { white-space: nowrap; }

.bank-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bank-chips span {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.link-btn { background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; font-weight: 700; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* CTA                                                                 */
/* ------------------------------------------------------------------ */

.cta-band {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 46px 48px;
  border-radius: 28px;
  border: 1px solid rgba(47, 107, 255, 0.35);
  background: linear-gradient(120deg, rgba(47, 107, 255, 0.22), rgba(12, 15, 29, 0.85) 48%, rgba(56, 214, 255, 0.16));
  box-shadow: 0 40px 100px -50px rgba(47, 107, 255, 0.8);
}
.cta-glow {
  position: absolute;
  width: 500px; height: 500px;
  right: -100px; top: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 214, 255, 0.25), transparent 65%);
  pointer-events: none;
}
.cta-copy { position: relative; z-index: 2; max-width: 620px; }
.cta-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); margin: 0 0 8px; }
.cta-copy p:last-child { color: var(--muted); margin: 0; font-size: 0.88rem; line-height: 1.8; }
.cta-actions { position: relative; z-index: 2; display: flex; gap: 10px; flex-wrap: wrap; }
.cta-coin {
  position: absolute;
  right: 36px; bottom: -40px;
  width: 180px; height: 180px;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: rgba(5, 6, 13, 0.6); }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.3fr; gap: 36px; padding: 60px 0 40px; }
.footer-brand p { color: var(--muted); font-size: 0.78rem; line-height: 1.8; margin: 14px 0 18px; max-width: 330px; }
.socials { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.socials a {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}
.socials a:hover { color: var(--text); border-color: var(--line-strong); }
.socials a[aria-label="Telegram"]:hover { color: #2aabee; border-color: rgba(42, 171, 238, 0.5); }
.socials a[aria-label="Discord"]:hover { color: #7c8cff; border-color: rgba(88, 101, 242, 0.55); }
.socials svg { width: 15px; height: 15px; }
.social-chat { background: none; border: 0; color: var(--cyan); font: inherit; font-size: 0.72rem; font-weight: 700; cursor: pointer; padding: 0 4px; }
.footer-col h4 { font-size: 0.76rem; margin: 0 0 14px; color: var(--text); }
.footer-col a,
.footer-link {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 10px;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.footer-col a:hover,
.footer-link:hover { color: var(--text); }
.footer-pay .fine { margin-top: 14px; line-height: 1.7; font-size: 0.66rem; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
}
.footer-bottom p { color: var(--dim); font-size: 0.66rem; margin: 0; }

/* ------------------------------------------------------------------ */
/* Modals                                                              */
/* ------------------------------------------------------------------ */

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 10, 0.78);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.2s ease;
}
.modal-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  max-height: min(92vh, 900px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, #0e1222, #090b16 65%);
  border-radius: 26px;
  padding: 30px;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95);
  animation: modalIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  z-index: 3;
}
.modal-close:hover { color: var(--text); border-color: var(--line-strong); }

/* Auth ------------------------------------------------------------- */

.auth-panel { width: min(100%, 430px); }
.auth-head { text-align: center; margin-bottom: 22px; }
.brand-mark-lg { width: 48px; height: 48px; border-radius: 15px; margin: 0 auto 18px; font-size: 1.3rem; }
.auth-head h2 { font-size: 1.4rem; margin: 0 0 8px; letter-spacing: -0.02em; }
.auth-head p { font-size: 0.78rem; margin: 0; line-height: 1.7; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
}
.auth-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 9px;
  border-radius: 9px;
  cursor: pointer;
}
.auth-tabs button.active {
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(47, 107, 255, 0.9);
}
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > span:first-child { font-size: 0.73rem; font-weight: 600; color: var(--muted); }
.field input {
  width: 100%;
  border: 1px solid var(--line);
  background: #080b15;
  color: var(--text);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  font-size: 0.83rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder { color: #505873; }
.field input:focus { border-color: rgba(47, 107, 255, 0.7); box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.14); }
.input-wrap { position: relative; display: block; }
.input-wrap .input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 0.78rem; font-weight: 700; }
.input-wrap input { padding-left: 34px; }
.field-help { color: var(--dim); font-size: 0.68rem; line-height: 1.65; margin: -4px 0 0; }
.form-error { color: var(--red); font-size: 0.7rem; min-height: 0; margin: 0; }
.form-error:empty { display: none; }
.auth-note { margin-top: 18px; }

/* Account ---------------------------------------------------------- */

.account-panel { width: min(100%, 780px); }
.account-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.account-avatar {
  width: 62px; height: 62px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(47, 107, 255, 0.8);
  flex-shrink: 0;
}
.account-id h2 { font-size: 1.35rem; margin: 2px 0 5px; }
.account-id .eyebrow { margin: 0; }
.role-chip {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(95, 227, 255, 0.1);
  border: 1px solid rgba(95, 227, 255, 0.2);
  color: var(--cyan);
  font-size: 0.58rem;
  font-weight: 700;
}
.account-sub { font-size: 0.76rem; margin: 8px 0 20px; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.account-stats > div { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); border-radius: 13px; padding: 13px 15px; }
.account-stats strong { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 3px; }
.account-stats span { color: var(--dim); font-size: 0.66rem; }
.account-orders-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.account-orders-head h3 { font-size: 0.88rem; margin: 0; }
.orders-list { display: grid; gap: 8px; max-height: 280px; overflow: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.order-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 12px;
  padding: 12px 14px;
}
.order-row .oc { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; color: var(--text); }
.order-row .small { color: var(--dim); font-size: 0.63rem; margin-top: 2px; }
.order-row strong { font-size: 0.78rem; }
.order-row .muted { color: var(--muted); }
.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}
.empty-state .btn { margin-top: 12px; }
.account-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.status-chip,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.chip-pending, .status-pending { background: rgba(255, 201, 77, 0.1); border: 1px solid rgba(255, 201, 77, 0.25); color: var(--gold); }
.chip-submitted, .status-submitted { background: rgba(95, 227, 255, 0.1); border: 1px solid rgba(95, 227, 255, 0.25); color: var(--cyan); }
.chip-paid, .status-paid { background: rgba(62, 230, 164, 0.1); border: 1px solid rgba(62, 230, 164, 0.25); color: var(--green); }
.chip-expired, .status-expired, .chip-cancelled, .status-cancelled { background: rgba(255, 107, 129, 0.1); border: 1px solid rgba(255, 107, 129, 0.25); color: var(--red); }

/* Checkout --------------------------------------------------------- */

.checkout-panel { width: min(100%, 1080px); padding: 30px 32px 32px; }
.checkout-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding-right: 30px; }
.checkout-head h2 { font-size: 1.65rem; margin: 0 0 6px; }
.checkout-head .muted { font-size: 0.78rem; margin: 0; }
.checkout-head .status-chip { margin-top: 4px; }
.checkout-form-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 24px; align-items: start; }
.checkout-form { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); border-radius: 18px; padding: 24px; }
.stage-badge { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.stage-badge span {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  font-size: 0.68rem;
  font-weight: 800;
}
.stage-badge strong { font-size: 0.88rem; }
.order-preview {
  border: 1px solid rgba(47, 107, 255, 0.28);
  background: linear-gradient(160deg, rgba(47, 107, 255, 0.12), rgba(255, 255, 255, 0.02));
  border-radius: 18px;
  padding: 24px;
}
.preview-pack { display: flex; align-items: center; gap: 13px; margin: 14px 0 18px; }
.preview-coin {
  width: 46px; height: 46px;
  display: block;
  flex-shrink: 0;
}
.preview-pack strong { display: block; font-family: var(--display); font-size: 1.35rem; }
.preview-pack span:last-child { color: var(--pink); font-size: 0.62rem; font-weight: 700; }
.preview-list { margin: 0; padding: 0; display: grid; gap: 10px; }
.preview-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.preview-list dt { color: var(--muted); font-size: 0.7rem; }
.preview-list dd { margin: 0; font-size: 0.78rem; font-weight: 700; }
.preview-banks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.preview-banks span { border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; font-size: 0.56rem; color: var(--dim); font-weight: 700; }

.pay-grid { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.qr-column { display: grid; gap: 12px; }
.qr-card { background: #fff; color: #111827; border-radius: 20px; padding: 18px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.qr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.qr-brand { font-family: var(--display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; color: #0f172a; }
.qr-live { display: flex; align-items: center; gap: 5px; color: #0f766e; font-size: 0.56rem; font-weight: 700; }
.qr-live i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12); }
.qr-frame { position: relative; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; aspect-ratio: 1; border: 1px solid #e5e7eb; }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #6b7280; font-size: 0.68rem; }
.qr-corner { position: absolute; width: 20px; height: 20px; border-color: #2f6bff; border-style: solid; }
.qr-corner.tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; border-radius: 6px 0 0 0; }
.qr-corner.tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; border-radius: 0 6px 0 0; }
.qr-corner.bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; border-radius: 0 0 0 6px; }
.qr-corner.br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; border-radius: 0 0 6px 0; }
.qr-merchant { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 0.63rem; color: #6b7280; }
.qr-merchant strong { color: #111827; font-size: 0.7rem; }
.qr-amount-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.qr-amount-row > div { display: grid; gap: 3px; }
.qr-amount-row span { color: #6b7280; font-size: 0.56rem; }
.qr-amount-row strong { color: #111827; font-family: var(--display); font-size: 0.98rem; }
.qr-amount-row .timer { color: #1d4ed8; }
.qr-amount-row .timer.low { color: #dc2626; }
.qr-download { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; padding: 9px; border-radius: 9px; background: #f5f3ff; color: #6d28d9; font-size: 0.66rem; font-weight: 700; text-decoration: none; }
.qr-download:hover { background: #ede9fe; }
.pay-column { display: grid; gap: 14px; }
.order-code-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); border-radius: 14px; padding: 14px 16px; }
.order-code-card > div { display: grid; gap: 3px; }
.order-code-card .muted { font-size: 0.63rem; }
.order-code-card strong { font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.04em; }
.order-hint { color: var(--dim); font-size: 0.66rem; line-height: 1.7; margin: 0; }
.order-hint strong { color: var(--gold); font-family: var(--mono); }
.order-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.order-meta > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 3px; }
.order-meta span { color: var(--dim); font-size: 0.6rem; }
.order-meta strong { font-size: 0.78rem; }
.pay-status { border-radius: 12px; padding: 11px 13px; font-size: 0.7rem; line-height: 1.6; }
.pay-status.is-submitted { background: rgba(95, 227, 255, 0.08); border: 1px solid rgba(95, 227, 255, 0.25); color: var(--cyan); }
.pay-status.is-paid { background: rgba(62, 230, 164, 0.08); border: 1px solid rgba(62, 230, 164, 0.25); color: var(--green); }
.pay-status.is-expired, .pay-status.is-cancelled { background: rgba(255, 107, 129, 0.08); border: 1px solid rgba(255, 107, 129, 0.25); color: var(--red); }

.auto-detect {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid rgba(47, 107, 255, 0.35);
  background: rgba(47, 107, 255, 0.09);
  color: var(--violet-2);
  font-size: 0.66rem;
  line-height: 1.6;
}
.auto-detect[hidden] { display: none; }
.auto-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(56, 214, 255, 0.55);
  animation: autoPulse 1.6s ease-out infinite;
}
@keyframes autoPulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 214, 255, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(56, 214, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 214, 255, 0); }
}
html.perf-lite .auto-dot { animation: none; }
.pay-steps-wrap h4 { font-size: 0.73rem; margin: 0 0 8px; color: var(--muted); }
.pay-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; counter-reset: step; }
.pay-steps li { counter-increment: step; display: flex; gap: 8px; color: var(--muted); font-size: 0.7rem; line-height: 1.65; }
.pay-steps li a { color: var(--pink); text-decoration: underline; text-underline-offset: 2px; }
.pay-steps li::before {
  content: counter(step);
  width: 18px; height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(47, 107, 255, 0.14);
  color: var(--violet-2);
  font-size: 0.58rem;
  font-weight: 800;
  margin-top: 1px;
}
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ */
/* Chat                                                                */
/* ------------------------------------------------------------------ */

.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 18px 38px -14px rgba(47, 107, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-fab::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(47, 107, 255, 0.4);
  animation: chatPulse 2.6s ease-out infinite;
  pointer-events: none;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 24px 46px -14px rgba(56, 214, 255, 0.9); }
.chat-fab svg { width: 24px; height: 24px; }
.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid var(--bg);
  background: var(--red);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 94px;
  z-index: 95;
  width: 366px;
  height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: linear-gradient(165deg, #0e1222, #090b16 70%);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.95);
  animation: chatIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  flex-shrink: 0;
}
.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
  mix-blend-mode: screen;
}
.chat-head-copy { flex: 1; min-width: 0; }
.chat-head-copy strong { display: block; font-size: 0.82rem; }
.chat-status { display: flex; align-items: center; gap: 5px; font-size: 0.56rem; color: var(--dim); margin-top: 2px; }
.chat-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); flex-shrink: 0; }
.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }

.chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.chat-day {
  align-self: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--dim);
  font-size: 0.56rem;
  margin: 4px 0;
}
.chat-msg { max-width: 84%; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-bubble {
  padding: 9px 12px;
  border-radius: 14px 14px 14px 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-msg.mine .msg-bubble {
  border-color: transparent;
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
}
.msg-time { font-size: 0.53rem; color: var(--dim); padding: 0 2px; }
.chat-empty { margin: auto; padding: 20px; text-align: center; color: var(--dim); font-size: 0.72rem; line-height: 1.8; }
.chat-empty strong { display: block; color: var(--muted); margin-bottom: 3px; }

.quick-replies {
  display: flex;
  gap: 6px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.quick-replies::-webkit-scrollbar { display: none; }
.quick-replies button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.61rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.quick-replies button:hover { color: var(--text); border-color: var(--line-strong); }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #080b15;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 0.76rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-form input::placeholder { color: #505873; }
.chat-form input:focus { border-color: rgba(47, 107, 255, 0.7); box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12); }
.chat-send {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
}
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  max-width: calc(100vw - 40px);
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(12, 15, 29, 0.96);
  color: var(--text);
  font-size: 0.76rem;
  text-align: center;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.95);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ */
/* Reveal animations                                                   */
/* ------------------------------------------------------------------ */

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal:nth-child(2) { transition-delay: 0.08s; }
html.js .reveal:nth-child(3) { transition-delay: 0.16s; }
html.js .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ------------------------------------------------------------------ */
/* Keyframes                                                           */
/* ------------------------------------------------------------------ */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes spin-reverse {
  to { transform: rotate(-360deg); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes chatIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes chatPulse {
  0% { transform: scale(0.92); opacity: 0.7; }
  80%, 100% { transform: scale(1.35); opacity: 0; }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .nav a, .nav-link { padding: 8px 8px; font-size: 0.78rem; }
  .user-chip .user-name { display: none; }
  .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer-pay { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .menu-btn { display: flex; }
  .qs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 24px 18px;
    border-bottom: 1px solid var(--line);
    background: #050b1a;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  }
  .nav.open { display: flex; }
  .nav a, .nav-link { width: 100%; text-align: left; padding: 12px 10px; font-size: 0.88rem; }
  .hero { grid-template-columns: 1fr; gap: 10px; padding: 56px 0 50px; min-height: 0; }
  .hero-copy { max-width: 640px; }
  .hero-visual { height: 440px; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-pay { grid-column: auto; }
}

@media (max-width: 760px) {
  .container { width: calc(100% - 32px); }
  .site-header {
    background: rgba(4, 8, 22, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .header-inner { height: 68px; }
  .brand-copy small { display: none; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  html[lang="km"] .hero h1 { font-size: clamp(1.9rem, 7.4vw, 2.5rem); }
  .hero-visual { height: 380px; margin-top: 10px; }
  .coin { width: 190px; height: 190px; }
  .orbit-a { width: 310px; height: 310px; }
  .orbit-b { width: 400px; height: 400px; }
  .hero-halo { width: 360px; height: 360px; }
  .float-card { padding: 9px 11px; transform: scale(0.9); }
  .float-qr { top: 6%; left: 0; }
  .float-fast { top: 18%; right: 0; }
  .float-support { bottom: 2%; left: 0; }
  .section { padding: 70px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 30px; }
  .section-head.center { align-items: center; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .cta-band { padding: 30px 24px; }
  .cta-coin { width: 120px; height: 120px; right: 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; padding: 44px 0 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .modal { padding: 12px; }
  .modal-panel { padding: 24px; border-radius: 22px; max-height: 94vh; }
  .checkout-panel { padding: 24px 18px 20px; }
  .checkout-head { padding-right: 26px; }
  .checkout-form-grid { grid-template-columns: 1fr; }
  .pay-grid { grid-template-columns: 1fr; gap: 18px; }
  .qr-column { max-width: 420px; margin-inline: auto; width: 100%; }
  .account-stats { gap: 8px; }
  .account-stats > div { padding: 11px; }
  .chat-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: min(86vh, 620px);
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }
  .chat-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .toast { bottom: 84px; }
}

@media (max-width: 560px) {
  .header-actions { gap: 6px; }
  .qs-grid { grid-template-columns: 1fr; }
  .qs-card { max-width: 330px; margin: 0 auto; width: 100%; }
  .lang-btn { padding: 6px 9px; }
  .header-actions > .btn#loginBtn { display: none; }
  .nav-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--violet), var(--pink));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 26px -14px rgba(56, 214, 255, 0.9);
  }
  .nav-signin:hover { background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; }
  .hero { padding-top: 40px; }
  .hero-actions .btn { flex: 1; min-width: 140px; }
  .hero-trust { gap: 12px; }
  .hero-trust li { font-size: 0.72rem; }
  .package-grid { gap: 10px; }
  .pack-card { padding: 16px; border-radius: 18px; }
  .pack-amount { font-size: 1.65rem; }
  .pack-coin { width: 32px; height: 32px; margin-bottom: 16px; }
  .pack-cta { font-size: 0.68rem; }
  .pack-tag { top: 10px; right: 10px; font-size: 0.52rem; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .account-head { gap: 12px; }
  .account-avatar { width: 50px; height: 50px; border-radius: 15px; font-size: 1.2rem; }
  .account-id h2 { font-size: 1.1rem; }
  .account-stats { grid-template-columns: 1fr; }
  .account-stats > div { display: flex; align-items: center; justify-content: space-between; padding: 9px 13px; }
  .account-stats strong { margin: 0; font-size: 1rem; }
  .account-foot .btn { flex: 1; }
  .order-row { grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px; }
  .order-row > div:nth-child(2) { grid-column: 1; grid-row: 2; }
  .order-row > div:nth-child(3) { grid-column: 2; grid-row: 1; }
  .order-row > button { grid-column: 2; grid-row: 2; }
  .checkout-head h2 { font-size: 1.3rem; }
  .qr-amount-row strong { font-size: 0.86rem; }
  .order-meta { grid-template-columns: 1fr; }
  .modal-close { top: 12px; right: 12px; }
  .auth-head h2 { font-size: 1.2rem; }
  .chat-status span:last-child { display: none; }
}

@media (max-width: 420px) {
  .package-grid { grid-template-columns: 1fr; }
  .pack-card { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
  .pack-coin { margin: 0; grid-row: 1 / 3; }
  .pack-amount { font-size: 1.7rem; }
  .pack-price { margin-top: 2px; }
  .pack-khr { grid-column: 2; }
  .pack-cta { grid-column: 1 / -1; margin-top: 14px; }
  .pack-tag { top: 12px; right: 12px; }
  .hero-visual { height: 330px; }
  .coin { width: 160px; height: 160px; }
  .orbit-a { width: 260px; height: 260px; }
  .orbit-b { width: 330px; height: 330px; }
  .float-card small { display: none; }
  .float-card { padding: 8px 10px; }
  .float-fast { top: 10%; }
  .cta-actions { flex-direction: column; }
  .footer-grid { gap: 22px; }
}

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

  /* The ticker is a slow, continuous marquee: keep it running even when
     the OS asks for reduced motion (slower, for comfort). */
  .ticker-track {
    animation-duration: 160s !important;
    animation-iteration-count: infinite !important;
  }

  /* The hero orbit is the store's signature visual: keep it running
     even when the OS asks for reduced motion. */
  .orbit-spin {
    animation-duration: 26s !important;
    animation-iteration-count: infinite !important;
  }
  .orbit-spin-b {
    animation-duration: 40s !important;
    animation-iteration-count: infinite !important;
  }
  .orbit-spin-c {
    animation-duration: 34s !important;
    animation-iteration-count: infinite !important;
  }
  .orbit-spin-d {
    animation-duration: 48s !important;
    animation-iteration-count: infinite !important;
  }
  .orbit-coin {
    animation-duration: 34s !important;
    animation-iteration-count: infinite !important;
  }
  .orbit-coin-alt {
    animation-duration: 48s !important;
    animation-iteration-count: infinite !important;
  }
  .coin-wrap {
    animation-duration: 7s !important;
    animation-iteration-count: infinite !important;
  }
  .coin::after {
    animation-duration: 4.5s !important;
    animation-iteration-count: infinite !important;
  }
}

/* Low-end device mode: keep the signature orbit, but stop the extra
   continuous animations that cost the most on weak GPUs. */
html.perf-lite .float-card,
html.perf-lite .coin-wrap,
html.perf-lite .spark,
html.perf-lite .coin::after,
html.perf-lite .chat-fab,
html.perf-lite .rate-dot {
  animation: none !important;
}
html.perf-lite .orbit-coin,
html.perf-lite .orbit-coin-alt { animation: none !important; }
html.perf-lite .ticker-track { animation-duration: 180s; }
html.perf-lite .site-header { box-shadow: none; }



