/* ==========================================================================
   QuantumFinAI Enhancements Stylesheet
   Gamification, Welcome Prize Reel, Dual Currency, Live Feeds & 5-Step Flow
   ========================================================================== */

/* ---------- Dual Currency Toggle ---------- */
.cur-switch {
  display: inline-flex;
  align-items: center;
  background: var(--card2);
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.cur-switch button {
  border: 0;
  background: transparent;
  color: var(--mut);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cur-switch button.on {
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #ffffff;
}

/* ---------- Live Activity & Live Offers Tickers ---------- */
.live-section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.72);
}
.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 14px;
  padding: 0 5vw;
}
.live-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tx);
}
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--a);
  box-shadow: 0 0 0 0 rgba(79, 140, 255, 0.7);
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(79, 140, 255, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(79, 140, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 140, 255, 0); }
}
.ticker-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 4px 0;
  animation: tickerScroll var(--ticker-dur, 42s) linear infinite;
}
.ticker-viewport:hover .ticker-track {
  animation-play-state: paused;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 9px 14px;
  font-size: 13px;
  white-space: nowrap;
  transition: border-color .2s, transform .2s;
}
.ticker-item:hover {
  border-color: var(--a);
  transform: translateY(-1px);
}
.ticker-amt {
  font-weight: 800;
  color: var(--c);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
}
.ticker-time {
  color: var(--mut);
  font-size: 12px;
}
.ticker-empty {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5vw;
  color: var(--mut);
  font-size: 13px;
}

/* ---------- Live Offers Statistics Grid ---------- */
.offer-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 24px auto 0;
}
.popular-offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 18px auto 0;
}

/* ---------- 5-Step Registration Wizard ---------- */
.reg-wizard {
  max-width: 560px;
  margin: 0 auto;
}
.reg-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 22px;
}
.reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--mut);
  text-align: center;
}
.reg-step i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
  display: grid;
  place-items: center;
  background: var(--card2);
  border: 1px solid var(--line2);
  color: var(--mut);
  transition: all .25s;
}
.reg-step.active i {
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #ffffff;
  border-color: var(--a);
  box-shadow: 0 0 14px rgba(79, 140, 255, 0.35);
}
.reg-step.done i {
  background: rgba(79, 140, 255, 0.2);
  color: #22d3ee;
  border-color: var(--a);
}
.reg-step.active {
  color: var(--tx);
  font-weight: 600;
}
.reg-welcome-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reg-bonus-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #a5f3fc;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(79, 140, 255, 0.14));
  border: 1px solid rgba(34, 211, 238, 0.4);
}
.reg-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: left;
  margin: 6px 0;
}
.reg-hl {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  font-size: 12px;
}
.reg-hl b {
  display: block;
  color: var(--tx);
  margin-bottom: 3px;
  font-size: 13px;
}
.reg-hl span {
  color: var(--mut);
}
.verify-stage {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.verify-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.2), rgba(34, 211, 238, 0.15));
  border: 1px solid rgba(79, 140, 255, 0.45);
}

/* ---------- Interactive Welcome Reward Prize Machine ---------- */
#welcome-reward-modal {
  width: min(680px, 95vw);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 28px 24px;
  background: radial-gradient(circle at 50% -20%, #141c3d, var(--card) 58%);
  border: 1px solid rgba(79, 140, 255, 0.55);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.78), 0 0 40px rgba(79, 140, 255, 0.18);
  text-align: center;
}
.reel-stage {
  position: relative;
  margin: 22px 0 18px;
  padding: 16px 0;
  border-radius: 18px;
  background: #080d1a;
  border: 1px solid var(--line2);
  overflow: hidden;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.75);
}
.reel-stage::before,
.reel-stage::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 3;
  pointer-events: none;
}
.reel-stage::before {
  left: 0;
  background: linear-gradient(90deg, #080d1a, transparent);
}
.reel-stage::after {
  right: 0;
  background: linear-gradient(270deg, #080d1a, transparent);
}
.reel-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--c), var(--a), var(--c));
  z-index: 4;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.85);
}
.reel-pointer::before,
.reel-pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}
.reel-pointer::before {
  top: 0;
  border-top: 10px solid var(--c);
}
.reel-pointer::after {
  bottom: 0;
  border-bottom: 10px solid var(--c);
}
.reel-track {
  display: flex;
  gap: 10px;
  will-change: transform;
  padding-left: 50%;
}
.reel-tile {
  flex: 0 0 116px;
  height: 112px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
}
.reel-tile.tier-low  { border-color: #263354; }
.reel-tile.tier-mid  { border-color: rgba(79, 140, 255, 0.5); background: linear-gradient(180deg, #141c3a, #0e1428); }
.reel-tile.tier-high { border-color: rgba(34, 211, 238, 0.65); background: linear-gradient(180deg, #131a35, #0c1226); }
.reel-tile.tier-rare {
  border-color: #22d3ee;
  background: linear-gradient(135deg, #083344, #141c3a);
  box-shadow: inset 0 0 18px rgba(34, 211, 238, 0.25);
}
.reel-tile.winner {
  border-color: var(--c);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.55);
  transform: scale(1.04);
}
.reel-tile b {
  font-size: 20px;
  color: var(--tx);
}
.reel-tile.tier-rare b { color: #a5f3fc; }
.reel-tile small {
  font-size: 11px;
  color: var(--mut);
}
.reel-result {
  margin: 14px 0 8px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(79, 140, 255, 0.08);
  border: 1px solid rgba(79, 140, 255, 0.35);
  animation: pop .4s both;
}
.reel-result h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #a5f3fc;
}
.odds-box {
  margin-top: 18px;
  text-align: left;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.odds-box summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--mut);
}
.odds-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}
.odds-table th,
.odds-table td {
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.odds-table th {
  color: var(--mut);
  font-weight: 600;
  border-top: 0;
}

/* ---------- Modern Fintech Dashboard Additions ---------- */
.dash-welcome-strip {
  max-width: 1100px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, rgba(16, 23, 44, 0.96), rgba(20, 32, 68, 0.92));
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.level-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line2);
}
.quick-actions {
  max-width: 1100px;
  margin: 0 auto 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.qa-btn {
  flex: 1 1 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: var(--card);
  color: var(--tx);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s;
}
.qa-btn:hover {
  transform: translateY(-2px);
  border-color: var(--a);
  background: #131a33;
}
.qa-btn.primary {
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #ffffff;
  border-color: transparent;
}

/* ---------- Gamification: Check-in Calendar, Progress Bars, Achievements ---------- */
.gami-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.checkin-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.cday {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 4px;
  text-align: center;
  font-size: 11px;
  color: var(--mut);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cday b { font-size: 13px; color: var(--tx); }
.cday.done {
  background: rgba(79, 140, 255, 0.14);
  border-color: var(--a);
  color: #67e8f9;
}
.cday.today {
  border-color: var(--c);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}
.cday.milestone {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.16), var(--card2));
  border-color: rgba(34, 211, 238, 0.55);
}
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.ach-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  opacity: 0.72;
}
.ach-card.unlocked {
  opacity: 1;
  border-color: rgba(79, 140, 255, 0.5);
  background: linear-gradient(135deg, var(--card), rgba(79, 140, 255, 0.06));
}
.ach-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card2);
  border: 1px solid var(--line2);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.prog-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--mut);
  margin-top: 8px;
}
.prog-label b { color: var(--tx); }

/* ---------- Referral Panel ---------- */
.ref-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--card2);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 10px 14px;
  margin: 14px 0;
}
.ref-box input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 4px;
  color: #22d3ee;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

/* ---------- Admin Analytics & Configurator ---------- */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.tier-editor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tier-editor-table th,
.tier-editor-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.tier-editor-table input[type="text"],
.tier-editor-table input[type="number"] {
  width: 100%;
  min-width: 72px;
  padding: 7px 10px;
  font-size: 13px;
}
.ledger-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ---------- Mobile & Reduced Motion ---------- */
@media (max-width: 680px) {
  .reg-highlights { grid-template-columns: 1fr; }
  .reg-step span { display: none; }
  .checkin-days { gap: 4px; }
  .cday { padding: 8px 2px; font-size: 10px; }
  .reel-tile { flex: 0 0 98px; height: 96px; }
  .ref-box { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .ticker-track { animation: none !important; }
  .ticker-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* achievement cards (added: source had no item styles) */
.ach { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line2, #263354); border-radius: 14px; background: var(--card2, #0e1428); opacity: .62; }
.ach.on { opacity: 1; border-color: rgba(79, 140, 255, .5); }
.ach i { font-style: normal; font-size: 22px; }
.ach small, .ach span { color: var(--mut, #9aa6c7); font-size: 12px; }
