/* ====== Reset & base ====== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

/* Google font - Bricolage Grotesque (matches Qureka) */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&display=swap');

body {
  font-family: 'Bricolage Grotesque', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #fff;
  background: #060504;
  min-height: 100vh;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
img { display: block; max-width: 100%; }
input, select, textarea { font-family: inherit; }
:root {
  --brand:        #ff7a16;
  --brand-2:      #ffaa54;
  --brand-deep:   #d65800;
  --brand-glow:   rgba(255, 122, 22, 0.55);
  --bg:           #0a0807;
  --surface:      rgba(20, 16, 13, 0.72);
  --surface-2:    rgba(38, 32, 26, 0.95);
  --border:       rgba(255, 255, 255, 0.08);
  --border-2:     rgba(255, 138, 61, 0.25);
  --text:         #fff;
  --muted:        rgba(255, 255, 255, 0.6);
  --gold:         #ffd05a;
  --gold-deep:    #c47a00;
  --orange:       #ff7a16;
  --red:          #ff5252;
  --green:        #4ade80;
  --shadow:       0 8px 24px rgba(0, 0, 0, 0.4);
  --radius:       18px;
  --radius-sm:    12px;
  --transition:   180ms cubic-bezier(.4, 0, .2, 1);
}

/* ====== Outer dark background (visible on desktop around phone) ====== */
body {
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      transparent 0,
      transparent 60px,
      rgba(255, 255, 255, 0.012) 60px,
      rgba(255, 255, 255, 0.012) 62px
    ),
    radial-gradient(60% 50% at 50% 0%, rgba(106, 64, 20, 0.35), transparent 70%),
    radial-gradient(40% 30% at 0% 60%, rgba(72, 41, 13, 0.25), transparent 70%),
    radial-gradient(40% 30% at 100% 80%, rgba(72, 41, 13, 0.25), transparent 70%),
    #050403;
  background-attachment: fixed;
}

/* ====== App shell — phone frame on desktop ====== */
#app {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
  position: relative;
  z-index: 1;
  width: 100%;
}
.phone-frame {
  width: 100%;
  max-width: 460px;       /* fixed cap across ALL pages for consistency */
  min-height: 100vh;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255,138,61,0.18) 0%, transparent 50%),
    linear-gradient(180deg, #1a1410 0%, #0b0807 60%, #060403 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 92px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Desktop = same mobile column, centered, edge-to-edge vertically (matches Qureka) */
@media (min-width: 600px) {
  body {
    align-items: stretch;
    display: flex;
    justify-content: center;
  }
  #app {
    min-height: 100vh;
    align-items: stretch;
  }
  .phone-frame {
    width: 460px;          /* fixed exact width for consistency */
    max-width: 460px;
    min-height: 100vh;
    border-radius: 0;
    border: 0;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.04),
      0 0 60px rgba(0, 0, 0, 0.55);
  }
}

/* Coin imagery in the phone background */
.phone-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url('/assets/img/bg-coins.svg') center/cover no-repeat;
  opacity: 0.55;
  z-index: 0;
}
.phone-frame > .top-bar,
.phone-frame > .page,
.phone-frame > .install-banner { position: relative; z-index: 1; }
.phone-frame > .bottom-nav { position: absolute; z-index: 30; }
.phone-frame > .backdrop { z-index: 100; }
.phone-frame > .sidebar { z-index: 200; }

/* ====== Header / top bar ====== */
.top-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(14,11,9,0.95) 0%, rgba(14,11,9,0.7) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  flex: 1;
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}
.brand-wordmark {
  height: 44px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(255, 138, 61, 0.4));
}
.icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  transition: var(--transition);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.icon-btn:active { transform: scale(0.94); }
.menu-btn {
  flex-direction: column;
  gap: 4px;
}
.menu-btn .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: 200ms;
}
.menu-btn:hover .bar { background: var(--brand-2); }

/* Wallet pill */
.wallet {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: linear-gradient(135deg, rgba(255,138,61,0.18), rgba(255,179,61,0.10));
  border: 1px solid rgba(255,138,61,0.4);
  border-radius: 999px;
  position: relative;
}
.wallet img {
  width: 28px; height: 28px;
  animation: coin-spin 4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255,205,90,0.5));
}
@keyframes coin-spin {
  0%, 70%   { transform: rotateY(0deg); }
  85%       { transform: rotateY(180deg); }
  100%      { transform: rotateY(360deg); }
}
.wallet-text { display: flex; flex-direction: column; line-height: 1; }
.wallet-label { font-size: 9px; opacity: 0.6; font-weight: 500; }
.wallet-coins {
  font-size: 15px; font-weight: 800;
  background: linear-gradient(180deg, #fff7d0, #ffaa54);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ====== Page container ====== */
.page {
  padding: 14px 14px 20px;
  font-size: 14px;
}
.page-quiz, .page-result, .page-intro, .page-error, .page-auth, .page-legal, .page-rewards, .page-leaderboard, .page-freeentry, .page-home {
  padding: 14px 14px 20px;
}
.page-intro { padding: 0; }
.page > * + * { margin-top: 0; }

/* Ensure consistent heading sizes across pages */
.page h1, .page h2, .page h3 { letter-spacing: -0.01em; }
.page h2 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.page h3 { font-size: 15px; font-weight: 800; margin: 0 0 6px; }

/* ====== Flash messages ====== */
.flash {
  padding: 10px 14px; border-radius: 12px; margin-bottom: 12px;
  font-weight: 600; font-size: 13px;
  animation: slide-down 300ms ease;
}
.flash-success { background: rgba(74, 222, 128, 0.18); border: 1px solid rgba(74,222,128,0.4); color: #a7f3c2; }
.flash-error   { background: rgba(255, 82, 82, 0.18); border: 1px solid rgba(255,82,82,0.4); color: #ffb3b3; }

/* ====== Buttons ====== */
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  font-weight: 700; font-size: 13px;
  font-family: inherit;
  transition: var(--transition); user-select: none;
  text-align: center;
  cursor: pointer;
}
.btn-pill:active { transform: scale(0.96); }
.btn-orange {
  background: linear-gradient(180deg, #ffb878 0%, #ff7a16 50%, #d65800 100%);
  color: #2a1304;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 4px 12px rgba(255, 122, 22, 0.45);
  text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}
.btn-orange:hover { filter: brightness(1.06); }
.btn-white-orange {
  background: #fff;
  color: var(--brand-deep);
  font-weight: 800;
}
.btn-glow {
  position: relative;
  animation: pulse-glow 2.5s ease-in-out infinite;
}
.btn-large { padding: 14px 30px; font-size: 16px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

@keyframes pulse-glow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 12px rgba(255,122,22,0.4); }
  50%      { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 28px rgba(255,122,22,0.85); }
}

/* ====== Install banner ====== */
.install-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, #fff5e6);
  color: #1a1614;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 4px 14px rgba(255, 122, 22, 0.18);
  animation: slide-down 350ms ease;
}
.install-banner.hidden { display: none; }
.install-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; box-shadow: 0 2px 6px rgba(255, 122, 22, 0.3); }
.install-text { flex: 1; font-size: 12px; line-height: 1.3; color: #1a1614; }
.install-text strong { font-weight: 800; }
.install-btn { padding: 7px 14px; font-size: 12px; }
.close-x { color: #1a1614; font-size: 22px; line-height: 1; padding: 0 4px; }

/* ====== Featured card ====== */
.featured-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 14px;
  background:
    radial-gradient(80% 80% at 80% 50%, rgba(255,138,61,0.3), transparent 60%),
    linear-gradient(135deg, #2e1c0e 0%, #1c130a 100%);
  border: 1px solid var(--border-2);
  padding: 18px;
}
.featured-bg {
  position: absolute; inset: 0;
  background: url('/assets/img/promo-coins.svg') right center/auto 110% no-repeat;
  opacity: 0.5;
  pointer-events: none;
}
.featured-content { position: relative; z-index: 1; }
.featured-content h3 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
  font-weight: 700;
}
.featured-prize {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, #fff8dc, #ffaa54);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.prize-coin { font-size: 32px; }
.featured-meta { margin-top: 10px; font-size: 11.5px; opacity: 0.65; font-weight: 500; }
.dot { margin: 0 6px; opacity: 0.5; }

/* ====== Giveaway carousel ====== */
.giveaway-section {
  margin: 8px 0 14px;
  position: relative;
}
.giveaway-track {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.giveaway-track::-webkit-scrollbar { display: none; }

.giveaway-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex; align-items: stretch;
  border-radius: 18px;
  padding: 0;
  position: relative; overflow: hidden;
  text-decoration: none;
  min-height: 130px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    0 10px 28px rgba(0,0,0,0.45);
  transition: transform 220ms ease, box-shadow 220ms ease;
  isolation: isolate;
}
.giveaway-card:active { transform: scale(0.985); }
.giveaway-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 14px 36px rgba(0,0,0,0.55);
}

/* Glossy highlight + radial accent */
.giveaway-card::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 100% at 100% 50%, rgba(255,255,255,0.18) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, transparent 35%, rgba(0,0,0,0.20) 100%);
  pointer-events: none;
  z-index: 2;
}
/* Sparkle dots overlay */
.giveaway-card::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(2px 2px at 25% 25%, rgba(255,255,255,0.5), transparent 50%),
    radial-gradient(2px 2px at 75% 70%, rgba(255,255,255,0.4), transparent 50%),
    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.5), transparent 50%),
    radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.4), transparent 50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

.giveaway-text {
  flex: 1;
  z-index: 3;
  color: #fff;
  padding: 16px 4px 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.giveaway-pill {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 9px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  margin-bottom: 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.giveaway-text h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.giveaway-text p {
  margin: 0 0 10px;
  font-size: 11.5px;
  opacity: 0.95;
  line-height: 1.3;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.giveaway-cta {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px;
  background: linear-gradient(180deg, #ffd58a 0%, #ff7a16 100%);
  border-radius: 999px;
  color: #2a1304;
  font-size: 11px; font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 3px 10px rgba(255,122,22,0.45);
  align-self: flex-start;
  transition: 200ms;
}
.giveaway-card:hover .giveaway-cta {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 4px 14px rgba(255,122,22,0.6);
}

/* Image side */
.giveaway-imgwrap {
  width: 150px;
  flex-shrink: 0;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.giveaway-imgwrap::before {
  content: '';
  position: absolute;
  inset: -10% 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,0.25) 0%, transparent 60%);
  pointer-events: none;
}
.giveaway-img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.55));
  position: relative;
  z-index: 1;
  margin-right: -10px;
  transform: scale(1.05);
  transition: transform 280ms cubic-bezier(.4,0,.2,1);
}
.giveaway-card:hover .giveaway-img {
  transform: scale(1.12) rotate(-2deg);
}
.giveaway-emoji {
  font-size: 64px; line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5));
}

/* Dots */
.giveaway-dots {
  display: flex; gap: 6px;
  justify-content: center;
  margin-top: 8px;
}
.giveaway-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  cursor: pointer;
  transition: 250ms;
}
.giveaway-dot.active {
  background: linear-gradient(90deg, #ffd58a, #ff7a16);
  width: 22px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(255,122,22,0.4);
}

/* ====== Category tabs ====== */
.tabs.scroll-x {
  display: flex; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  margin: 14px 0 14px;
  padding-bottom: 4px;
}
.tabs.scroll-x::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 700;
  color: #fff;
  white-space: nowrap;
  transition: var(--transition);
  font-family: inherit;
}
.tab.active {
  background: #fff;
  color: #1a0f08;
  border-color: #fff;
}

/* ====== Contest cards ====== */
.contest-list { display: flex; flex-direction: column; gap: 10px; }
.cat-pane { display: none; }
.cat-pane.active { display: flex; }
.contest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: var(--transition);
}
.contest-card:active { transform: scale(0.995); }
.contest-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.contest-name { font-weight: 700; font-size: 13px; }
.live-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--green);
  font-weight: 700;
}
.live-dot span {
  width: 6px; height: 6px; background: var(--green); border-radius: 50%;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
  50%      { opacity: 0.7; box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}
.contest-body {
  display: flex; align-items: center; gap: 12px;
}
.contest-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, rgba(255,138,61,0.16), rgba(255,138,61,0.04));
  border: 1px solid rgba(255,138,61,0.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.contest-info { flex: 1; }
.contest-label { font-size: 11px; font-weight: 600; opacity: 0.75; }
.contest-prize {
  font-size: 18px; font-weight: 800;
  background: linear-gradient(180deg, #fff8dc, #ffaa54);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}
.contest-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding-top: 8px;
  font-size: 10.5px; opacity: 0.65;
  border-top: 1px dashed rgba(255,255,255,0.06);
}
.empty {
  text-align: center; padding: 28px 16px;
  color: var(--muted); font-size: 13px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
}

/* ====== Sidebar drawer (contained inside phone-frame) ====== */
.sidebar {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 88%; max-width: 320px; z-index: 200;
  background: linear-gradient(180deg, #21181a 0%, #110b0a 100%);
  border-right: 1px solid rgba(255,255,255,0.1);
  transform: translateX(-105%);
  transition: transform 280ms cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  will-change: transform;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}
.sidebar.open { transform: translateX(0); }
.sidebar-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px 16px;
  background: linear-gradient(135deg, rgba(255,138,61,0.22), rgba(255,179,61,0.06));
  border-bottom: 1px solid var(--border);
}
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(180deg, #ffaa54, #ff7a16);
  color: #2a1304;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  box-shadow: 0 4px 14px rgba(255,122,22,0.4);
}
.sidebar-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(255, 122, 22, 0.35);
}
.sidebar-name { font-weight: 800; font-size: 15px; color: #fff; }
.sidebar-sub { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 2px; }
.sidebar-login-link { color: var(--brand-2); font-weight: 700; }
.close-btn {
  position: absolute; top: 10px; right: 10px;
  font-size: 24px; line-height: 1;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.close-btn:hover { background: rgba(255,255,255,0.15); }
.sidebar-nav { display: flex; flex-direction: column; padding: 6px 0; }
.sidebar-link {
  padding: 14px 22px;
  font-size: 14px; font-weight: 600;
  display: block; text-align: left; width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
  font-family: inherit;
  color: #fff;
  background: transparent;
  text-decoration: none;
  letter-spacing: -0.005em;
}
.sidebar-link:hover {
  background: linear-gradient(90deg, rgba(255,138,61,0.12), transparent);
  color: var(--brand-2);
  padding-left: 26px;
}
.sidebar-link.logout-btn { color: var(--red); }
.sidebar-link.logout-btn:hover { color: #ff8585; background: rgba(255,82,82,0.08); }
.backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  z-index: 99; opacity: 0; pointer-events: none;
  transition: opacity 220ms;
  cursor: pointer;
}
.backdrop.open { opacity: 1; pointer-events: auto; }

/* Force sidebar into its own compositing layer for crisp text */
.sidebar {
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0) translateX(-105%);
}
.sidebar.open { transform: translateZ(0) translateX(0); }

/* ====== Bottom nav (WHITE like Qureka) ====== */
.bottom-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  z-index: 30;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.3);
  padding: 8px 0 10px;
}
.nav-item {
  padding: 4px 4px; text-align: center;
  font-size: 10px; font-weight: 700;
  color: #6b6b6b;
  transition: var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
}
.nav-item.active { color: var(--brand-deep); }
.nav-item:active { transform: scale(0.94); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-center {
  position: relative; top: -22px;
  color: var(--brand-deep);
}
.nav-center .nav-icon {
  width: 50px; height: 50px;
  background: linear-gradient(180deg, #ffd58a, #ff7a16);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.4),
    0 6px 14px rgba(255,122,22,0.5);
  border: 4px solid #fff;
}
.nav-center .nav-label { margin-top: -3px; }

/* ====== Screen header ====== */
.screen-header {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 14px;
  font-weight: 700;
}
.back-arrow {
  font-size: 20px; line-height: 1;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.back-arrow:active { transform: scale(0.94); }
.contest-icon-sm { font-size: 18px; }
.lb-period {
  margin-left: auto;
  background: transparent; color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 999px; padding: 4px 10px;
  font-size: 12px; font-weight: 700;
  font-family: inherit;
}

/* ====== Quiz play ====== */
.quiz-wrap { display: flex; flex-direction: column; gap: 12px; }
.quiz-header { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.quiz-meta {
  display: flex; justify-content: space-between;
  font-size: 12.5px; font-weight: 700;
}
.q-counter, .q-score {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px;
}
.q-pips {
  display: flex; gap: 4px; overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.q-pips::-webkit-scrollbar { display: none; }
.q-pip {
  width: 26px; height: 26px;
  border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  transition: var(--transition);
}
.q-pip.current {
  background: linear-gradient(180deg, #ffd58a, #ff7a16);
  color: #2a1304;
  border-color: transparent;
  box-shadow: 0 0 12px rgba(255,122,22,0.6);
}
.q-pip.correct {
  background: linear-gradient(180deg, #6cf094, #1ea453);
  color: #052b13;
  border-color: transparent;
}
.q-pip.wrong   {
  background: linear-gradient(180deg, #ff8585, #c93535);
  color: #fff;
  border-color: transparent;
}
.q-timer-wrap {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.q-timer-bar {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #ffaa54, #ff7a16, #ff4a00);
  transition: width 1s linear;
  box-shadow: 0 0 8px rgba(255,122,22,0.5);
}
.timer-icon {
  position: absolute; right: -6px; top: -10px;
  font-size: 18px;
}
.quiz-card {
  background: linear-gradient(180deg, #ffffff 0%, #fff8ec 100%);
  color: #1a1614;
  border-radius: 22px;
  padding: 22px 18px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.4);
  animation: card-pop 280ms ease;
}
@keyframes card-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.q-text { font-size: 16px; font-weight: 800; margin-bottom: 18px; line-height: 1.35; color: #2a1304; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px 13px 8px;
  background: linear-gradient(180deg, #fffaef 0%, #ffe5b8 100%);
  border-radius: 999px;
  font-size: 14px; font-weight: 700;
  text-align: left;
  transition: var(--transition);
  border: 2px solid transparent;
  color: #2a1304;
  font-family: inherit;
  cursor: pointer;
}
.q-opt:active { transform: scale(0.985); }
.opt-letter {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd58a, #ff9c4e);
  color: #2a1304;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.q-opt.correct {
  background: linear-gradient(180deg, #b6fcc7, #4ade80);
  border-color: #1ea453;
}
.q-opt.correct .opt-letter { background: linear-gradient(180deg, #b6fcc7, #1ea453); color: #052b13; }
.q-opt.wrong {
  background: linear-gradient(180deg, #ffc1c1, #ff7474);
  border-color: #ff5252;
}
.q-opt.wrong .opt-letter { background: linear-gradient(180deg, #ffc1c1, #c93535); color: #fff; }
.q-opt[disabled] { pointer-events: none; opacity: 0.95; }

/* ====== Result screen ====== */
.result-wrap { text-align: center; padding-top: 30px; }
.result-burst {
  font-size: 88px;
  animation: result-burst 600ms cubic-bezier(.34,1.56,.64,1);
}
@keyframes result-burst {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.result-title {
  font-size: 30px; font-weight: 800; margin: 8px 0 20px;
  background: linear-gradient(180deg, #ffd58a, #ff7a16);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px; margin: 0 auto 20px;
  text-align: left;
}
.result-line {
  display: flex; justify-content: space-between;
  padding: 6px 0; font-size: 14px;
}
.result-line strong { font-weight: 800; font-size: 16px; }
.result-bonus {
  color: var(--brand);
  margin-top: 6px; padding-top: 10px;
  border-top: 1px dashed rgba(255,138,61,0.3);
}
.result-cta { margin-top: 16px; }
.mt-12 { margin-top: 12px; }

/* ====== Free entry screen ====== */
.entry-banner {
  height: 140px;
  background: linear-gradient(135deg, #4f6dff, #6b54ff);
  border-radius: var(--radius);
  margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.entry-banner::after {
  content: ''; position: absolute; inset: 0;
  background: url('/assets/img/promo.svg') center/contain no-repeat;
}
.entry-card {
  background: linear-gradient(180deg, #fffaef 0%, #ffe5b8 100%);
  color: #1a1614;
  border-radius: 22px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}
.entry-coin { width: 64px; height: 64px; margin: 0 auto 8px; }
.entry-prize {
  font-size: 42px; font-weight: 800;
  background: linear-gradient(180deg, #d97000, #8a4500);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.entry-label { font-size: 14px; margin: 4px 0 16px; color: #6b4a30; font-weight: 600; }
.entry-rules {
  list-style: none; padding: 0; margin: 16px 0 0;
  text-align: left; font-size: 13px; color: #2a1304;
}
.entry-rules li { padding: 4px 0; }
.link-orange { color: var(--brand); font-weight: 700; }
.muted-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 14px;
  font-size: 13px;
}
.muted-card ul { padding: 0; margin: 0; list-style: none; }
.muted-card li { padding: 4px 0; }

/* ====== Leaderboard ====== */
.lb-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.lb-tab {
  flex: 1; padding: 9px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700;
  color: #fff;
  font-family: inherit;
}
.lb-tab.active { background: #fff; color: #1a0f08; }
.lb-podium {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 6px;
  padding: 30px 8px 0;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255,138,61,0.18), transparent 60%);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.podium-person {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; max-width: 110px;
}
.podium-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px;
  margin-bottom: 6px;
  color: #fff;
}
.podium-avatar.gold {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(255,208,90,0.6);
}
.crown { font-size: 22px; margin-bottom: -8px; filter: drop-shadow(0 4px 6px rgba(255,200,0,0.5)); }
.podium-name { font-size: 12px; font-weight: 700; }
.podium-coins { font-size: 11px; opacity: 0.85; margin-bottom: 6px; color: var(--brand-2); font-weight: 700; }
.podium-block {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 800;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.2);
}
.b1 { height: 100px; background: linear-gradient(180deg, #ff8a3d, #d65800); }
.b2 { height: 78px;  background: linear-gradient(180deg, #4cb1ff, #2e7fcb); }
.b3 { height: 62px;  background: linear-gradient(180deg, #4ade80, #1c9b4f); }
.lb-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-row {
  display: grid; grid-template-columns: 50px 1fr 80px;
  align-items: center;
  padding: 10px 14px; gap: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.lb-row:last-child { border-bottom: 0; }
.lb-head { font-weight: 700; opacity: 0.7; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.lb-rank { font-weight: 800; }
.lb-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.lb-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.lb-coins { color: var(--brand-2); font-weight: 800; }

/* ====== Reward Store ====== */
.store-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.store-tab {
  flex: 1; text-align: center;
  padding: 9px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700;
  color: #fff;
}
.store-tab.active { background: #fff; color: #1a0f08; }
.rewards-list { display: flex; flex-direction: column; gap: 12px; }
.reward-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fff8ec 100%);
  border-radius: 16px;
  padding: 14px;
  color: #1a1614;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
.reward-info { flex: 1; }
.reward-rank { color: var(--brand-deep); font-weight: 800; font-size: 13px; }
.reward-name { font-size: 14px; margin: 6px 0; color: #2a1304; }
.reward-name strong { color: #1a0f08; }
.reward-claim-label { font-size: 11px; opacity: 0.7; color: #6b4a30; }
.reward-cost-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 7px 16px;
  background: linear-gradient(180deg, #ffefc7, #ffd58a);
  color: #2a1304;
  border-radius: 999px;
  font-size: 12px; font-weight: 800;
  border: 1px solid #f5be57;
  font-family: inherit;
  cursor: pointer;
}
.reward-cost-pill:hover { filter: brightness(1.04); }
.reward-img { width: 70px; height: 70px; flex-shrink: 0; }
.reward-img img { width: 100%; height: 100%; object-fit: contain; }
.reward-emoji { font-size: 50px; }
.claim-form { margin: 0; padding: 0; }

/* ====== Intro screens ====== */
.intro-screen {
  text-align: center; padding: 40px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 80vh;
  position: relative; overflow: hidden;
}
.intro-logo img {
  width: 130px;
  margin-bottom: 6px;
  border-radius: 30px;
  filter: drop-shadow(0 12px 36px rgba(255,138,61,0.5));
}
.intro-wordmark {
  height: 60px;
  width: auto;
  margin: 4px 0 8px;
  filter: drop-shadow(0 4px 14px rgba(255, 215, 0, 0.35));
}
.intro-tag {
  font-size: 13.5px; font-weight: 700;
  margin-bottom: 30px; letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff, #ffd58a);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.intro-coins { position: absolute; inset: 0; pointer-events: none; }
.coin-rain {
  position: absolute; top: -50px;
  font-size: 32px;
  animation: coin-fall 4s linear infinite;
}
.coin-rain.c2 { left: 20%; animation-delay: 1s;   font-size: 26px; }
.coin-rain    { left: 40%; animation-delay: 0s; }
.coin-rain.c3 { left: 60%; animation-delay: 2s;   font-size: 30px; }
.coin-rain.c4 { left: 80%; animation-delay: 0.5s; font-size: 24px; }
@keyframes coin-fall {
  0%   { transform: translateY(-50px) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}
.intro-q { padding: 20px 8px; }
.intro-q h2 {
  font-size: 22px; margin: 8px 0 4px; font-weight: 800;
}
.muted { opacity: 0.7; font-size: 13px; }
.center { text-align: center; }
.q-card {
  background: linear-gradient(180deg, #ffffff 0%, #fff8ec 100%);
  color: #1a1614;
  border-radius: 22px;
  padding: 18px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  margin: 16px 0;
}
.rules-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.rules-card h3 { color: var(--brand); margin: 0 0 8px; font-size: 14px; font-weight: 800; }
.rules-card ul { padding: 0; margin: 0; list-style: none; font-size: 12px; }
.rules-card li { padding: 3px 0; }

/* ====== Auth ====== */
.auth-wrap { padding: 20px 12px; }
.auth-logo { text-align: center; margin: 8px 0 16px; }
.auth-logo img {
  width: 90px;
  border-radius: 22px;
  filter: drop-shadow(0 8px 24px rgba(255,138,61,0.4));
}
.auth-title { text-align: center; font-size: 22px; margin: 0 0 6px; font-weight: 800; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.auth-form label { display: block; }
.auth-form label span {
  display: block; font-size: 12px; font-weight: 700;
  margin-bottom: 6px; opacity: 0.85;
}
.auth-form input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff; font-size: 14px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.auth-form input:focus { border-color: var(--brand); background: rgba(255,255,255,0.08); }
.auth-foot {
  display: flex; justify-content: center; gap: 6px;
  font-size: 13px; margin-top: 14px;
  flex-wrap: wrap;
}
.auth-foot.small { font-size: 11px; opacity: 0.7; }

/* ====== Legal pages ====== */
.legal-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.legal-tab {
  flex: 1; padding: 9px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700;
  color: #fff;
  font-family: inherit;
}
.legal-tab.active { background: #fff; color: #1a0f08; }
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  font-size: 13px; line-height: 1.65;
}
.legal-card h3 { color: var(--brand); font-size: 15px; margin: 14px 0 6px; font-weight: 800; }
.bullet-list { padding: 0; margin: 0; list-style: none; }
.bullet-list li { padding: 4px 0; }

/* ====== Error page ====== */
.error-screen {
  text-align: center;
  padding: 40px 20px;
  display: flex; flex-direction: column; align-items: center;
  min-height: 80vh; justify-content: center;
}
.error-logo {
  width: 100px;
  border-radius: 24px;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 24px rgba(255,138,61,0.35));
}
.error-wordmark { height: 50px; margin-top: 18px; opacity: 0.85; }
.error-code { font-weight: 700; margin-bottom: 16px; }
.error-title {
  font-size: 30px; font-weight: 800;
  background: linear-gradient(180deg, #ffd58a, #ff7a16);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1; margin-bottom: 20px;
}
.error-title span { color: #ffaa54; }
.error-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ====== Animations ====== */
@keyframes slide-down {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ====== Profile page ====== */
.profile-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(255,138,61,0.15), rgba(255,138,61,0.04));
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 24px 16px 20px;
  margin-bottom: 16px;
  position: relative;
}
.profile-avatar {
  width: 80px; height: 80px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd58a, #ff7a16);
  color: #2a1304;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 36px;
  box-shadow: 0 8px 22px rgba(255,122,22,0.5);
}
.profile-name {
  font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap;
}
.profile-badge {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(74,222,128,0.18);
  color: #6cf094;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-badge.guest { background: rgba(255,138,61,0.18); color: var(--brand-2); }
.profile-sub { font-size: 12.5px; opacity: 0.75; margin-top: 4px; }

.profile-coin-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(255,213,90,0.12), rgba(255,138,61,0.08));
  border: 1px solid rgba(255,213,90,0.3);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 16px;
  text-align: left;
}
.profile-coin-emoji { font-size: 32px; }
.profile-coin-label { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }
.profile-coin-amount {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(180deg, #fff8dc, #ffaa54);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  flex: 1;
}
.profile-coin-link { color: var(--brand-2); font-weight: 700; font-size: 13px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.profile-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
}
.profile-stat-icon { font-size: 26px; margin-bottom: 4px; }
.profile-stat-value { font-size: 18px; font-weight: 800; color: #fff; }
.profile-stat-label { font-size: 11px; opacity: 0.7; margin-top: 2px; }

.section { margin-bottom: 18px; }

.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.recent-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,138,61,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.recent-info { flex: 1; min-width: 0; }
.recent-name { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta { font-size: 11px; opacity: 0.65; margin-top: 2px; }
.recent-coin {
  font-weight: 800; font-size: 13.5px;
  color: var(--brand-2);
}

.profile-actions {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.action-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600;
  background: transparent;
  border-left: 0; border-right: 0; border-top: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
}
.action-row:last-child { border-bottom: 0; }
.action-row:hover { background: rgba(255,255,255,0.04); }
.action-row.primary { color: var(--brand-2); background: linear-gradient(90deg, rgba(255,138,61,0.1), transparent); }
.action-row.danger { color: var(--red); }
.action-icon { font-size: 22px; width: 26px; }
.action-arrow { margin-left: auto; opacity: 0.5; font-size: 16px; }

.empty-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
}
.empty-icon { font-size: 48px; margin-bottom: 8px; }
.empty-title { font-weight: 800; font-size: 15px; }
.empty-sub { font-size: 12.5px; opacity: 0.65; margin-top: 4px; }

/* ====== Refer & Earn ====== */
.refer-hero {
  text-align: center;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(255,138,61,0.18), transparent 70%);
}
.refer-hero-icon { font-size: 64px; margin-bottom: 10px; }
.refer-hero-title {
  font-size: 26px; font-weight: 800; line-height: 1.1;
  background: linear-gradient(180deg, #ffd58a, #ff7a16);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 8px;
}
.refer-hero-sub { font-size: 13px; opacity: 0.85; max-width: 320px; margin: 0 auto; }

.refer-locked {
  text-align: center;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin: 16px 0;
}
.refer-locked-icon { font-size: 44px; margin-bottom: 8px; }
.refer-locked p { margin: 0 0 14px; opacity: 0.85; }

.refer-code-card {
  background: linear-gradient(135deg, #fff8ec 0%, #ffe5b8 100%);
  color: #2a1304;
  border-radius: 18px;
  padding: 18px 16px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.refer-code-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; }
.refer-code-box {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 10px 0 14px;
}
.refer-code {
  font-family: 'Courier New', monospace;
  font-size: 26px; font-weight: 900;
  background: rgba(255,255,255,0.6);
  padding: 8px 16px;
  border-radius: 10px;
  letter-spacing: 0.08em;
  color: #b8480a;
}
.refer-copy-btn {
  background: #2a1304;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: 200ms;
}
.refer-share-row { margin: 10px 0 14px; }
.refer-share-btn { font-size: 14px; padding: 12px 24px; }
.refer-channels {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap;
}
.refer-ch {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.5);
  color: #2a1304;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  text-decoration: none;
}
.refer-ch:hover { background: rgba(255,255,255,0.8); }

.refer-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin: 16px 0;
}
.refer-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}
.refer-stat-value {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(180deg, #fff8dc, #ffaa54);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.refer-stat-label { font-size: 11px; opacity: 0.7; margin-top: 2px; }

.refer-howto { margin-top: 16px; }
.step {
  display: flex; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.step-num {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd58a, #ff7a16);
  color: #2a1304;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.step strong { display: block; font-size: 13.5px; }
.step p { margin: 2px 0 0; font-size: 12px; opacity: 0.75; line-height: 1.4; }

/* ====== Wallet ====== */
.wallet-card {
  background: linear-gradient(135deg, rgba(255,213,90,0.18), rgba(255,138,61,0.08));
  border: 1px solid rgba(255,213,90,0.35);
  border-radius: 18px;
  padding: 20px 16px;
  margin-bottom: 16px;
  text-align: center;
}
.wallet-balance-label {
  font-size: 11px; opacity: 0.7;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.wallet-balance-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 8px 0;
}
.wallet-balance-icon { width: 48px; height: 48px; }
.wallet-balance-amount {
  font-size: 38px; font-weight: 800;
  background: linear-gradient(180deg, #fff8dc, #ffaa54);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wallet-totals {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 12px;
}
.wallet-total {
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  padding: 8px;
  font-size: 11px;
}
.wallet-total span { display: block; opacity: 0.75; }
.wallet-total strong { font-size: 14px; font-weight: 800; }
.wallet-total.earned strong { color: var(--green); }
.wallet-total.spent  strong { color: var(--red); }

.tx-list { display: flex; flex-direction: column; gap: 6px; }
.tx-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.tx-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.tx-icon.positive { background: rgba(74,222,128,0.18); color: var(--green); }
.tx-icon.negative { background: rgba(255,82,82,0.18); color: var(--red); }
.tx-info { flex: 1; min-width: 0; }
.tx-reason { font-weight: 600; font-size: 13px; }
.tx-amount {
  font-weight: 800; font-size: 14px;
}
.tx-amount.positive { color: var(--green); }
.tx-amount.negative { color: var(--red); }

/* ====== Recent Winners ====== */
.winners-hero {
  text-align: center; padding: 14px 0 18px;
}
.winners-hero-icon { font-size: 48px; margin-bottom: 6px; }
.winners-hero h2 {
  background: linear-gradient(180deg, #ffd58a, #ff7a16);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 22px; margin: 0 0 4px;
}
.winners-list { display: flex; flex-direction: column; gap: 8px; }
.winner-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.winner-row.top-three {
  background: linear-gradient(135deg, rgba(255,138,61,0.18), rgba(255,138,61,0.05));
  border-color: rgba(255,138,61,0.35);
}
.winner-rank {
  width: 50px; flex-shrink: 0;
  font-weight: 800;
  font-size: 13px;
}
.winner-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.winner-info { flex: 1; min-width: 0; }
.winner-name { font-weight: 700; font-size: 13.5px; }
.winner-meta { font-size: 11px; opacity: 0.7; }
.winner-coins {
  font-weight: 800; font-size: 14px;
  color: var(--brand-2);
}

/* ====== Guest Sign-in promo modal ====== */
.guest-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 250ms;
}
.guest-modal.show { opacity: 1; pointer-events: auto; }
.guest-modal-card {
  background: #fff;
  color: #1a1614;
  border-radius: 22px;
  width: 100%; max-width: 360px;
  max-height: 90vh; overflow-y: auto;
  padding: 22px 18px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 280ms cubic-bezier(.34,1.56,.64,1);
}
.guest-modal.show .guest-modal-card { transform: scale(1); }
.guest-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  background: rgba(0,0,0,0.06);
  border-radius: 50%;
  font-size: 20px; line-height: 1;
  color: #6b7280;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.guest-modal h2 { margin: 4px 0 4px; font-size: 22px; font-weight: 800; text-align: center; }
.guest-modal h2 b { color: #ff7a16; }
.guest-modal-sub { font-size: 13px; opacity: 0.7; text-align: center; margin: 0 0 14px; }
.guest-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 12px 0;
  border-radius: 12px; overflow: hidden;
  border: 1px solid #f3f4f6;
}
.guest-table th, .guest-table td {
  padding: 9px 8px;
  text-align: center;
  font-size: 12px;
  border-bottom: 1px solid #f3f4f6;
}
.guest-table th { background: #fff5e6; font-weight: 800; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.guest-table th:first-child, .guest-table td:first-child { text-align: left; padding-left: 12px; font-weight: 700; color: #374151; }
.guest-table th.green { color: #047857; }
.guest-table th.red   { color: #b91c1c; }
.guest-table tr:last-child td { border-bottom: 0; }
.guest-yes { color: #16a34a; font-weight: 700; }
.guest-no  { color: #dc2626; font-weight: 700; }
.guest-cta { font-size: 12px; text-align: center; opacity: 0.7; margin: 14px 0 8px; }
.btn-google {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff;
  color: #1a1614;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: 180ms;
  text-decoration: none;
}
.btn-google:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(-1px); }
.btn-google img { width: 22px; height: 22px; }
.btn-phone {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, #ffaa54, #ff7a16);
  color: #2a1304;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px; font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  margin-top: 10px;
  text-decoration: none;
}

/* ====== Safe area for iOS notch / Android nav ====== */
@supports (padding: max(0px)) {
  .phone-frame { padding-bottom: max(92px, calc(92px + env(safe-area-inset-bottom))); }
  .bottom-nav  { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
