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

:root {
  --bg: #070510;
  --bg-gradient: radial-gradient(ellipse 80% 50% at 30% -10%, #1a1038 0%, transparent 50%),
                  radial-gradient(ellipse 60% 40% at 70% 100%, #0f0828 0%, transparent 50%),
                  var(--bg);

  --glass-bg: rgba(255, 255, 255, 0.025);
  --glass-bg-strong: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-border-strong: rgba(255, 255, 255, 0.08);
  --glass-shine: rgba(255, 255, 255, 0.04);

  --rose: #ff6b9d;
  --rose-deep: #c44569;
  --rose-glow: rgba(255, 107, 157, 0.35);
  --rose-glow-soft: rgba(255, 107, 157, 0.15);
  --purple: #a855f7;
  --purple-deep: #7c3aed;
  --purple-glow: rgba(168, 85, 247, 0.35);
  --purple-glow-soft: rgba(168, 85, 247, 0.12);
  --cyan: #67e8f9;
  --cyan-glow: rgba(103, 232, 249, 0.25);
  --emerald: #4ade80;
  --emerald-glow: rgba(74, 222, 128, 0.35);
  --amber: #fbbf24;
  --red: #f87171;

  --text: #f2ecf8;
  --text-secondary: rgba(242, 236, 248, 0.45);
  --text-tertiary: rgba(242, 236, 248, 0.2);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-pill: 99px;
}

::selection { background: rgba(168,85,247,0.3); color: #fff; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* NOISE OVERLAY */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 50; opacity: 0.5;
}

/* ── AMBIENT ORBS ──────────────────────── */

#ambient {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}

#ambient .orb {
  position: absolute; border-radius: 50%;
  animation: orbFloat 22s ease-in-out infinite;
}

#ambient .orb:nth-child(1) {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255,107,157,0.08), transparent 70%);
  top: -20%; left: -30%;
  animation-delay: 0s;
}

#ambient .orb:nth-child(2) {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(168,85,247,0.07), transparent 70%);
  bottom: -15%; right: -20%;
  animation-delay: -7s;
}

#ambient .orb:nth-child(3) {
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(103,232,249,0.04), transparent 70%);
  top: 40%; left: 55%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -30px) scale(1.08); }
  50% { transform: translate(-20px, 25px) scale(0.94); }
  75% { transform: translate(30px, 15px) scale(1.03); }
}

/* ── APP SHELL ─────────────────────────── */

#app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
  padding-bottom: 90px;
}

/* ── HEADER ────────────────────────────── */

#header {
  padding: 36px 20px 6px;
  text-align: center;
  position: relative;
}

#header::after {
  content: '';
  position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-glow-soft), var(--rose-glow-soft), transparent);
  pointer-events: none;
}

#header-brand {
  display: inline-flex; align-items: center; gap: 10px;
}

#header-brand-icon {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--rose), var(--purple));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  box-shadow: 0 0 32px var(--rose-glow), 0 0 48px var(--purple-glow);
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 32px var(--rose-glow), 0 0 48px var(--purple-glow); }
  50% { box-shadow: 0 0 48px var(--rose-glow), 0 0 64px var(--purple-glow); }
}

#header-title {
  font-size: 24px; font-weight: 800; letter-spacing: -0.4px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 60%, var(--rose) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

#header-subtitle {
  font-size: 12px; color: var(--text-secondary); margin-top: 2px;
}

/* ── CONTENT ───────────────────────────── */

#content {
  flex: 1; padding: 12px 14px 24px;
  max-width: 440px; margin: 0 auto; width: 100%;
}

.tab { display: none; }
.tab.active {
  display: block;
  animation: tabIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tabIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.section { margin-bottom: 20px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; padding: 0 4px;
}

.section-title {
  font-size: 10px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ── GLASS CARD (base) ─────────────────── */

.glass-card, .glass {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(32px) saturate(1.3);
  -webkit-backdrop-filter: blur(32px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-top-color: rgba(255,255,255,0.06);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.01) 100%);
  pointer-events: none; z-index: 1;
}

.glass-card::after {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), rgba(168,85,247,0.25), rgba(255,255,255,0.1), transparent);
  pointer-events: none; z-index: 2;
}

/* ── PROFILE AVATAR ────────────────────── */

.avatar-wrap {
  position: relative; width: 88px; height: 88px;
  margin: 0 auto 18px;
}

.avatar-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--rose), var(--purple), var(--cyan), var(--rose));
  animation: ringSpin 5s linear infinite;
  opacity: 0.5; filter: blur(2px);
}

@keyframes ringSpin { to { transform: rotate(360deg); } }

.avatar-ring-inner {
  position: absolute; inset: 1px; border-radius: 50%;
  background: var(--bg);
}

.avatar {
  position: relative; z-index: 1;
  width: 100%; height: 100%; border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 36px var(--purple-glow), inset 0 1px 0 rgba(255,255,255,0.1);
}

.avatar img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ── STAT ROW ──────────────────────────── */

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-box {
  position: relative;
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(32px) saturate(1.3);
  -webkit-backdrop-filter: blur(32px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-top-color: rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-box::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent 50%);
  pointer-events: none;
}

.stat-box::after {
  content: '';
  position: absolute; top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
}

.stat-box-glow {
  position: absolute;
  top: -20px; right: -15px;
  width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.3;
}

.stat-box-glow.balance { background: var(--emerald); }
.stat-box-glow.rep { background: var(--rose); }

.stat-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative; z-index: 1;
}

.stat-icon-wrap.balance { background: rgba(74,222,128,0.1); }
.stat-icon-wrap.rep { background: rgba(255,107,157,0.1); }

.stat-info { position: relative; z-index: 1; }
.stat-number { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-caption { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ── STAGE PROGRESS ────────────────────── */

.stage-track {
  width: 100%; height: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.stage-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--rose), var(--purple), var(--cyan));
  background-size: 200% 100%;
  animation: stageShimmer 3s ease-in-out infinite;
  box-shadow: 0 0 18px var(--rose-glow), 0 0 32px var(--purple-glow-soft);
  position: relative;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.stage-fill.stage-fill-done {
  animation: none;
  background-size: 200% 100%;
  background-position: 0 0;
}

.stage-fill.stage-fill-done .stage-shine {
  display: none;
}

@keyframes stageShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.stage-shine {
  position: absolute; top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shineSlide 2.2s ease-in-out infinite;
}

@keyframes shineSlide {
  0% { left: -50%; }
  100% { left: 150%; }
}

/* ── METHOD GRID ───────────────────────── */

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.glass-btn {
  padding: 14px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  border-top-color: rgba(255,255,255,0.06);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  color: var(--text); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center; position: relative; overflow: hidden;
}

.glass-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--purple-glow-soft), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}

.glass-btn::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  opacity: 0; transition: opacity 0.3s;
}

.glass-btn:hover, .glass-btn:active {
  border-color: rgba(168,85,247,0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3), 0 0 20px var(--purple-glow-soft);
}

.glass-btn:hover::before, .glass-btn:hover::after,
.glass-btn:active::before, .glass-btn:active::after { opacity: 1; }
.glass-btn:active { transform: translateY(0) scale(0.97); }

/* ── SUBSCRIPTION CARDS ────────────────── */

.sub-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 18px 20px; margin-bottom: 8px; cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-top-color: rgba(255,255,255,0.06);
  overflow: hidden;
}

.sub-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--purple-glow-soft), transparent 50%);
  opacity: 0; transition: opacity 0.3s; z-index: 0;
}

.sub-card::after {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  pointer-events: none; z-index: 1;
}

.sub-card:last-child { margin-bottom: 0; }

.sub-card:hover, .sub-card:active {
  border-color: rgba(168,85,247,0.2);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 24px var(--purple-glow-soft);
}

.sub-card:hover::before { opacity: 1; }

.sub-card > * { position: relative; z-index: 1; }

.sub-card-left { display: flex; flex-direction: column; gap: 3px; }
.sub-card-name { font-weight: 700; font-size: 15px; }
.sub-card-desc { font-size: 12px; color: var(--text-secondary); }
.sub-card-right { text-align: right; }

.sub-card-price {
  font-weight: 800; font-size: 18px;
  background: linear-gradient(135deg, var(--purple), var(--rose));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.sub-card-badge {
  font-size: 10px; color: var(--text-secondary); margin-top: 2px;
}

.sub-card.active-sub {
  border-color: rgba(168,85,247,0.3);
  background: rgba(168,85,247,0.06);
  box-shadow: 0 0 28px var(--purple-glow-soft);
  pointer-events: none;
}

.sub-card.active-sub::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(168,85,247,0.08), transparent 60%);
}

.sub-card.active-sub .sub-card-price {
  color: var(--purple);
  -webkit-text-fill-color: var(--purple);
}

.sub-card.active-sub .sub-card-name { color: var(--purple); }

.sub-card.trial-sub {
  border-color: rgba(103,232,249,0.3);
  background: rgba(103,232,249,0.04);
  box-shadow: 0 0 24px rgba(103,232,249,0.1);
}

.sub-card.trial-sub .sub-card-name,
.sub-card.trial-sub .sub-card-price {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.sub-card.used-sub {
  opacity: 0.35;
  pointer-events: none;
}

.sub-card.disabled-sub {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

/* ── CHARACTER SLIDERS ─────────────────── */

.char-list { padding: 6px 0; }

.char-item {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  transition: background 0.2s;
}

.char-item:last-child { border-bottom: none; }
.char-item:hover { background: rgba(255,255,255,0.01); }

.char-locked { opacity: 0.5; }

.char-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 500; margin-bottom: 12px;
}

.char-label { display: flex; align-items: center; gap: 8px; }
.char-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.char-value {
  font-size: 14px; font-weight: 700; min-width: 32px; text-align: right;
  color: var(--text);
}

.lock-icon { font-size: 12px; margin-left: 4px; }

.char-track {
  position: relative; height: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
}

.char-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.char-fill::after {
  content: '';
  position: absolute; top: 0; bottom: 0; right: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  border-radius: 3px;
  opacity: 0.5;
}

.char-slider {
  width: 100%; height: 6px;
  -webkit-appearance: none; appearance: none; background: transparent;
  outline: none; position: relative; z-index: 2;
  margin-top: -6px; cursor: pointer;
}

.char-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 20px var(--purple-glow), 0 4px 12px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
}

.char-slider::-webkit-slider-thumb:active {
  transform: scale(1.3);
  box-shadow: 0 0 32px var(--purple-glow), 0 4px 16px rgba(0,0,0,0.5);
}

.char-slider::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 20px var(--purple-glow);
}

/* ── UNLOCK ────────────────────────────── */

.unlock-btn {
  display: block; width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(236,72,153,0.04));
  color: var(--purple);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.unlock-btn:hover {
  background: linear-gradient(135deg, rgba(168,85,247,0.14), rgba(236,72,153,0.07));
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 0 20px var(--purple-glow-soft);
}

.unlock-btn:active { transform: scale(0.98); }

.unlock-all-btn {
  display: block; width: 100%;
  margin: 16px 0;
  padding: 14px 18px;
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(168,85,247,0.12), rgba(236,72,153,0.06));
  color: var(--purple);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.unlock-all-btn:hover {
  background: linear-gradient(135deg, rgba(168,85,247,0.18), rgba(236,72,153,0.1));
  box-shadow: 0 0 24px var(--purple-glow-soft);
  transform: translateY(-2px);
}

/* ── UNLOCK OVERLAY ────────────────────── */

.unlock-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}

.unlock-overlay.show {
  opacity: 1; pointer-events: auto;
}

.unlock-dialog {
  background: rgba(20, 12, 40, 0.85);
  backdrop-filter: blur(48px) saturate(1.5);
  -webkit-backdrop-filter: blur(48px) saturate(1.5);
  border: 1px solid rgba(168,85,247,0.15);
  border-top-color: rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  padding: 28px 24px 20px;
  width: 340px; max-width: 90vw;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 40px var(--purple-glow-soft);
  position: relative;
  overflow: hidden;
}

.unlock-dialog::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.unlock-pay-btn {
  padding: 12px 16px;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
}

.unlock-pay-btn:hover, .unlock-pay-btn:active {
  border-color: rgba(168,85,247,0.25);
  background: rgba(168,85,247,0.08);
  box-shadow: 0 0 16px var(--purple-glow-soft);
}

/* ── PRESETS ───────────────────────────── */

.preset-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.preset-btn {
  padding: 13px 6px;
  border: 1px solid var(--glass-border);
  border-top-color: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative; overflow: hidden;
}

.preset-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--purple-glow-soft), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}

.preset-btn:hover, .preset-btn:active {
  border-color: rgba(168,85,247,0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 16px var(--purple-glow-soft);
}

.preset-btn:hover::before { opacity: 1; }

.preset-hint {
  grid-column: 1 / -1;
  text-align: center; font-size: 12px; color: var(--text-secondary);
  padding: 10px 0 4px; white-space: pre-line; line-height: 1.5;
}

/* ── LEADERBOARD ───────────────────────── */

.top-three {
  display: flex; justify-content: center; align-items: flex-end;
  gap: 14px; margin-bottom: 20px; padding: 24px 0 8px;
}

.top-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  transition: transform 0.3s ease;
}

.top-item:hover { transform: translateY(-6px); }

.top-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--rose));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

.top-1 {
  width: 62px; height: 62px; font-size: 26px;
  box-shadow: 0 0 36px rgba(255,215,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}
.top-2 { width: 52px; height: 52px; font-size: 22px; }
.top-3 { width: 46px; height: 46px; font-size: 20px; }

.top-crown { font-size: 20px; margin-bottom: -6px; }

.top-name {
  font-size: 12px; font-weight: 600; color: var(--text);
  max-width: 72px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; text-align: center;
}

.top-rep {
  font-size: 11px; color: var(--text-secondary);
}

.lb-list { padding: 4px 0; }

.lb-item {
  display: flex; align-items: center;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.lb-item:hover { background: rgba(255,255,255,0.02); }

.lb-rank {
  width: 30px; font-weight: 700; font-size: 12px;
  color: var(--text-tertiary); text-align: center;
}

.lb-name { flex: 1; margin-left: 12px; font-size: 14px; font-weight: 500; }
.lb-name.me { color: var(--purple); font-weight: 700; }

.lb-rep {
  font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, var(--emerald), #34d399);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── SETTINGS ──────────────────────────── */

.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; font-size: 14px; font-weight: 500;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-top-color: rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.setting-row:hover {
  border-color: rgba(168,85,247,0.15);
  background: var(--glass-bg-hover);
}

.setting-hint {
  font-size: 11px; font-weight: 400; color: var(--text-secondary);
  margin-top: 3px; line-height: 1.4;
}

/* ── TOGGLE SWITCH ─────────────────────── */

.switch {
  position: relative; display: inline-block;
  width: 46px; height: 26px; flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,0.06);
  border-radius: 13px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider::before {
  content: "";
  position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

input:checked + .slider {
  background: linear-gradient(135deg, var(--purple), var(--rose));
  box-shadow: 0 0 20px var(--purple-glow);
}

input:checked + .slider::before {
  transform: translateX(20px);
}

/* ── DANGER BUTTON ─────────────────────── */

.danger-btn {
  width: 100%; padding: 16px;
  border: 1px solid rgba(239,68,68,0.12);
  border-radius: var(--radius-md);
  background: rgba(239,68,68,0.03);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  color: var(--red);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.danger-btn:hover, .danger-btn:active {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.2);
  box-shadow: 0 0 24px rgba(239,68,68,0.08);
}

.danger-btn:active { transform: scale(0.98); }

/* ── BOTTOM NAV ────────────────────────── */

#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(7, 5, 16, 0.55);
  backdrop-filter: blur(48px) saturate(1.6);
  -webkit-backdrop-filter: blur(48px) saturate(1.6);
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex; justify-content: space-around;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  z-index: 100;
}

#bottom-nav::before {
  content: '';
  position: absolute; top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  pointer-events: none;
}

.nav-btn {
  display: flex; flex-direction: column; align-items: center;
  background: none; border: none;
  color: var(--text-tertiary);
  font-size: 10px; font-weight: 500;
  cursor: pointer;
  padding: 4px 20px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; gap: 4px;
}

.nav-btn .nav-icon {
  font-size: 24px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn.active {
  color: var(--text);
}

.nav-btn.active .nav-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 12px var(--purple-glow));
}

.nav-btn.active .nav-label {
  color: var(--purple);
}

/* ── TOAST ─────────────────────────────── */

#toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(20, 12, 40, 0.8);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border: 1px solid rgba(168,85,247,0.15);
  border-top-color: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  padding: 14px 28px; font-size: 14px; font-weight: 600;
  color: #fff; z-index: 999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 32px var(--purple-glow-soft);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── AMOUNT DIALOG ─────────────────────── */

#amount-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 300; display: flex;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}

#amount-overlay.show { opacity: 1; pointer-events: auto; }

.amount-dialog {
  background: rgba(20, 12, 40, 0.85);
  backdrop-filter: blur(48px) saturate(1.5);
  -webkit-backdrop-filter: blur(48px) saturate(1.5);
  border: 1px solid rgba(168,85,247,0.15);
  border-top-color: rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  padding: 28px 24px 20px;
  width: 320px; max-width: 85vw;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 40px var(--purple-glow-soft);
  position: relative; overflow: hidden;
}

.amount-dialog::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.amount-title {
  font-size: 18px; font-weight: 700; text-align: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #fff, var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.amount-input {
  width: 100%; padding: 15px 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  color: #fff; font-size: 20px; font-weight: 700;
  text-align: center; outline: none; margin-bottom: 18px;
  transition: all 0.3s ease;
}

.amount-input:focus {
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 0 24px var(--purple-glow-soft);
}

.amount-quick {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px; margin-bottom: 18px;
}

.amount-qbtn {
  padding: 10px 6px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
}

.amount-qbtn:active {
  background: rgba(168,85,247,0.12);
  border-color: rgba(168,85,247,0.3);
  color: #fff;
}

.amount-method-btn {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.amount-method-btn.active {
  background: rgba(168,85,247,0.2); border-color: rgba(168,85,247,0.4);
  color: #c4b5fd;
}
.amount-method-btn:hover { border-color: rgba(255,255,255,0.15); }

.amount-actions { display: flex; gap: 10px; }

.amount-btn {
  flex: 1; padding: 14px;
  border: none; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.amount-cancel {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
}

.amount-confirm {
  background: linear-gradient(135deg, var(--purple), var(--rose));
  color: #fff;
  box-shadow: 0 0 24px var(--purple-glow);
}

.amount-confirm:active { transform: scale(0.96); }

/* ── SCROLLBAR ─────────────────────────── */

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(168,85,247,0.15);
  border-radius: 2px;
}
