:root {
  --primary: #4F46E5;
  --primary-light: #6366F1;
  --gold: #F5A623;
  --gold-light: #FFC55C;
  --bg-deep: #0B0C1E;
  --bg-mid: #12142E;
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.10);
  --text-main: #F3F3FA;
  --text-dim: #9296B5;
  --success: #22C55E;
  --danger: #EF4444;
  --radius-lg: 24px;
  --radius-md: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: radial-gradient(120% 90% at 50% -10%, #22245A 0%, var(--bg-deep) 55%, #050512 100%);
  color: var(--text-main);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

::-webkit-scrollbar { display: none; }

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ===================== Splash ===================== */
.splash {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 20%, #2A2D6B 0%, var(--bg-deep) 60%, #050512 100%);
  transition: opacity .5s ease, visibility .5s ease;
}
.splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo-ring {
  width: 96px; height: 96px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(from 0deg, var(--primary), var(--gold), var(--primary));
  animation: spin 2.2s linear infinite;
  padding: 4px;
}
.splash-logo { width: 100%; height: 100%; border-radius: 50%; background: var(--bg-deep); padding: 14px; }
.splash-title { margin-top: 22px; font-size: 24px; font-weight: 800; letter-spacing: 0.5px; }
.splash-sub { margin-top: 6px; font-size: 13px; color: var(--text-dim); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== App shell ===================== */
.app { padding-bottom: calc(92px + var(--safe-bottom)); min-height: 100vh; opacity: 1; transition: opacity .4s ease; }
.app.hidden { opacity: 0; }

.view { display: none; padding: 18px 18px 8px; animation: fadeUp .35s ease; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== Topbar / Home ===================== */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; border: 2px solid var(--glass-border); background: var(--glass); }
.avatar-lg { width: 76px; height: 76px; border-radius: 20px; }
.tier-badge {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(135deg, #B08D57, #8C6A3C); color: #FFF3DE;
  border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.tier-badge.silver { background: linear-gradient(135deg, #C7CCDA, #9096A8); color: #1B1D2B; }
.tier-badge.gold { background: linear-gradient(135deg, #FFD98C, #F5A623); color: #3A2200; }
.tier-badge.platinum { background: linear-gradient(135deg, #C9E7FF, #6DA8D6); color: #08243A; }
.tier-badge.diamond { background: linear-gradient(135deg, #E9D5FF, #A78BFA, #6366F1); color: #1B1035; }
.user-chip-text { display: flex; flex-direction: column; }
.username { font-weight: 700; font-size: 15px; }
.member-since { font-size: 11px; color: var(--text-dim); }

.balance-pill {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--glass), rgba(255,255,255,0.02));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  padding: 9px 14px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 18px rgba(79,70,229,0.25);
}
.coin-icon { width: 18px; height: 18px; }
.token-symbol { color: var(--gold-light); font-size: 12px; font-weight: 800; }

.boost-chip {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  margin: 0 0 14px; padding: 8px 14px; border-radius: 999px; width: fit-content;
  background: linear-gradient(135deg, rgba(245,166,35,0.16), rgba(245,166,35,0.06));
  border: 1px solid rgba(245,166,35,0.3);
  font-size: 11.5px; font-weight: 700; color: var(--gold-light);
}
.boost-chip.hidden { display: none; }
.boost-flame { font-size: 13px; }

/* ===================== Mining stage ===================== */
.mining-stage { position: relative; display: flex; flex-direction: column; align-items: center; margin: 10px 0 28px; }
.mining-glow {
  position: absolute; top: 20px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.35), rgba(245,166,35,0.12) 55%, transparent 75%);
  filter: blur(18px); pointer-events: none;
  animation: glowBreathe 4s ease-in-out infinite;
}
@keyframes glowBreathe { 0%,100% { opacity: .6; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.05); } }
.mining-ring { position: relative; width: 240px; height: 240px; z-index: 1; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.ring-progress {
  fill: none; stroke: url(#none);
  stroke: var(--gold);
  stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 553; stroke-dashoffset: 553;
  filter: drop-shadow(0 0 8px rgba(245,166,35,0.7));
  transition: stroke-dashoffset 1s linear;
}
.mining-core {
  position: absolute; inset: 14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #2A2D6B, #14163A 70%);
  border: 1px solid var(--glass-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 40px rgba(79,70,229,0.35);
}
.core-coin { width: 56px; height: 56px; animation: pulse 2.6s ease-in-out infinite; filter: drop-shadow(0 0 14px rgba(245,166,35,0.6)); }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.mining-timer { margin-top: 10px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.mining-status-label { margin-top: 2px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.5px; }

.claim-btn {
  position: relative; overflow: hidden;
  margin-top: 26px; width: 100%; max-width: 300px;
  padding: 17px; border-radius: 999px; font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, #3B3D8F, #2A2C5E);
  color: var(--text-dim);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transition: transform .15s ease, box-shadow .2s ease, background .3s ease, color .3s ease;
}
.claim-btn:active { transform: scale(0.97); }
.claim-btn.ready {
  background: linear-gradient(135deg, var(--gold), #FF8A3D);
  color: #201200;
  box-shadow: 0 10px 30px rgba(245,166,35,0.45);
  animation: glowPulse 1.8s ease-in-out infinite;
}
.claim-btn.ready::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg);
  animation: shimmerSweep 2.6s ease-in-out infinite;
}
@keyframes shimmerSweep {
  0% { left: -60%; }
  50% { left: 130%; }
  100% { left: 130%; }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 10px 30px rgba(245,166,35,0.45); }
  50% { box-shadow: 0 10px 42px rgba(245,166,35,0.75); }
}
.claim-btn:disabled { cursor: default; }
.claim-reward-hint { margin-top: 10px; font-size: 12px; color: var(--text-dim); }

/* ===================== Stats grid ===================== */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 16px;
  backdrop-filter: blur(14px);
}
.stat-icon { width: 26px; height: 26px; margin-bottom: 8px; opacity: .9; }
.stat-value { font-size: 18px; font-weight: 800; }
.stat-label { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }
.stat-label #streak-flame { margin-right: 3px; }
.stat-label #streak-flame:empty { margin-right: 0; }

/* ===================== Page headers ===================== */
.page-header { margin-bottom: 18px; }
.page-header h1 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.page-header p { margin: 0; font-size: 13px; color: var(--text-dim); }
.profile-header { display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-header h1 { margin-top: 12px; }
.profile-header p { margin-top: 4px; }

/* ===================== Task list ===================== */
.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 14px;
  backdrop-filter: blur(14px);
}
.task-icon-wrap {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
}
.task-icon-wrap img, .task-icon-wrap svg { width: 22px; height: 22px; }
.task-info { flex: 1; min-width: 0; }
.task-title { font-size: 14.5px; font-weight: 700; }
.task-reward { font-size: 12px; color: var(--gold-light); font-weight: 700; margin-top: 2px; }
.task-btn {
  padding: 9px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  flex-shrink: 0;
}
.task-btn.pending { background: rgba(245,166,35,0.18); color: var(--gold-light); }
.task-btn.completed { background: rgba(34,197,94,0.18); color: var(--success); }

/* ===================== Rank / leaderboard ===================== */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin-bottom: 22px; }
.podium-item { display: flex; flex-direction: column; align-items: center; width: 92px; }
.podium-avatar { width: 54px; height: 54px; border-radius: 16px; border: 2px solid var(--gold); object-fit: cover; background: var(--glass); }
.podium-item.rank-1 .podium-avatar { width: 68px; height: 68px; border-color: var(--gold); }
.podium-name { font-size: 11.5px; font-weight: 700; margin-top: 6px; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-balance { font-size: 11px; color: var(--gold-light); font-weight: 700; }
.podium-bar { margin-top: 8px; width: 100%; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--primary-light), var(--primary)); }
.podium-item.rank-1 .podium-bar { height: 70px; }
.podium-item.rank-2 .podium-bar { height: 50px; }
.podium-item.rank-3 .podium-bar { height: 36px; }

.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.rank-row.me { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.rank-num { width: 22px; text-align: center; font-weight: 800; color: var(--text-dim); font-size: 13px; }
.rank-avatar { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; background: var(--bg-mid); }
.rank-name { flex: 1; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-balance { font-size: 13px; font-weight: 800; color: var(--gold-light); }

/* ===================== Profile action list ===================== */
.action-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.action-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 15px 16px;
  font-size: 14.5px; font-weight: 700; text-align: left;
  backdrop-filter: blur(14px);
}
.action-icon { width: 22px; height: 22px; opacity: .9; }
.chev { margin-left: auto; color: var(--text-dim); font-size: 18px; }

/* ===================== Bottom nav ===================== */
.bottom-nav {
  position: fixed; left: 14px; right: 14px; bottom: calc(14px + var(--safe-bottom));
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(18,20,46,0.85); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 10px 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  transition: opacity .3s ease, transform .3s ease;
  z-index: 100;
}
.bottom-nav.hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 16px; color: var(--text-dim);
  font-size: 10.5px; font-weight: 700; transition: color .2s ease, background .2s ease;
}
.nav-icon { width: 22px; height: 22px; opacity: .65; transition: opacity .2s ease, filter .2s ease; }
.nav-btn.active { color: var(--text-main); background: rgba(79,70,229,0.18); }
.nav-btn.active .nav-icon { opacity: 1; filter: drop-shadow(0 0 6px rgba(99,102,241,0.7)); }

/* ===================== Panels (slide-up sheets) ===================== */
.panel-overlay {
  position: fixed; inset: 0; background: rgba(4,5,15,0.6); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; z-index: 200;
}
.panel-overlay.show { opacity: 1; visibility: visible; }
.panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 201;
  background: linear-gradient(180deg, #171A3E, #0E0F27);
  border: 1px solid var(--glass-border); border-bottom: none;
  border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(28px + var(--safe-bottom));
  transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.9,.25,1);
  max-height: 82vh; overflow-y: auto;
}
.panel.show { transform: translateY(0); }
.panel-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--glass-border); margin: 6px auto 16px; }
.panel h2 { margin: 0 0 16px; font-size: 19px; font-weight: 800; }
.close-panel-btn {
  width: 100%; margin-top: 18px; padding: 14px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-border); font-weight: 700; font-size: 14px;
}

.wallet-summary { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 20px; }
.wallet-balance { font-size: 30px; font-weight: 800; color: var(--gold-light); }
.wallet-balance small { font-size: 14px; color: var(--text-dim); }
.wallet-breakdown { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.wallet-breakdown div { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dim); }
.wallet-breakdown b { color: var(--text-main); }

.form { display: flex; flex-direction: column; gap: 8px; }
.form label { font-size: 12px; color: var(--text-dim); margin-top: 8px; font-weight: 700; }
.form input, .form select {
  padding: 14px; border-radius: 14px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04); color: var(--text-main); font-size: 14px;
}
.form input::placeholder { color: var(--text-dim); }
.hint { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; }
.paused-banner {
  display: none; background: rgba(239,68,68,0.14); border: 1px solid rgba(239,68,68,0.35);
  color: #FFB4B4; border-radius: 14px; padding: 12px 14px; font-size: 12.5px; font-weight: 700;
  margin-bottom: 14px; line-height: 1.5;
}
.paused-banner.show { display: block; }
.primary-btn {
  margin-top: 16px; padding: 15px; border-radius: 16px; text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  font-weight: 800; font-size: 14.5px; box-shadow: 0 8px 22px rgba(79,70,229,0.35);
}

.refer-stats { display: flex; gap: 12px; margin-bottom: 16px; }
.refer-stats > div { flex: 1; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.refer-stats b { display: block; font-size: 20px; font-weight: 800; color: var(--gold-light); }
.refer-stats span { font-size: 11.5px; color: var(--text-dim); }
.refer-link-box { display: flex; gap: 8px; }
.refer-rates { font-size: 11.5px; color: var(--text-dim); text-align: center; margin-bottom: 14px; }
.refer-link-box input { flex: 1; padding: 14px; border-radius: 14px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04); color: var(--text-main); font-size: 12.5px; }
.refer-link-box button { padding: 0 18px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); font-weight: 800; font-size: 13px; }

.mini-history { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; max-height: 340px; overflow-y: auto; }
.mini-history-row { display: flex; justify-content: space-between; align-items: center; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 14px; padding: 12px 14px; }
.mini-history-row .type { font-size: 13px; font-weight: 700; text-transform: capitalize; }
.mini-history-row .date { font-size: 10.5px; color: var(--text-dim); margin-top: 2px; }
.mini-history-row .amount { font-weight: 800; font-size: 13.5px; }
.mini-history-row .amount.pos { color: var(--success); }
.mini-history-row .amount.neg { color: var(--danger); }
.mini-history-row .status { font-size: 10px; text-transform: uppercase; font-weight: 800; letter-spacing: .5px; padding: 3px 8px; border-radius: 999px; margin-left: 8px; }
.status.pending { background: rgba(245,166,35,0.18); color: var(--gold-light); }
.status.approved { background: rgba(99,102,241,0.18); color: var(--primary-light); }
.status.paid { background: rgba(34,197,94,0.18); color: var(--success); }
.status.rejected { background: rgba(239,68,68,0.18); color: var(--danger); }

.settings-list { display: flex; flex-direction: column; gap: 10px; }
.settings-row { display: flex; justify-content: space-between; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 14px; padding: 14px; font-size: 13.5px; }
.settings-row span { color: var(--text-dim); }

.support-text { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }

/* ===================== Toast ===================== */
.toast {
  position: fixed; top: calc(16px + env(safe-area-inset-top, 0px)); left: 50%;
  transform: translateX(-50%) translateY(-140%);
  background: rgba(20,22,50,0.95); border: 1px solid var(--glass-border);
  padding: 12px 20px; border-radius: 14px; font-size: 13px; font-weight: 700;
  z-index: 500; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transition: transform .35s cubic-bezier(.2,.9,.25,1);
  max-width: 86vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(239,68,68,0.5); color: #FFB4B4; }
.toast.success { border-color: rgba(34,197,94,0.5); color: #B8F5CC; }

/* ===================== Empty state ===================== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 13.5px; }
.empty-state.hidden { display: none; }

/* ===================== Ads (Watch & Earn) ===================== */
.ads-card {
  background: linear-gradient(135deg, rgba(245,166,35,0.14), rgba(79,70,229,0.10));
  border: 1px solid rgba(245,166,35,0.3); border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 18px;
}
.ads-card.hidden { display: none; }
.ads-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ads-card-icon { font-size: 28px; }
.ads-card-title { font-size: 15px; font-weight: 800; }
.ads-card-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.ads-progress-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 14px; }
.ads-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--primary-light)); transition: width .3s ease; }
.watch-ad-btn {
  width: 100%; padding: 13px; border-radius: 14px; font-weight: 800; font-size: 14px;
  background: linear-gradient(135deg, var(--gold), #FF8A3D); color: #201200;
  box-shadow: 0 6px 20px rgba(245,166,35,0.35);
}
.watch-ad-btn:disabled { background: rgba(255,255,255,0.06); color: var(--text-dim); box-shadow: none; }

/* ===================== Referral welcome modal ===================== */
.referral-welcome-card {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
  width: 88%; max-width: 340px; background: linear-gradient(180deg, #1E2150, #12142E);
  border: 1px solid var(--glass-border); border-radius: 26px; padding: 32px 26px;
  text-align: center; z-index: 600; opacity: 0; visibility: hidden;
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}
.referral-welcome-card.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.referral-welcome-emoji { font-size: 44px; margin-bottom: 10px; }
.referral-welcome-title { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.referral-welcome-text { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; margin-bottom: 22px; }

/* ===================== Maintenance screen ===================== */
.maintenance-screen {
  position: fixed; inset: 0; z-index: 998;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 30px;
  background: radial-gradient(120% 90% at 50% 20%, #2A2D6B 0%, var(--bg-deep) 60%, #050512 100%);
}
.maintenance-screen.show { display: flex; }
.maintenance-icon { font-size: 46px; margin-bottom: 16px; }
.maintenance-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.maintenance-text { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; max-width: 320px; }

/* ===================== Boost / Upgrade ===================== */
.boost-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.boost-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; padding: 14px;
}
.boost-card.owned { border-color: var(--gold); background: rgba(245, 166, 35, 0.08); }
.boost-name { font-size: 14px; font-weight: 800; }
.boost-effect { font-size: 11.5px; color: var(--gold-light); font-weight: 700; margin-top: 2px; }
.boost-desc { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.boost-buy-btn {
  flex-shrink: 0; background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #1a1300; font-weight: 800; font-size: 12.5px; border: none; border-radius: 12px; padding: 10px 14px;
}
.boost-buy-btn:disabled { opacity: .6; }
.boost-badge {
  flex-shrink: 0; background: var(--gold); color: #1a1300; font-weight: 800; font-size: 11px;
  padding: 6px 12px; border-radius: 999px;
}

/* ===================== Wallet Connect ===================== */
.panel-subheading { font-size: 13px; font-weight: 800; color: var(--text-dim); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .4px; }
.wallet-connect-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
}
.wallet-connect-name { font-size: 13px; font-weight: 700; }
.wallet-connect-address { font-size: 11px; color: var(--text-dim); margin-top: 2px; font-family: monospace; }
.secondary-btn {
  flex-shrink: 0; background: transparent; border: 1px solid var(--primary-light); color: var(--primary-light);
  font-weight: 700; font-size: 12px; border-radius: 10px; padding: 8px 14px;
}

/* ===================== Rank period tabs & winners ===================== */
.period-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.period-tab {
  flex: 1; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-dim);
  font-weight: 700; font-size: 12px; border-radius: 12px; padding: 9px 0;
}
.period-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; border-color: transparent; }
.winners-section { margin-top: 20px; }
.winners-section h3 { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.winners-list { display: flex; flex-direction: column; gap: 8px; }
.winner-row {
  display: flex; align-items: center; gap: 10px; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 10px 12px;
}
.winner-rank { font-weight: 800; color: var(--gold-light); font-size: 12px; width: 24px; }
.winner-avatar { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; background: var(--glass); }
.winner-name { flex: 1; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.winner-reward { font-size: 12px; font-weight: 800; color: var(--success); }

/* ===================== Toggle switch ===================== */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0; background: var(--glass-border);
  border-radius: 999px; transition: background .2s;
}
.toggle-slider::before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ===================== Misc utility ===================== */
#token-listed-note.hidden,
#withdraw-listing-note.hidden,
#withdraw-use-connected.hidden,
#rank-winners-section.hidden { display: none; }
#token-listed-note,
#withdraw-listing-note {
  background: rgba(245, 166, 35, 0.1); border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 12px; padding: 10px 12px; font-size: 11.5px; color: var(--gold-light); margin-bottom: 10px;
}
#withdraw-use-connected a { color: var(--primary-light); }

/* ===================== Maintenance / disabled states ===================== */
.maintenance-state { text-align: center; padding: 50px 24px; }
.maintenance-state.hidden { display: none; }
.maintenance-icon { width: 40px; height: 40px; margin-bottom: 12px; }
.maintenance-title { font-size: 15px; font-weight: 800; color: var(--gold-light); margin-bottom: 6px; }
.maintenance-sub { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

#rank-period-tabs.hidden { display: none; }
#withdraw-active-state.hidden { display: none; }

/* ===================== Connect Wallet profile row ===================== */
.action-status { margin-left: auto; font-size: 11.5px; color: var(--text-dim); font-weight: 700; }
.action-status.connected { color: var(--success); }
