/* RewardsPro — shared app styles
   Used by: auth pages (login, register) and customer flow
   (shop/index, spin, scratch, lucky-draw, result, coupon).
   Vanilla CSS, no framework. */

/* ---------- Design tokens ---------- */
:root {
  --primary: #6938ef;
  --primary-dark: #4f1fc4;
  --primary-soft: #ede5ff;
  --ink: #180a3d;
  --ink-soft: #2a1764;
  --tint: #faf7ff;
  --accent: #f5b942;
  --accent-deep: #c98a1e;
  --success: #16a34a;
  --danger: #dc2626;
  --muted: #475066;
  --muted-2: #64708a;
  --border: rgba(24, 10, 61, 0.10);
  --border-soft: rgba(24, 10, 61, 0.06);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 14px rgba(20, 14, 40, 0.06);
  --shadow: 0 12px 28px rgba(20, 14, 40, 0.10);
  --shadow-lg: 0 22px 50px rgba(20, 14, 40, 0.16);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: 100vw;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
input, select, textarea { font-family: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 13px 20px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 28px rgba(105, 56, 239, 0.32);
}
.btn-primary:hover { box-shadow: 0 14px 36px rgba(105, 56, 239, 0.40); }
.btn-ink {
  background: linear-gradient(135deg, var(--ink), var(--ink-soft));
  color: #fff;
  box-shadow: 0 12px 28px rgba(24, 10, 61, 0.28);
}
.btn-secondary {
  background: #fff;
  border-color: rgba(24, 10, 61, 0.14);
  color: var(--ink);
}
.btn-secondary:hover { border-color: rgba(24, 10, 61, 0.28); }
.btn-accent {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(245, 185, 66, 0.40);
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.32);
}
.btn-block { width: 100%; }
.btn-lg { padding: 16px 22px; font-size: 15px; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Alerts ---------- */
.rp-alert {
  display: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.rp-alert.visible { display: block; }
.rp-alert-error { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }
.rp-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--success); }

/* ---------- Form fields ---------- */
.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.field-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(105, 56, 239, 0.10);
}
.field-input .prefix {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.field-input .prefix::after {
  content: '';
  width: 1px; height: 18px;
  background: var(--border);
  margin-left: 8px;
}
.field-input input,
.field-input select {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.3px;
}
.field-input input::placeholder { color: #94a3b8; font-weight: 500; }
.field-hint { margin-top: 6px; font-size: 12px; color: var(--muted-2); }
.field-error { margin-top: 6px; font-size: 12px; color: var(--danger); font-weight: 600; }

.checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
}
.checkbox input { display: none; }
.checkbox .box {
  flex-shrink: 0;
  margin-top: 2px;
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  transition: background .15s, border-color .15s;
}
.checkbox input:checked + .box {
  background: var(--primary);
  border-color: var(--primary);
}
.checkbox input:checked + .box::before { content: '✓'; }
.checkbox a, .checkbox b { color: var(--primary); font-weight: 700; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 700;
  letter-spacing: 0.6px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ========================================================
   AUTH PAGES (login, register)
   Split-pane on desktop, stacked on mobile.
======================================================== */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .auth { grid-template-columns: 1fr 1fr; }
}

.auth-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 50%, var(--primary-dark) 130%);
  color: #fff;
  padding: 28px 28px 48px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 960px) {
  .auth-brand { padding: 48px 56px; min-height: 100vh; }
}
.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(245, 185, 66, 0.9) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.auth-brand::after {
  content: '';
  position: absolute;
  top: -120px; right: -100px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 185, 66, 0.30), transparent 60%);
  pointer-events: none;
}
.auth-brand .brand-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.auth-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.auth-brand .brand .logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: #fff;
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 16px;
}
.auth-brand .brand .accent { color: var(--accent); }
.auth-brand .back-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}
.auth-brand .back-link:hover { color: #fff; }

.auth-hero {
  position: relative;
  margin-top: 32px;
}
@media (min-width: 960px) { .auth-hero { margin-top: auto; padding-top: 80px; } }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(245, 185, 66, 0.35);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.auth-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.auth-hero h1 {
  margin: 14px 0 6px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.05;
}
.auth-hero .hindi {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--accent);
  opacity: 0.95;
}
.auth-hero .lede {
  margin-top: 14px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  max-width: 420px;
}

.auth-features {
  position: relative;
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auth-features li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 185, 66, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}
.auth-features .emoji { font-size: 18px; }

/* form panel */
.auth-form-panel {
  padding: 32px 24px 40px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 960px) {
  .auth-form-panel { padding: 48px 56px; justify-content: center; }
}
.auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.auth-card h2 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}
.auth-card .sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
}
.auth-card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 14px;
}
.auth-card .row .forgot {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
}
.auth-card .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auth-card .switch {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.auth-card .switch a {
  color: var(--primary);
  font-weight: 800;
}

/* signup progress */
.steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}
.steps .dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted-2);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 800;
}
.steps .dot.active { background: var(--primary); color: #fff; }
.steps .line { flex: 1; height: 2px; background: var(--border); border-radius: 2px; }
.steps .label { margin-left: 4px; font-size: 12px; font-weight: 700; color: var(--muted-2); }

/* ========================================================
   CUSTOMER FLOW (shop pages)
   Mobile-first. Centered phone-width frame on desktop.
======================================================== */
body.flow {
  background: #f4f3f8;
}
.flow .stage {
  width: 100%;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px var(--border-soft);
}
@media (min-width: 720px) {
  .flow { padding: 24px 0; }
  .flow .stage {
    border-radius: 28px;
    overflow: hidden;
    min-height: calc(100vh - 48px);
    box-shadow: 0 24px 60px rgba(20, 14, 40, 0.16);
  }
}

/* Shop header strip */
.shop-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink);
}
.shop-bar.dark {
  background: transparent;
  border-bottom: none;
  color: #fff;
}
.shop-bar .shop-logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 13px;
  overflow: hidden;
  flex-shrink: 0;
}
.shop-bar .shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.shop-bar .shop-meta { flex: 1; min-width: 0; }
.shop-bar .shop-name {
  font-size: 14px; font-weight: 800; letter-spacing: -0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-bar .powered {
  font-size: 11px;
  opacity: 0.6;
}
.shop-bar .badge {
  background: var(--tint);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.shop-bar.dark .badge {
  background: rgba(255, 255, 255, 0.10);
  color: var(--accent);
}

/* Flow content padding */
.flow-content {
  flex: 1;
  padding: 20px 18px 28px;
}
.flow-content.tint { background: linear-gradient(180deg, var(--tint), #fff); }

.flow-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--primary);
}
.flow-eyebrow.on-dark { color: var(--accent); }
.flow-title {
  margin: 6px 0 4px;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
}
.flow-title .accent { color: var(--primary); }
.flow-lede {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.55;
}

.flow-hindi {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  color: var(--primary);
  margin-top: 4px;
}

/* Number input card on scan page */
.scan-card {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.scan-card .field { margin-bottom: 12px; }
.scan-card .field-input { background: var(--tint); border-color: rgba(105, 56, 239, 0.30); }

.trust-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.trust-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 4px;
  text-align: center;
}
.trust-tile .emoji { font-size: 18px; }
.trust-tile .label { font-size: 10px; font-weight: 700; margin-top: 3px; }

/* Game picker list */
.game-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.game-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.game-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.game-row .ico {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 28px;
  flex-shrink: 0;
}
.game-row .meta { flex: 1; min-width: 0; }
.game-row .name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.game-row .desc {
  font-size: 12.5px;
  color: var(--muted-2);
  margin-top: 2px;
}
.game-row .chev {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.game-row .tag {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}

.social-proof {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tint);
  border: 1px dashed rgba(105, 56, 239, 0.40);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
}

/* Spin page (dark) */
.spin-stage {
  flex: 1;
  background: linear-gradient(180deg, var(--ink), var(--ink-soft));
  color: #fff;
  padding: 14px 18px 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.spin-stage::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(245, 185, 66, 0.9) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
}
.spin-stage .spin-head {
  position: relative;
  text-align: center;
  margin-bottom: 4px;
}
.spin-stage .spin-head .live {
  font-size: 12px; opacity: 0.7; margin-top: 4px;
}
.wheel-shell {
  position: relative;
  margin: 12px 0;
  width: min(290px, calc(100vw - 40px));
  height: min(290px, calc(100vw - 40px));
}
.wheel-shell::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,185,66,0.35) 0%, transparent 62%);
  animation: rp-pulse 2.6s ease-in-out infinite;
}
.wheel-shell::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(245,185,66,0.40), 0 0 24px rgba(245,185,66,0.55);
  pointer-events: none;
}
.wheel-svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
  border-radius: 50%;
  transition: transform 4.5s cubic-bezier(.16,.72,.16,1);
}
.wheel-pointer {
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid var(--accent);
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4));
  z-index: 3;
}
.wheel-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-deep));
  box-shadow: 0 6px 18px rgba(0,0,0,0.40), inset 0 1px 1px rgba(255,255,255,0.55);
  display: grid; place-items: center;
  color: var(--ink);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.8px;
  z-index: 4;
  border: none;
  cursor: pointer;
  transition: transform .15s;
}
.wheel-hub:active { transform: translate(-50%, -50%) scale(.95); }
.wheel-hub[disabled] { cursor: not-allowed; opacity: 0.7; }

.prize-chips {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 12px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.prize-chips::-webkit-scrollbar { display: none; }
.prize-chips { scrollbar-width: none; }
.prize-chip {
  flex-shrink: 0;
  background: rgba(245,185,66,0.15);
  color: var(--accent);
  border: 1px solid rgba(245,185,66,0.34);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.steps-row {
  position: relative;
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}
.steps-row .item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(245,185,66,0.22);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}
.steps-row .item .emoji { font-size: 18px; }
.steps-row .item .label { font-size: 10px; font-weight: 700; margin-top: 3px; opacity: 0.9; }

/* Scratch page */
.scratch-stage {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1.18;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(20,14,40,0.18);
  border: 1px solid var(--border);
}
.scratch-prize {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  gap: 6px;
}
.scratch-prize::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(245,185,66,0.9) 1px, transparent 1px);
  background-size: 14px 14px;
}
.scratch-prize > * { position: relative; }
.scratch-prize .label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  opacity: 0.9;
}
.scratch-prize .emoji { font-size: clamp(40px, 12vw, 60px); line-height: 1; }
.scratch-prize .name {
  font-size: clamp(18px, 6vw, 28px);
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-top: 4px;
  word-break: break-word;
}
.scratch-prize .meta {
  font-size: 13px;
  opacity: 0.88;
  margin-top: 2px;
}
.scratch-prize .code {
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1.5px dashed rgba(255,255,255,0.40);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
}
.scratch-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  transition: opacity .5s ease;
}
.scratch-progress { margin-top: 16px; }
.scratch-progress .row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted-2); font-weight: 700;
  margin-bottom: 6px;
}
.scratch-progress .bar {
  height: 8px; border-radius: 999px;
  background: rgba(24,10,61,0.08); overflow: hidden;
}
.scratch-progress .fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .25s ease;
}

/* Lucky draw page */
.draw-banner {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--danger), #ea580c);
  color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.draw-banner .pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.30);
  animation: rp-pulse 1.5s ease-in-out infinite;
}
.draw-banner .label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: 0.9;
}
.draw-banner .name { font-size: 13.5px; font-weight: 700; margin-top: 2px; }

.ticket {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(20,14,40,0.16);
  background: #fff;
  border: 1px solid var(--border);
}
.ticket-top {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 22px 20px;
  text-align: center;
}
.ticket-top .campaign { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; opacity: 0.9; }
.ticket-top .prize {
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: -0.4px;
}
.ticket-top .date { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.ticket-balls {
  display: flex; justify-content: center; gap: 8px; margin-top: 14px;
}
.ticket-balls span {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--primary);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
  animation: rp-float 2s ease-in-out infinite;
}
.ticket-balls span:nth-child(2) { animation-delay: .15s; }
.ticket-balls span:nth-child(3) { animation-delay: .30s; }
.ticket-balls span:nth-child(4) { animation-delay: .45s; }
.ticket-balls span:nth-child(5) { animation-delay: .60s; }

.perf {
  position: relative;
  height: 1px;
}
.perf::before {
  content: '';
  position: absolute; left: 0; right: 0; top: -6px; height: 12px;
  background: radial-gradient(circle at 6px 6px, transparent 4.5px, #fff 4.5px) repeat-x;
  background-size: 12px 12px;
}
.ticket-bot { padding: 18px 20px; text-align: center; }
.ticket-bot .label {
  font-size: 11px; color: var(--muted-2);
  font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
}
.ticket-bot .num {
  font-size: 36px; font-weight: 800; color: var(--ink);
  letter-spacing: -0.6px; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.ticket-bot .in-draw {
  margin-top: 12px;
  padding: 10px 0;
  border-radius: 10px;
  background: var(--accent); color: var(--ink);
  font-weight: 800; font-size: 13px; letter-spacing: 0.3px;
}
.ticket-note {
  font-size: 12px; color: var(--muted-2);
  margin-top: 10px; line-height: 1.5; text-align: center;
}

/* Result page */
.result-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink), var(--ink-soft));
  display: flex; align-items: center; justify-content: center;
  padding: 24px 18px;
}
.result-stage .backdrop-dots {
  position: absolute; inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(245,185,66,0.9) 1px, transparent 1px);
  background-size: 14px 14px;
}
.confetti-piece {
  position: absolute; pointer-events: none;
  width: 7px; height: 12px; border-radius: 2px;
  opacity: 0.9;
}
.win-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 360px;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  animation: rp-pop .5s cubic-bezier(.16, 1, .3, 1);
}
.win-card .head {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  padding: 28px 20px 22px;
  text-align: center;
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.win-card .head::before {
  content: '';
  position: absolute; inset: 0; opacity: 0.25;
  background-image: radial-gradient(rgba(24,10,61,0.9) 1px, transparent 1px);
  background-size: 12px 12px;
}
.win-card .head > * { position: relative; }
.win-card .emoji { font-size: 52px; line-height: 1; }
.win-card .label {
  font-size: 11px; font-weight: 800;
  letter-spacing: 1.6px; text-transform: uppercase;
  margin-top: 8px; opacity: 0.8;
}
.win-card .heading {
  font-size: 32px; font-weight: 800;
  letter-spacing: -1px; margin-top: 4px;
}
.win-card .body { padding: 20px; }
.win-card .body .amount {
  text-align: center;
  font-size: clamp(28px, 10vw, 44px); font-weight: 800;
  color: var(--primary);
  letter-spacing: -1.4px; line-height: 1;
  word-break: break-word;
}
.win-card .body .what {
  text-align: center;
  font-size: 14px; font-weight: 700;
  color: var(--ink); margin-top: 6px;
}
.win-card .body .when {
  text-align: center;
  font-size: 12px; color: var(--muted-2);
  margin-top: 4px;
}
.coupon-box {
  margin-top: 16px;
  padding: 12px 14px;
  border: 2px dashed rgba(105, 56, 239, 0.40);
  border-radius: 12px;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.coupon-box .code-label {
  font-size: 10px; font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 0.6px; text-transform: uppercase;
}
.coupon-box .code {
  margin-top: 2px;
  font-size: clamp(14px, 4vw, 18px); font-weight: 800;
  color: var(--ink);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 1.5px;
  word-break: break-all;
}
.coupon-box .copy {
  background: var(--primary); color: #fff;
  padding: 6px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 800;
  border: none; cursor: pointer;
}
.win-card .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* Coupon page */
.coupon-state {
  text-align: center; margin-bottom: 14px;
}
.coupon-state .pill {
  display: inline-block;
  background: var(--success);
  color: #fff;
  padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
}
.coupon-state .pill.expired { background: var(--muted-2); }
.coupon-state .pill.used { background: #0ea5e9; }
.coupon-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.coupon-card .head {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 22px 20px;
  text-align: center;
}
.coupon-card .head .shop {
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; opacity: 0.85;
}
.coupon-card .head .emoji { font-size: 40px; margin-top: 6px; line-height: 1; }
.coupon-card .head .value {
  font-size: clamp(28px, 7vw, 36px); font-weight: 800;
  letter-spacing: -1.2px; margin-top: 4px;
}
.coupon-card .head .terms {
  font-size: 12.5px; opacity: 0.85; margin-top: 4px;
}
.coupon-card .body { padding: 22px 20px; }
.coupon-card .code-block {
  padding: 14px;
  border: 2px dashed rgba(105, 56, 239, 0.40);
  border-radius: 12px;
  background: var(--tint);
  text-align: center;
}
.coupon-card .code-block .label {
  font-size: 10px; font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 0.6px; text-transform: uppercase;
}
.coupon-card .code-block .code {
  font-size: 24px; font-weight: 800;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 2px; margin-top: 4px;
}
.coupon-card .instr {
  margin-top: 14px;
  font-size: 13px; color: var(--muted);
  text-align: center; line-height: 1.55;
}
.coupon-card .grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 14px;
}
.coupon-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
}
.coupon-note .sub { color: var(--muted-2); font-size: 11px; }

.cta-after { margin-top: 14px; }
.cta-hint { margin-top: 10px; text-align: center; font-size: 11.5px; color: var(--muted-2); }

/* State cards (error / empty) */
.state-card {
  margin: 40px 18px;
  padding: 32px 24px;
  border-radius: 20px;
  background: var(--tint);
  border: 1px solid var(--border);
  text-align: center;
}
.state-card .ico { font-size: 48px; margin-bottom: 12px; }
.state-card .title { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
.state-card .sub { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.55; }

/* ---------- Promotions / Ads Carousel (shop scan page) ---------- */
.ads-section {
  border-top: 1px solid var(--border-soft);
  padding: 16px 0 20px;
  background: var(--tint);
  overflow: hidden;
}
.ads-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 10px;
}
.ads-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink);
}
.ads-count {
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 600;
}

/* Scrollable track */
.ads-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 18px 6px;
}
.ads-track::-webkit-scrollbar { display: none; }

/* Individual ad card */
.ad-card {
  flex-shrink: 0;
  width: calc(100% - 36px);
  max-width: 360px;
  scroll-snap-align: start;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  display: block;
  box-shadow: 0 8px 28px rgba(20, 14, 40, 0.14);
  transition: transform .15s;
}
.ad-card:active { transform: scale(.98); }

/* Gradient body */
.ad-body {
  padding: 20px 18px 20px;
  position: relative;
  z-index: 1;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ad-emoji {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}
.ad-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.ad-sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 4px;
  line-height: 1.45;
}
.ad-cta {
  display: inline-block;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

/* Badge pill */
.ad-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  z-index: 3;
}

/* Decorative circle */
.ad-deco {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
}
.ad-deco::before {
  content: '';
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.ad-deco::after {
  content: '';
  position: absolute;
  inset: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

/* Dot indicators */
.ads-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.ads-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(24, 10, 61, 0.18);
  cursor: pointer;
  transition: background .2s, width .2s;
}
.ads-dot.active {
  background: var(--primary);
  width: 18px;
  border-radius: 999px;
}

/* ---------- Banner Ads (static product / offer cards) ---------- */
.banners-section {
  padding: 20px 18px 10px;
  border-top: 1px solid var(--border-soft);
  background: var(--tint);
}
.banners-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted-2);
  display: block;
  margin-bottom: 12px;
}
.banner-card {
  display: block;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(24, 10, 61, 0.09);
  margin-bottom: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.banner-card:active {
  transform: scale(.985);
  box-shadow: 0 1px 6px rgba(24, 10, 61, .05);
}
.banner-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.banner-img-placeholder {
  width: 100%;
  height: 110px;
  background: linear-gradient(135deg, var(--primary), #4f1fc4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
}
.banner-body {
  padding: 14px 16px 18px;
}
.banner-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}
.banner-desc {
  font-size: 13px;
  color: var(--muted-1);
  margin-top: 5px;
  line-height: 1.5;
}
.banner-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.banner-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.banner-cta {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: opacity .15s;
}
.banner-cta:hover { opacity: .85; }

/* ---------- Animations ---------- */
@keyframes rp-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.06); opacity: 0.85; }
}
@keyframes rp-pop {
  0% { transform: scale(0.6); opacity: 0; }
  50% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes rp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
