* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { background: #080c17; min-height: 100vh; min-height: 100dvh; font-family: 'Inter', sans-serif; overflow-x: hidden; }
input, textarea, select { font-size: 16px; }
a, button, [onclick] { touch-action: manipulation; }

/* ── HEADER ── */
.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px 14px;
  background: #080c17;
  position: sticky;
  top: 0;
  z-index: 10;
}

.back-btn {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}

.page-header-text h1 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.page-header-text p {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* ── HERO BANNER ── */
.rewards-hero {
  margin: 4px 16px 20px;
  background: linear-gradient(135deg, #1a0e2e 0%, #0f1a35 50%, #0a1520 100%);
  border: 1px solid rgba(201,162,39,0.2);
  border-radius: 22px;
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
}

.rewards-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(201,162,39,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.rewards-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-size: 10px;
  font-weight: 700;
  color: #c9a227;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 6px;
}
.hero-title span {
  background: linear-gradient(90deg, #c9a227, #f0c040);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
}

.hero-stats {
  display: flex;
  gap: 20px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #f0c040;
}
.hero-stat-lbl {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

/* ── SECTION LABEL ── */
.section-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #4b5563;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 0 20px;
  margin-bottom: 12px;
}

/* ── REWARD CARDS ── */
.reward-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 100px;
}

.reward-card {
  position: relative;
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
  border: 1px solid transparent;
  min-height: 90px;
}
.reward-card:active { transform: scale(0.97); }

/* Referral — green */
.card-referral {
  background: linear-gradient(135deg, #0a2218 0%, #0d2d1a 60%, #0a1e14 100%);
  border-color: rgba(34,197,94,0.2);
  box-shadow: 0 4px 24px rgba(34,197,94,0.08);
}
.card-referral::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(34,197,94,0.15) 0%, transparent 70%);
}

/* Roulette — gold */
.card-roulette {
  background: linear-gradient(135deg, #1c1100 0%, #261a00 60%, #1a1200 100%);
  border-color: rgba(201,162,39,0.3);
  box-shadow: 0 4px 24px rgba(201,162,39,0.1);
}
.card-roulette::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(201,162,39,0.2) 0%, transparent 70%);
}

/* Marketplace — purple */
.card-market {
  background: linear-gradient(135deg, #0e0a24 0%, #160f30 60%, #0a0820 100%);
  border-color: rgba(139,92,246,0.2);
  box-shadow: 0 4px 24px rgba(139,92,246,0.07);
}
.card-market::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
}

/* ICON CIRCLE */
.rc-icon {
  width: 58px; height: 58px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.card-referral .rc-icon { background: rgba(34,197,94,0.12); border: 1.5px solid rgba(34,197,94,0.25); }
.card-roulette .rc-icon { background: rgba(201,162,39,0.12); border: 1.5px solid rgba(201,162,39,0.3); }
.card-market .rc-icon   { background: rgba(139,92,246,0.12); border: 1.5px solid rgba(139,92,246,0.25); }

.rc-icon-emoji { font-size: 28px; line-height: 1; }

/* WHEEL MINI ICON */
.mini-wheel {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: conic-gradient(
    #ef4444 0deg 45deg, #22c55e 45deg 90deg,
    #3b82f6 90deg 135deg, #f59e0b 135deg 180deg,
    #8b5cf6 180deg 225deg, #ec4899 225deg 270deg,
    #06b6d4 270deg 315deg, #f97316 315deg 360deg
  );
  border: 2px solid #c9a227;
  box-shadow: 0 0 10px rgba(201,162,39,0.4);
}

/* CARD BODY */
.rc-body {
  flex: 1;
  position: relative; z-index: 1;
  min-width: 0;
}

.rc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 7px;
}
.badge-green  { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.badge-gold   { background: rgba(201,162,39,0.15); color: #f0c040; border: 1px solid rgba(201,162,39,0.3); }
.badge-purple { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  animation: badgePulse 1.8s ease infinite;
}
.badge-green .badge-dot  { background: #4ade80; }
.badge-gold .badge-dot   { background: #f0c040; }
.badge-purple .badge-dot { background: #a78bfa; animation: none; }
@keyframes badgePulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.3; }
}

.rc-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
  line-height: 1.2;
}

.rc-sub {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.rc-earn {
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
}
.card-referral .rc-earn { color: #4ade80; }
.card-roulette .rc-earn { color: #f0c040; }
.card-market .rc-earn   { color: #a78bfa; }

/* ARROW */
.rc-arrow {
  font-size: 22px;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
  position: relative; z-index: 1;
}

/* Shine sweep on roulette card */
.card-roulette::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: cardShine 3s ease infinite;
}
@keyframes cardShine {
  0%   { left: -100%; }
  50%,100% { left: 150%; }
}

/* LOGGED AS */
.logged-as {
  text-align: center;
  font-size: 12px;
  color: #374151;
  padding: 0 0 8px;
}
.logged-as span { color: #4ade80; }

.bnav-item.active { color: #f0c040 !important; }

@media (max-width: 390px) {
  .rewards-hero { padding: 18px 16px; margin: 4px 12px 16px; }
  .hero-title { font-size: 22px; }
  .hero-stat-val { font-size: 18px; }
  .reward-list { padding: 0 12px 100px; gap: 10px; }
  .rc-title { font-size: 15px; }
  .rc-sub { font-size: 11px; }
  .rc-icon { width: 50px; height: 50px; }
}
