/* Screen 8: Rewards
   Nightlife rewards, not a bank: violet glow, venue imagery, quiet numbers.
   Reuses cards, spots row, sheet pieces and stat lists from earlier screens. */

.rw-scroll {
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: var(--nav-h);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.rw-scroll::-webkit-scrollbar { display: none; }
.rw-header { padding-left: max(16px, env(safe-area-inset-left, 0px)); }
.rw-how-btn {
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px; font-weight: 800; color: var(--accent-light);
}
.rw-content {
  display: flex; flex-direction: column; gap: 18px;
  padding-top: 4px;
  padding-bottom: 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Balance ---------- */
.rw-balance {
  position: relative;
  overflow: hidden;
  padding: 22px 20px 20px;
  border-radius: 28px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(157, 92, 255, 0.4), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(122, 53, 232, 0.25), transparent 70%),
    #120e1c;
  border: 1px solid rgba(185, 139, 255, 0.45);
  box-shadow: 0 0 40px rgba(157, 92, 255, 0.22);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.rw-balance-row { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.rw-coin {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(185, 139, 255, 0.5);
  color: var(--accent-light);
  box-shadow: 0 0 20px rgba(157, 92, 255, 0.4);
}
.rw-coin svg { width: 26px; height: 26px; }
.rw-amount {
  font-family: var(--font-display);
  font-size: 54px; font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(157, 92, 255, 0.45);
}
.rw-float {
  position: absolute; left: 100%; top: -4px;
  margin-left: 8px;
  font-size: 16px; font-weight: 800;
  color: var(--accent-light);
  opacity: 0;
  white-space: nowrap;
}
.rw-float.minus { color: var(--muted); }
.rw-float.show { animation: rw-float 1.4s ease forwards; }
@keyframes rw-float {
  0% { opacity: 0; transform: translateY(8px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}
.rw-available { margin: 0; font-size: 13px; font-weight: 700; color: #d9d5e3; }
.rw-week {
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(157, 92, 255, 0.2);
  border: 1px solid rgba(185, 139, 255, 0.35);
  font-size: 12px; font-weight: 800; color: var(--accent-light);
}

/* ---------- Next reward ---------- */
.rw-next { display: flex; flex-direction: column; gap: 10px; }
.rw-next-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rw-next-title { margin: 4px 0 0; font-size: 16px; font-weight: 800; }
.rw-next-cost { font-size: 20px; font-weight: 800; white-space: nowrap; }
.rw-next-cost small { font-size: 12px; color: var(--muted); font-weight: 700; }
.rw-progress { height: 8px; border-radius: 4px; background: #241f33; overflow: hidden; }
.rw-progress i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #d2b6ff);
  box-shadow: 0 0 12px var(--glow);
  animation: rw-fill 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rw-fill { from { width: 0; } }
.rw-next-left { margin: 0; font-size: 14px; color: #d9d5e3; }
.rw-next-left b { color: var(--accent-light); }
.rw-next-note { margin: -4px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- Earn ---------- */
.rw-earn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rw-earn {
  min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
}
.rw-earn.primary {
  background: linear-gradient(150deg, rgba(157, 92, 255, 0.22), var(--surface) 65%);
  border-color: rgba(185, 139, 255, 0.45);
}
.rw-earn-amount { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--accent-light); }
.rw-earn b { font-size: 13px; font-weight: 800; line-height: 1.3; }
.rw-earn > span:not(.rw-earn-amount):not(.rw-earn-go) { font-size: 12px; color: var(--muted); line-height: 1.35; }
.rw-earn-go { margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--accent-light); }
.rw-earn-go svg { width: 13px; height: 13px; }

/* ---------- Reward cards ---------- */
.rw-list { display: flex; flex-direction: column; gap: 10px; }
.rw-card {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.rw-card-img {
  grid-row: span 2;
  width: 76px; height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: #0d0a14;
  display: grid; place-items: center;
}
.rw-card-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rw-pool-icon { color: var(--accent-light); }
.rw-pool-icon svg { width: 30px; height: 30px; }
.rw-card-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 2px; }
.rw-venue { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-light); text-align: left; }
.rw-venue.plain { color: var(--muted); }
.rw-card-text b { font-size: 16px; font-weight: 800; }
.rw-card-meta { font-size: 12px; color: var(--muted); }
.rw-cost { margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; }
.rw-cost svg { width: 14px; height: 14px; color: var(--accent-light); }
.rw-card-action { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.rw-btn {
  padding: 9px 16px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #b98bff, var(--accent) 65%);
  font-size: 13px; font-weight: 800;
  box-shadow: 0 0 14px rgba(157, 92, 255, 0.35);
}
.rw-btn.ghost { background: none; border: 1px solid var(--accent); color: var(--accent-light); box-shadow: none; }
.rw-short { font-size: 12px; font-weight: 700; color: var(--muted); }
.rw-card.locked .rw-card-img { filter: saturate(0.5) brightness(0.7); }

/* ---------- My rewards ---------- */
.rw-my .vd-section-head { margin-bottom: 4px; }
.rw-group { margin: 10px 0 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.rw-mine { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 0; text-align: left; }
.rw-mine-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3a3350; }
.rw-mine.active .rw-mine-dot { background: var(--accent-light); box-shadow: 0 0 8px var(--accent); }
.rw-mine-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rw-mine-text b { font-size: 14px; font-weight: 800; }
.rw-mine.used .rw-mine-text b { color: var(--muted); }
.rw-mine-text span { font-size: 12px; color: var(--muted); }
.rw-mine-show { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 800; color: var(--accent-light); }
.rw-mine-show svg { width: 14px; height: 14px; }
.rw-mine-empty { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Activity ---------- */
.rw-activity { list-style: none; margin: 0; padding: 0; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.rw-activity li { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 11px 14px; }
.rw-activity li + li { border-top: 1px solid var(--line); }
.rw-activity b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rw-activity li.plus b { color: var(--accent-light); }
.rw-activity li.minus b { color: var(--muted); }
.rw-activity span { font-size: 14px; font-weight: 600; min-width: 0; }
.rw-activity em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- Sheets ---------- */
.rw-confirm { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.rw-confirm-title { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.rw-confirm-venue { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; font-size: 14px; color: #d9d5e3; font-weight: 600; }
.rw-confirm-venue svg { width: 15px; height: 15px; color: var(--accent-light); }
.rw-after { color: var(--accent-light); }
.rw-confirm .cp-sheet-actions { margin-top: 10px; }

.rw-unlocked { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 10px; text-align: center; }
.rw-unlocked .cp-sheet-actions { width: 100%; }
.rw-pass {
  width: 100%; max-width: 300px;
  padding: 18px 18px 14px;
  border-radius: 24px;
  background:
    radial-gradient(100% 70% at 50% 0%, rgba(157, 92, 255, 0.35), transparent 70%),
    #120e1c;
  border: 1px solid rgba(185, 139, 255, 0.5);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.rw-unlocked.fresh .rw-pass { animation: rw-glow 1.4s ease; }
@keyframes rw-glow {
  0% { box-shadow: 0 0 0 rgba(157, 92, 255, 0); transform: scale(0.96); opacity: 0; }
  40% { box-shadow: 0 0 46px rgba(157, 92, 255, 0.6); transform: scale(1); opacity: 1; }
  100% { box-shadow: 0 0 24px rgba(157, 92, 255, 0.3); }
}
.rw-pass-brand { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-light); }
.rw-pass-venue { margin: 8px 0 0; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #d9d5e3; }
.rw-pass-title { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 800; text-transform: uppercase; }
.rw-pass-valid { margin: 2px 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-light); }
.rw-pass-code { padding: 10px; border-radius: 14px; background: #0d0a14; border: 1px solid var(--line); color: #e9e2ff; }
.rw-code { display: block; width: 132px; height: 132px; }
.rw-pass-id { margin: 8px 0 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.rw-pass-note { margin: 0; font-size: 12px; color: var(--muted); max-width: 32ch; }

.rw-how ol { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rw-how li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; }
.rw-how li b {
  flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(185, 139, 255, 0.45);
  font-size: 12px; color: var(--accent-light);
}
.rw-how-note { margin: 0 0 10px !important; font-size: 13px !important; color: var(--muted) !important; }

@media (prefers-reduced-motion: reduce) {
  .rw-progress i, .rw-float.show, .rw-unlocked.fresh .rw-pass { animation: none; }
}
