/* ============================================================================
   Retention modules — Prestige (Ascension), Quests (Contracts), City Lottery.
   Scoped to the new screens/ids; reuses tokens from styles.css.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   PRESTIGE / ASCENSION
   --------------------------------------------------------------------------- */
.prestige-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-mid);
  padding: var(--space-8);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(167, 139, 250, 0.18) 0%, transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(236, 72, 153, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-3) 0%, var(--bg-1) 100%);
  box-shadow: var(--shadow-lg);
}
.prestige-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% -10%, rgba(167, 139, 250, 0.16), transparent 70%);
  pointer-events: none;
}
.prestige-hero-eyebrow {
  position: relative;
  z-index: 1;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 800;
  color: var(--amber-soft);
}
.prestige-hero-title {
  position: relative;
  z-index: 1;
  font-family: 'Instrument Serif', serif;
  font-size: 44px;
  line-height: 1.05;
  margin: 8px 0 6px;
  color: var(--text-0);
}
.prestige-hero-sub {
  position: relative;
  z-index: 1;
  color: var(--text-2);
  font-size: 14px;
  max-width: 520px;
}

.prestige-kpis {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  margin-top: var(--space-6);
}
.prestige-stat {
  background: rgba(8, 6, 18, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.prestige-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--text-1);
}
.prestige-stat-value {
  font-family: 'Instrument Serif', serif;
  font-size: 38px;
  color: var(--text-0);
  margin-top: 6px;
  line-height: 1;
}
.prestige-stat.is-mult .prestige-stat-value { color: var(--success); }

/* progress block */
.prestige-progress-wrap {
  position: relative;
  z-index: 1;
  margin-top: var(--space-6);
}
.prestige-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.prestige-progress-head strong { color: var(--text-0); font-weight: 700; }
.prestige-bar {
  height: 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-1);
  border: 1px solid var(--border);
  overflow: hidden;
}
.prestige-bar > #prestige-progress {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--amber-deep) 0%, var(--amber) 55%, var(--pink) 100%);
  box-shadow: 0 0 18px var(--amber-glow);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* keep / reset two-column summary */
.prestige-ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
  margin-top: var(--section-gap);
}
.prestige-ledger .card {
  height: 100%;
}
.prestige-ledger-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  margin-bottom: 12px;
}
.prestige-ledger .keep .prestige-ledger-title { color: var(--success); }
.prestige-ledger .reset .prestige-ledger-title { color: var(--danger); }
.prestige-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.prestige-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-1);
}
.prestige-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 7px;
}
.prestige-list.keep li::before { background: var(--success); box-shadow: 0 0 8px var(--success); }
.prestige-list.reset li::before { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

#prestige-btn {
  margin-top: var(--section-gap);
  width: 100%;
  height: 52px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------------------
   QUESTS / CONTRACTS
   --------------------------------------------------------------------------- */
#quests-daily-reset,
#quests-weekly-reset {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber-soft);
  background: var(--amber-glow);
  border: 1px solid var(--border-mid);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

#quests-daily-grid,
#quests-weekly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: var(--grid-gap);
}

.quest-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: border-color 0.15s, transform 0.15s;
}
.quest-card:hover { border-color: var(--border-mid); transform: translateY(-2px); }
.quest-card.complete {
  border-color: var(--success-border);
  box-shadow: 0 0 0 1px var(--success-border), 0 0 26px rgba(52, 211, 153, 0.12);
}
.quest-card.claimed { opacity: 0.62; }

.quest-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.quest-name {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  color: var(--text-0);
}
.quest-reward {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}
.quest-desc {
  font-size: 12.5px;
  color: var(--text-2);
  min-height: 18px;
}
.quest-bar {
  height: 8px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.quest-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--violet-deep) 0%, var(--violet) 100%);
  box-shadow: 0 0 12px var(--violet-glow);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.quest-card.complete .quest-bar-fill {
  background: linear-gradient(90deg, var(--success) 0%, var(--success) 100%);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}
.quest-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}
.quest-progress {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------
   CITY LOTTERY
   --------------------------------------------------------------------------- */
.lottery-stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-mid);
  padding: var(--space-10) var(--space-8);
  text-align: center;
  background:
    radial-gradient(90% 120% at 50% -20%, rgba(251, 191, 36, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-3) 0%, var(--bg-1) 100%);
  box-shadow: var(--shadow-lg);
}
.lottery-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-1);
  background: var(--bg-1);
  border: 1px solid var(--border-mid);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.lottery-mode-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.lottery-jackpot-label {
  margin-top: var(--space-5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 800;
  color: var(--gold-soft);
}
#lottery-jackpot {
  display: block;
  font-family: 'Instrument Serif', serif;
  font-size: 76px;
  line-height: 1;
  margin: 8px 0 4px;
  color: var(--text-0);
  text-shadow: 0 0 40px rgba(251, 191, 36, 0.25);
}
.lottery-countdown-row {
  font-size: 13px;
  color: var(--text-2);
}
.lottery-countdown-row #lottery-countdown {
  font-weight: 800;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
}

.lottery-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  margin-top: var(--section-gap);
}
.lottery-meta .kpi {
  text-align: left;
}

.lottery-buy {
  margin-top: var(--section-gap);
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.lottery-buy .control-group { flex: 0 0 auto; }
.lottery-qty-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-1);
}
.lottery-qty-field button {
  width: 40px;
  border: none;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s;
}
.lottery-qty-field button:hover { background: var(--bg-4); color: var(--text-0); }
#lottery-qty {
  width: 84px;
  border: none;
  background: transparent;
  color: var(--text-0);
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
  -moz-appearance: textfield;
}
#lottery-qty::-webkit-outer-spin-button,
#lottery-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#lottery-buy-btn {
  flex: 1 1 220px;
  height: 50px;
  font-size: 15px;
}

/* ---------------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .prestige-kpis,
  .lottery-meta { grid-template-columns: 1fr; }
  .prestige-ledger { grid-template-columns: 1fr; }
  .prestige-hero-title { font-size: 34px; }
  #lottery-jackpot { font-size: 54px; }
}
