/* css/settings.css */

/* ════════════════════════════════════════════════
   SETTINGS PAGE
   ════════════════════════════════════════════════ */
.st-page {
  display: flex; flex-direction: column;
  height: 100%; background: var(--dark);
  overflow: hidden;
}

.st-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

/* ── Profile card ── */
.st-profile-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 20px;
}

.st-profile-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7B5CFF, #D056A0);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
  flex-shrink: 0; overflow: hidden;
}

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

.st-profile-info   { flex: 1; min-width: 0; }
.st-profile-name   { font-weight: 700; font-size: 15px; }
.st-profile-email  { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-profile-role   {
  background: rgba(123,92,255,0.15); color: #a78bfa;
  font-size: 11px; font-weight: 700; border-radius: 100px;
  padding: 4px 12px; white-space: nowrap; text-transform: capitalize;
}

/* ── Section ── */
.st-section { margin-bottom: 20px; }

.st-section-header {
  font-size: 12px; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 4px; margin-bottom: 8px;
}

.st-section-body {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

/* ── Row ── */
.st-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
  transition: background 0.15s;
}

.st-row-btn { cursor: pointer; }
.st-row-btn:hover { background: rgba(255,255,255,0.05); }
.st-row-danger:hover { background: rgba(239,68,68,0.08); }
.st-row-danger .st-row-label { color: #fca5a5; }

.st-row-left {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0;
}

.st-row-label { font-size: 15px; font-weight: 500; }
.st-row-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }

.st-row-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}

.st-icon-grad {
  background: linear-gradient(135deg, var(--g1), var(--g2)) !important;
}

.st-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 0 16px; }

/* ── Toggle ── */
.st-toggle { position: relative; width: 50px; height: 28px; flex-shrink: 0; }
.st-toggle input { opacity: 0; width: 0; height: 0; }

.st-toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s;
}

.st-toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.st-toggle input:checked + .st-toggle-slider { background: #7B5CFF; }
.st-toggle input:checked + .st-toggle-slider::before { transform: translateX(22px); }

/* ── Download buttons ── */
.st-download-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  text-decoration: none; color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.st-download-btn:hover { background: rgba(255,255,255,0.05); }

.st-download-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(52,211,153,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #34d399;
}

.st-icon-ios { background: rgba(255,255,255,0.1); color: var(--text); }

.st-download-badge {
  font-size: 12px; font-weight: 700;
  border-radius: 100px; padding: 5px 14px;
  white-space: nowrap;
}

.st-badge-android { background: rgba(52,211,153,0.15); color: #34d399; }
.st-badge-ios     { background: rgba(255,255,255,0.1);  color: var(--muted); }

/* ════════════════════════════════════════════════
   REFERRAL PAGE
   ════════════════════════════════════════════════ */
.rf-page {
  display: flex; flex-direction: column;
  height: 100%; background: var(--dark);
  overflow: hidden;
}

.rf-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.rf-error {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  padding: 60px 24px; text-align: center;
}

/* ── Code card ── */
.rf-code-card {
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(123,92,255,0.35);
}

.rf-code-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 18px;
}

.rf-qr-box {
  display: inline-flex;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 18px;
}

.rf-qr-inner svg { display: block; }

.rf-code-display {
  font-family: 'Sora', sans-serif;
  font-size: 26px; font-weight: 800;
  letter-spacing: 4px;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 12px 24px;
  margin-bottom: 18px;
  display: inline-block;
}

.rf-code-actions {
  display: flex; gap: 12px; justify-content: center;
}

.rf-action-btn {
  flex: 1; max-width: 140px;
  padding: 12px;
  border: none; border-radius: 12px;
  font-family: 'Sora', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s;
}

.rf-copy-btn  { background: rgba(255,255,255,0.2); color: #fff; }
.rf-share-btn { background: #fff; color: #1d4ed8; }
.rf-action-btn:hover { opacity: 0.85; }

/* ── Stats grid ── */
.rf-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.rf-stat-card {
  border-radius: 16px;
  padding: 16px;
  border: 1px solid;
}

.rf-stat-blue   { background: rgba(59,130,246,0.08);  border-color: rgba(59,130,246,0.2); }
.rf-stat-orange { background: rgba(249,115,22,0.08);  border-color: rgba(249,115,22,0.2); }
.rf-stat-green  { background: rgba(34,197,94,0.08);   border-color: rgba(34,197,94,0.2);  }
.rf-stat-purple { background: rgba(139,92,246,0.08);  border-color: rgba(139,92,246,0.2); }

.rf-stat-icon  { font-size: 24px; margin-bottom: 10px; }
.rf-stat-val   { font-family:'Sora',sans-serif; font-size:26px; font-weight:800; }
.rf-stat-label { font-size:12px; color:var(--muted); margin-top:3px; }

/* ── History ── */
.rf-history-section { margin-bottom: 12px; }

.rf-history-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rf-history-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

.rf-history-info { flex: 1; min-width: 0; }
.rf-history-email { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rf-history-date  { font-size:12px; color:var(--muted); margin-top:2px; }

.rf-history-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.rf-status-badge {
  font-size: 11px; font-weight: 700;
  border-radius: 6px; padding: 3px 8px;
}

.rf-points { font-size:12px; font-weight:700; color:var(--muted); }

/* ════════════════════════════════════════════════
   PREMIUM PAGE
   ════════════════════════════════════════════════ */
.pm-page {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
  background: #0A0A1A;
  overflow: hidden;
}

/* ── Animated background orbs ── */
.pm-bg {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
}

.pm-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: pm-drift 8s ease-in-out infinite alternate;
}

.pm-orb1 { width:350px; height:350px; background:#667EEA; opacity:0.22; top:-80px; left:-80px; animation-delay:0s; }
.pm-orb2 { width:280px; height:280px; background:#764BA2; opacity:0.18; top:40%; right:-60px; animation-delay:-3s; }
.pm-orb3 { width:260px; height:260px; background:#667EEA; opacity:0.12; bottom:-60px; left:20%; animation-delay:-6s; }

@keyframes pm-drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(24px,16px) scale(1.06); }
}

/* ── Header ── */
.pm-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
}

.pm-close-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%; color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.18s;
}

.pm-close-btn:hover { background: rgba(255,255,255,0.2); }

.pm-restore-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 7px 16px;
  color: #F0F0FF; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.18s;
  font-family: 'DM Sans', sans-serif;
}

.pm-restore-btn:hover { background: rgba(255,255,255,0.18); }

/* ── Scroll ── */
.pm-scroll {
  position: relative; z-index: 1;
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px;
}

/* ── Hero ── */
.pm-hero { text-align: center; padding: 20px 0 40px; }

.pm-hero-icon {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, #667EEA, #764BA2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  margin: 0 auto 22px;
  box-shadow: 0 0 56px rgba(102,126,234,0.45);
}

.pm-hero-title {
  font-family: 'Sora', sans-serif;
  font-size: 52px; font-weight: 900;
  color: #F0F0FF; line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
}

.pm-hero-pill {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 14px; font-weight: 600;
  color: #F0F0FF;
}

/* ── Plan cards ── */
.pm-plans { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }

.pm-plan-card {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s;
}

.pm-plan-selected {
  background: rgba(102,126,234,0.15);
  border-color: #667EEA;
  box-shadow: 0 0 28px rgba(102,126,234,0.3);
}

.pm-plan-lifetime.pm-plan-selected {
  border-color: #FFD166;
  box-shadow: 0 0 28px rgba(255,209,102,0.3);
}

.pm-plan-radio {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s;
}

.pm-radio-on {
  background: linear-gradient(135deg, #667EEA, #764BA2);
  border-color: transparent;
}

.pm-plan-lifetime .pm-radio-on {
  background: linear-gradient(135deg, #FFD166, #FFA040);
}

.pm-plan-info { flex: 1; min-width: 0; }

.pm-plan-label-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 3px;
}

.pm-plan-label { font-size: 16px; font-weight: 800; color: #F0F0FF; }

.pm-plan-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.4px;
  background: linear-gradient(135deg, #667EEA, #764BA2);
  color: #fff; border-radius: 100px;
  padding: 3px 9px;
}

.pm-badge-gold { background: linear-gradient(135deg, #FFD166, #FFA040); }

.pm-plan-equiv  { font-size: 12px; color: rgba(102,126,234,0.8); font-weight: 500; }
.pm-plan-savings { font-size: 11px; font-weight: 700; color: #667EEA; margin-top: 2px; }

.pm-plan-price-col { display: flex; flex-direction: column; align-items: flex-end; }

.pm-plan-price  { font-size: 26px; font-weight: 900; color: #F0F0FF; }
.pm-plan-period { font-size: 13px; font-weight: 500; color: rgba(102,126,234,0.7); }

/* ── CTA ── */
.pm-cta-btn {
  width: 100%;
  height: 62px;
  background: linear-gradient(135deg, #667EEA, #764BA2);
  border: none; border-radius: 18px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 17px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(102,126,234,0.4);
  transition: opacity 0.18s, transform 0.15s;
  margin-bottom: 36px;
}

.pm-cta-btn:hover  { opacity: 0.9; transform: translateY(-2px); }
.pm-cta-btn:active { transform: translateY(0); }

/* ── Features ── */
.pm-features-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 26px;
  margin-bottom: 24px;
}

.pm-features-title {
  font-family: 'Sora', sans-serif;
  font-size: 19px; font-weight: 900;
  color: #F0F0FF;
  margin-bottom: 20px;
}

.pm-features-list { display: flex; flex-direction: column; gap: 16px; }

.pm-feature-row { display: flex; align-items: center; gap: 14px; }

.pm-feature-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #667EEA, #764BA2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

.pm-feature-label { font-size: 14px; font-weight: 600; color: #F0F0FF; }

/* ── Legal ── */
.pm-legal {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ── Responsive ── */
@media (max-width: 380px) {
  .pm-hero-title { font-size: 42px; }
  .pm-plan-price { font-size: 22px; }
}

/* ── Download icon variants ── */
.st-dl-android {
  background: rgba(52,211,153,0.15);
  color: #34d399;
}

.st-dl-ios {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.st-download-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700;
  border-radius: 100px; padding: 6px 14px;
  white-space: nowrap; flex-shrink: 0;
}

.st-badge-android {
  background: rgba(52,211,153,0.15);
  color: #34d399;
}

.st-badge-ios {
  background: rgba(255,255,255,0.1);
  color: var(--muted);
}