/* ═══════════════════════════════════════════════════════
   AstroKamya · Auth Modal · Cosmic Portal Edition
   OTP · Member Check · Zodiac Animations · Premium
   ═══════════════════════════════════════════════════════ */
/* ═══════ STANDALONE CSS VARIABLES ═══════ */
.auth-overlay, .profile-menu, .nav-profile-btn {
  --text-1: #f8fafc;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --bg: #08080c;
  --border: rgba(255,255,255,0.08);
  --gold: #E0A526;
  --rose: #FC5C7C;
  --amber: #F59E0B;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --font: 'Clash Display', 'Outfit', sans-serif;
  --font-m: monospace;
  --grad: linear-gradient(135deg, #E0A526, #FC5C7C);
}

/* ═══════ PROFILE ICON IN NAVBAR ═══════ */
.nav-profile-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(224,165,38,0.15), rgba(124,92,252,0.12));
  border: 1.5px solid rgba(224,165,38,0.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  overflow: hidden;
  flex-shrink: 0;
}
.nav-profile-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(224,165,38,0.25);
  transform: scale(1.08);
}
.nav-profile-btn svg {
  width: 18px; height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Logged-in state — show avatar initials */
.nav-profile-btn.logged-in {
  background: linear-gradient(135deg, var(--gold), var(--rose));
  border-color: rgba(224,165,38,0.5);
}
.nav-profile-btn.logged-in .profile-icon { display: none; }
.nav-profile-btn .profile-initials {
  display: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--bg);
  text-transform: uppercase;
}
.nav-profile-btn.logged-in .profile-initials { display: block; }

/* Profile menu dropdown */
.profile-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 200px; padding: 8px;
  background: rgba(18,18,24,0.95); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(8px);
  transition: all 0.25s var(--ease);
  z-index: 200;
}
.profile-menu.show {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0);
}
.pm-header {
  padding: 12px 14px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.pm-name {
  font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--text-1);
}
.pm-email {
  font-size: 11px; color: var(--text-3); margin-top: 2px;
}
.pm-tier {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 20px;
}
.pm-tier.free { background: rgba(255,255,255,0.06); color: var(--text-3); }
.pm-tier.stellar { background: rgba(76,219,196,0.12); color: #4CDBC4; }
.pm-tier.oracle { background: rgba(224,165,38,0.12); color: #E0A526; }
.pm-tier.cosmic { background: rgba(252,92,124,0.12); color: #FC5C7C; }
.pm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  transition: all 0.2s;
}
.pm-item:hover { background: rgba(224,165,38,0.08); color: var(--text-1); transform: translateX(4px); }
.pm-item-icon { width: 20px; text-align: center; }
.pm-divider { height: 1px; background: var(--border); margin: 4px 0; }
.pm-item.danger { color: #FC5C7C; }
.pm-item.danger:hover { background: rgba(252,92,124,0.08); }

/* Plan usage bar */
.pm-usage {
  padding: 10px 14px; margin-bottom: 4px;
}
.pm-usage-label {
  font-size: 10px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 6px;
  display: flex; justify-content: space-between;
}
.pm-usage-bar {
  height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.pm-usage-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  transition: width 0.6s var(--ease);
}

/* ═══════ AUTH MODAL OVERLAY ═══════ */
.auth-overlay {
  position: fixed; inset: 0; z-index: 2147483646;
  background: rgba(5,5,8,0.85);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  /* Safari stacking context fix */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  isolation: isolate;
}
.auth-overlay.show {
  opacity: 1; visibility: visible; pointer-events: auto;
}

/* ═══════ AUTH MODAL CONTAINER ═══════ */
.auth-modal {
  position: relative;
  width: 460px; max-width: 92vw; max-height: 92vh;
  overflow-y: auto; overflow-x: hidden;
  border-radius: 24px;
  background: rgba(12,12,18,0.95);
  border: 1px solid rgba(224,165,38,0.15);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.6),
    0 0 120px rgba(224,165,38,0.06),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.5s var(--ease), opacity 0.4s;
  opacity: 0;
}
.auth-overlay.show .auth-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Close button */
.auth-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.3s;
  color: var(--text-3); font-size: 18px;
}
.auth-close:hover {
  background: rgba(252,92,124,0.15);
  border-color: rgba(252,92,124,0.25);
  color: var(--rose);
  transform: rotate(90deg);
}

/* ═══════ ZODIAC RING ANIMATION (TOP) ═══════ */
.auth-cosmic-header {
  position: relative;
  height: 160px;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(224,165,38,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 20%, rgba(124,92,252,0.08) 0%, transparent 50%);
}
.auth-zodiac-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; height: 200px;
}
.auth-zodiac-ring svg { width: 100%; height: 100%; }
.azr-outer { animation: azrSpin 60s linear infinite; transform-origin: 100px 100px; }
.azr-inner { animation: azrSpin 40s linear infinite reverse; transform-origin: 100px 100px; }
@keyframes azrSpin { to { transform: rotate(360deg); } }

/* Zodiac signs floating around the ring */
.auth-zodiac-signs {
  position: absolute; inset: 0;
  animation: azrSpin 90s linear infinite;
}
.azs {
  position: absolute; font-size: 16px; opacity: 0.25;
  transition: opacity 0.5s;
}
.azs:nth-child(1) { top: 5%; left: 48%; }
.azs:nth-child(2) { top: 15%; right: 15%; }
.azs:nth-child(3) { top: 38%; right: 3%; }
.azs:nth-child(4) { bottom: 22%; right: 12%; }
.azs:nth-child(5) { bottom: 5%; right: 35%; }
.azs:nth-child(6) { bottom: 5%; left: 35%; }
.azs:nth-child(7) { bottom: 22%; left: 12%; }
.azs:nth-child(8) { top: 38%; left: 3%; }
.azs:nth-child(9) { top: 15%; left: 15%; }
.azs:nth-child(10) { top: 5%; left: 30%; }
.azs:nth-child(11) { top: 25%; left: 8%; }
.azs:nth-child(12) { top: 25%; right: 8%; }

/* Central icon */
.auth-center-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(224,165,38,0.2), rgba(124,92,252,0.15));
  border: 2px solid rgba(224,165,38,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 40px rgba(224,165,38,0.15);
  animation: authIconPulse 3s ease-in-out infinite;
}
@keyframes authIconPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(224,165,38,0.15); }
  50% { box-shadow: 0 0 60px rgba(224,165,38,0.25); }
}

/* Shooting star across header */
.auth-shooting-star {
  position: absolute;
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  top: 30%; left: -20%;
  animation: authShoot 4s ease-in-out infinite;
  opacity: 0;
}
@keyframes authShoot {
  0% { left: -20%; opacity: 0; transform: rotate(-15deg); }
  10% { opacity: 0.8; }
  40% { left: 120%; opacity: 0; }
  100% { left: 120%; opacity: 0; }
}
.auth-shooting-star:nth-child(2) {
  animation-delay: 2.2s;
  top: 60%;
  width: 60px;
}

/* ═══════ AUTH BODY ═══════ */
.auth-body {
  padding: 28px 32px 32px;
}
.auth-title {
  font-family: var(--font);
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-align: center;
}
.auth-title em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-subtitle {
  font-size: 13px; color: var(--text-3);
  text-align: center; margin-bottom: 24px;
  line-height: 1.5;
}

/* ═══════ AUTH STEPS ═══════ */
.auth-step {
  display: none;
  animation: authStepIn 0.5s var(--ease);
}
.auth-step.active { display: block; }
@keyframes authStepIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toggle: Email / Phone */
.auth-toggle {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}
.auth-toggle-btn {
  flex: 1; padding: 10px;
  font-size: 13px; font-weight: 600;
  text-align: center; border-radius: 10px;
  color: var(--text-3);
  cursor: pointer; transition: all 0.3s var(--ease);
}
.auth-toggle-btn.active {
  background: linear-gradient(135deg, rgba(224,165,38,0.15), rgba(124,92,252,0.1));
  color: var(--text-1);
  box-shadow: 0 2px 12px rgba(224,165,38,0.1);
  border: 1px solid rgba(224,165,38,0.15);
}

/* Auth fields */
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap .auth-prefix {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--text-3); font-weight: 500;
  pointer-events: none;
}
.auth-input {
  width: 100%; padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text-1); font-size: 15px; font-family: inherit;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.auth-input:focus {
  border-color: rgba(224,165,38,0.5);
  box-shadow: 0 0 0 3px rgba(224,165,38,0.1), 0 4px 16px rgba(224,165,38,0.08);
}
.auth-input::placeholder { color: var(--text-3); }
.auth-input.has-prefix { padding-left: 56px; }

/* Phone country selector */
.auth-phone-row {
  display: flex; gap: 8px;
}
.auth-country-select {
  width: 90px; padding: 14px 10px;
  background: var(--bg);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text-1); font-size: 14px;
  outline: none; cursor: pointer;
  transition: border-color 0.3s;
  appearance: none;
  text-align: center;
}
.auth-country-select:focus { border-color: rgba(224,165,38,0.5); }

/* OTP Input */
.otp-grid {
  display: flex; gap: 10px; justify-content: center;
  margin: 20px 0;
}
.otp-digit {
  width: 52px; height: 60px;
  background: rgba(10,10,15,0.8);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  font-family: var(--font-m);
  font-size: 24px; font-weight: 700;
  color: var(--text-1);
  text-align: center;
  outline: none;
  transition: all 0.3s var(--ease);
  caret-color: var(--gold);
}
.otp-digit:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224,165,38,0.15), 0 0 20px rgba(224,165,38,0.1);
  background: rgba(224,165,38,0.04);
}
.otp-digit.filled {
  border-color: rgba(34,197,94,0.5);
  background: rgba(34,197,94,0.04);
}

/* Resend timer */
.otp-resend {
  text-align: center; font-size: 12px; color: var(--text-3);
  margin-top: 12px;
}
.otp-resend-btn {
  color: var(--gold); cursor: pointer; font-weight: 600;
  transition: color 0.2s;
}
.otp-resend-btn:hover { color: var(--amber); }
.otp-resend-btn.disabled { color: var(--text-3); cursor: not-allowed; opacity: 0.5; }

/* Auth CTA button */
.auth-cta {
  width: 100%; padding: 16px;
  border-radius: 14px;
  background: var(--grad);
  font-family: var(--font);
  font-size: 15px; font-weight: 700;
  color: var(--bg);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(224,165,38,0.2);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none;
  position: relative;
  overflow: hidden;
}
.auth-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(224,165,38,0.3);
}
.auth-cta:disabled {
  opacity: 0.5; cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* Shimmer animation on button */
.auth-cta::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}
.auth-cta:hover::after { left: 100%; }

/* Status messages */
.auth-status {
  text-align: center; font-size: 12px; margin-top: 12px;
  padding: 8px 12px; border-radius: 8px;
  display: none;
}
.auth-status.show { display: block; animation: authStepIn 0.3s var(--ease); }
.auth-status.checking {
  background: rgba(224,165,38,0.08); color: var(--gold);
  border: 1px solid rgba(224,165,38,0.15);
}
.auth-status.success {
  background: rgba(34,197,94,0.08); color: #22C55E;
  border: 1px solid rgba(34,197,94,0.15);
}
.auth-status.error {
  background: rgba(252,92,124,0.08); color: #FC5C7C;
  border: 1px solid rgba(252,92,124,0.15);
}

/* Cosmic loader in button */
.auth-spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid transparent;
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: sp 0.8s linear infinite;
}

/* Auth divider */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,0.08);
}
.auth-divider span {
  font-size: 11px; color: var(--text-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Social login buttons */
.auth-social-row {
  display: flex; gap: 10px;
}
.auth-social-btn {
  flex: 1; padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: all 0.3s;
}
.auth-social-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  color: var(--text-1);
  transform: translateY(-1px);
}
.auth-social-btn svg { width: 18px; height: 18px; }

/* ═══════ SIGNUP FORM FIELDS ═══════ */
.auth-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.auth-select {
  width: 100%; padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text-1); font-size: 14px;
  outline: none; cursor: pointer;
  transition: border-color 0.3s;
  appearance: none;
  font-family: inherit;
}
.auth-select:focus { border-color: rgba(224,165,38,0.5); }
option { background: var(--bg); color: var(--text-1); }

/* Date/time picker styling */
.auth-input[type="date"],
.auth-input[type="time"] {
  color-scheme: dark;
}

/* Birth details cosmic badge */
.auth-birth-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,252,0.06), rgba(224,165,38,0.04));
  border: 1px solid rgba(124,92,252,0.15);
}
.auth-birth-badge-icon {
  font-size: 16px;
  animation: hpSpin 4s linear infinite;
}
.auth-birth-badge-text {
  font-size: 12px; color: var(--text-2); line-height: 1.4;
}

/* ═══════ WELCOME ANIMATION (after signup) ═══════ */
.auth-welcome {
  text-align: center; padding: 20px 0;
}
.welcome-check {
  width: 72px; height: 72px; margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(76,219,196,0.1));
  border: 2px solid rgba(34,197,94,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  animation: welcomePop 0.6s var(--ease);
}
@keyframes welcomePop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.welcome-name {
  font-family: var(--font); font-size: 20px; font-weight: 700;
  margin-bottom: 8px;
}
.welcome-sign {
  font-size: 14px; color: var(--gold); margin-bottom: 4px;
  font-weight: 500;
}
.welcome-tier {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 12px 0;
}

/* Trust footer in modal */
.auth-trust {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding-top: 16px; margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px; color: var(--text-3);
}
.auth-trust span { display: flex; align-items: center; gap: 4px; }

/* ═══════ READING USAGE TRACKER ═══════ */
.auth-usage-card {
  padding: 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  margin-top: 16px;
}
.auth-usage-title {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.auth-usage-items { display: flex; flex-direction: column; gap: 8px; }
.auth-usage-row {
  display: flex; align-items: center; gap: 10px;
}
.auth-usage-label {
  font-size: 12px; color: var(--text-2); flex: 1; font-weight: 500;
}
.auth-usage-count {
  font-family: var(--font-m); font-size: 12px; font-weight: 600;
  color: var(--gold);
}
.auth-usage-bar {
  flex: 1; max-width: 100px; height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden;
}
.auth-usage-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  transition: width 0.6s var(--ease);
}

/* ═══════ SCROLLBAR FOR MODAL ═══════ */
.auth-modal::-webkit-scrollbar { width: 4px; }
.auth-modal::-webkit-scrollbar-track { background: transparent; }
.auth-modal::-webkit-scrollbar-thumb { background: rgba(224,165,38,0.2); border-radius: 4px; }

/* ═══════ CONTEXT-AWARE BRANDING VARIANTS ═══════ */

/* SoulSync theme — rose/pink */
.auth-overlay.soulsync .auth-modal {
  border: 1px solid rgba(252,92,124,0.2);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 120px rgba(252,92,124,0.08);
}
.auth-overlay.soulsync .auth-cosmic-header {
  background: radial-gradient(ellipse at 50% 120%, rgba(252,92,124,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 20%, rgba(167,139,250,0.1) 0%, transparent 50%);
}
.auth-overlay.soulsync .auth-center-icon {
  background: linear-gradient(135deg, rgba(252,92,124,0.25), rgba(167,139,250,0.15));
  border-color: rgba(252,92,124,0.4);
  box-shadow: 0 0 40px rgba(252,92,124,0.2);
}
.auth-overlay.soulsync .auth-cta {
  background: linear-gradient(135deg, #FC5C7C, #E0A526);
  box-shadow: 0 4px 20px rgba(252,92,124,0.25);
}
.auth-overlay.soulsync .auth-toggle-btn.active {
  background: linear-gradient(135deg, rgba(252,92,124,0.15), rgba(167,139,250,0.1));
  border-color: rgba(252,92,124,0.2);
}
.auth-overlay.soulsync .auth-input:focus {
  border-color: rgba(252,92,124,0.5);
  box-shadow: 0 0 0 3px rgba(252,92,124,0.1);
}
.auth-overlay.soulsync .otp-digit:focus {
  border-color: #FC5C7C;
  box-shadow: 0 0 0 3px rgba(252,92,124,0.15);
}

/* Life Tracker theme — teal */
.auth-overlay.life-tracker .auth-modal {
  border: 1px solid rgba(76,219,196,0.2);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 120px rgba(76,219,196,0.08);
}
.auth-overlay.life-tracker .auth-cosmic-header {
  background: radial-gradient(ellipse at 50% 120%, rgba(76,219,196,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 20%, rgba(34,197,94,0.08) 0%, transparent 50%);
}
.auth-overlay.life-tracker .auth-center-icon {
  background: linear-gradient(135deg, rgba(76,219,196,0.25), rgba(34,197,94,0.15));
  border-color: rgba(76,219,196,0.4);
  box-shadow: 0 0 40px rgba(76,219,196,0.2);
}
.auth-overlay.life-tracker .auth-cta {
  background: linear-gradient(135deg, #4CDBC4, #22C55E);
  box-shadow: 0 4px 20px rgba(76,219,196,0.25);
}
.auth-overlay.life-tracker .auth-input:focus {
  border-color: rgba(76,219,196,0.5);
  box-shadow: 0 0 0 3px rgba(76,219,196,0.1);
}
.auth-overlay.life-tracker .otp-digit:focus {
  border-color: #4CDBC4;
  box-shadow: 0 0 0 3px rgba(76,219,196,0.15);
}

/* ForYou/Shop theme — gold */
.auth-overlay.foryou .auth-modal {
  border: 1px solid rgba(224,165,38,0.25);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 120px rgba(224,165,38,0.1);
}
.auth-overlay.foryou .auth-cosmic-header {
  background: radial-gradient(ellipse at 50% 120%, rgba(224,165,38,0.18) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 20%, rgba(245,158,11,0.08) 0%, transparent 50%);
}
.auth-overlay.foryou .auth-center-icon {
  background: linear-gradient(135deg, rgba(224,165,38,0.3), rgba(245,158,11,0.2));
  border-color: rgba(224,165,38,0.5);
  box-shadow: 0 0 40px rgba(224,165,38,0.25);
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 600px) {
  .auth-modal { border-radius: 20px; }
  .auth-body { padding: 20px 20px 24px; }
  .otp-digit { width: 44px; height: 52px; font-size: 20px; }
  .auth-cosmic-header { height: 130px; }
  .auth-center-icon { width: 52px; height: 52px; font-size: 24px; }
  .nav-profile-btn { width: 34px; height: 34px; }
}

/* ═══════ ToS CONSENT CHECKBOX ═══════ */
.auth-tos {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 16px 0; padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}
.auth-tos input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px;
  accent-color: #E0A526; cursor: pointer; flex-shrink: 0;
}
.auth-tos label {
  font-size: 12px; color: #94a3b8; line-height: 1.6; cursor: pointer;
}
.auth-tos a {
  color: #E0A526; text-decoration: underline; text-underline-offset: 2px;
}
.auth-tos a:hover { color: #FC5C7C; }

/* ═══════════════════════════════════════════════════════
   COSMIC SCANNER OVERLAY — Full-screen transition animation
   ═══════════════════════════════════════════════════════ */
#cosmic-scanner-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  animation: csIn 0.6s cubic-bezier(0.25, 1, 0.5, 1) both;
}
#cosmic-scanner-overlay.cs-fade-out {
  animation: csOut 0.5s ease both;
}
@keyframes csIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes csOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.cs-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(15,10,25,0.97) 0%, rgba(5,5,8,0.99) 100%);
  backdrop-filter: blur(40px) saturate(120%);
}

.cs-content {
  position: relative; z-index: 1;
  text-align: center; padding: 40px;
  max-width: 480px; width: 100%;
}

/* Orbital rings */
.cs-rings {
  position: relative;
  width: 220px; height: 220px;
  margin: 0 auto 32px;
}
.cs-ring-svg {
  width: 100%; height: 100%;
}
.cs-orbit {
  stroke-dasharray: 8 6;
  transform-origin: 150px 150px;
}
.cs-orbit-1 { animation: csOrbit 8s linear infinite; }
.cs-orbit-2 { animation: csOrbit 6s linear infinite reverse; }
.cs-orbit-3 { animation: csOrbit 4s linear infinite; }
@keyframes csOrbit { to { transform: rotate(360deg); } }

.cs-planet {
  transform-origin: 150px 150px;
  filter: drop-shadow(0 0 6px currentColor);
}
.cs-planet-1 { animation: csOrbit 8s linear infinite; }
.cs-planet-2 { animation: csOrbit 6s linear infinite reverse; }
.cs-planet-3 { animation: csOrbit 4s linear infinite; }

.cs-center-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  animation: csPulse 2s ease-in-out infinite;
}
@keyframes csPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Title & subtitle */
.cs-title {
  font-family: 'Clash Display', 'Space Grotesk', sans-serif;
  font-size: 24px; font-weight: 700;
  background: linear-gradient(135deg, #E0A526, #FC5C7C);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.cs-subtitle {
  font-size: 14px; color: #94a3b8;
  margin-bottom: 28px;
}
.cs-subtitle strong { color: #f8fafc; }

/* Step-by-step progress */
.cs-steps {
  display: flex; flex-direction: column; gap: 12px;
  text-align: left; margin: 0 auto 24px;
  max-width: 300px;
}
.cs-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: rgba(148,163,184,0.3);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  transform: translateX(-10px);
  opacity: 0;
}
.cs-step.active {
  color: #f8fafc;
  background: rgba(224,165,38,0.06);
  border-color: rgba(224,165,38,0.15);
  transform: translateX(0);
  opacity: 1;
}
.cs-step-icon { font-size: 18px; flex-shrink: 0; }

/* Progress bar */
.cs-progress {
  height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  max-width: 300px;
  margin: 0 auto;
}
.cs-progress-fill {
  height: 100%; width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #E0A526, #FC5C7C);
  transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 12px rgba(224,165,38,0.4);
}

@media (max-width: 600px) {
  .cs-rings { width: 160px; height: 160px; }
  .cs-title { font-size: 20px; }
  .cs-content { padding: 24px; }
}
