/* ─── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; }

/* ─── Screens ──────────────────────────────────────── */
.screen { position: relative; min-height: 100vh; }
.screen.hidden { display: none; }
.screen.active { display: block; }

/* ─── Stars Background ─────────────────────────────── */
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: #020617;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(99,102,241,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(245,158,11,0.05) 0%, transparent 50%);
}
.stars-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 45%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 55% 20%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 35%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 75%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 85%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 80%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 5%  55%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 90%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 38% 8%,  rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,0.4) 0%, transparent 100%);
}

/* ─── Orbit Ring (Hero decoration) ─────────────────── */
.orbit-ring {
  width: 140px;
  height: 140px;
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 50%;
  position: relative;
  animation: orbit-spin 12s linear infinite;
}
.orbit-ring::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: 50%;
}
.orbit-planet {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #818cf8, #6366f1);
  border-radius: 50%;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(99,102,241,0.8);
}
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── Loader Chart ──────────────────────────────────── */
.loader-chart {
  position: relative;
  width: 200px;
  height: 200px;
}
.loader-ring { width: 200px; height: 200px; }

.ring-outer {
  fill: none;
  stroke: rgba(99,102,241,0.25);
  stroke-width: 1;
  animation: ring-pulse 3s ease-in-out infinite;
}
.ring-mid {
  fill: none;
  stroke: rgba(99,102,241,0.15);
  stroke-width: 1;
  animation: ring-pulse 3s ease-in-out infinite 0.5s;
}
.ring-inner {
  fill: none;
  stroke: rgba(245,158,11,0.2);
  stroke-width: 1;
  animation: ring-pulse 3s ease-in-out infinite 1s;
}
.spoke {
  stroke: rgba(99,102,241,0.1);
  stroke-width: 0.5;
}
.planet {
  fill: #818cf8;
  filter: drop-shadow(0 0 4px #6366f1);
}
.p2 { fill: #fbbf24; filter: drop-shadow(0 0 4px #f59e0b); }
.p3 { fill: #a78bfa; filter: drop-shadow(0 0 6px #8b5cf6); }
.p4 { fill: #818cf8; }
.p5 { fill: #fcd34d; filter: drop-shadow(0 0 4px #fbbf24); }

.loader-ring {
  animation: chart-spin 20s linear infinite;
  transform-origin: center;
}
@keyframes chart-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ring-pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}
.loader-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  animation: glow-pulse 3s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50%       { transform: scale(1.1); opacity: 1; }
}

/* Loader progress dots */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(99,102,241,0.3);
  transition: background 0.3s;
}
.dot.active { background: #818cf8; }

/* ─── Popup ─────────────────────────────────────────── */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2,6,23,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.2s ease;
}
.popup-overlay.hidden { display: none; }

.popup-box {
  background: #0f172a;
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  animation: slide-up 0.25s ease;
}
.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #475569;
  hover: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s;
  line-height: 1;
  padding: 0.25rem;
}
.popup-close:hover { color: #94a3b8; }

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ─── Auth Buttons ──────────────────────────────────── */
.auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

/* ─── Answer Cards ──────────────────────────────────── */
.answer-card {
  background: rgba(15,23,42,0.8);
  border: 1px solid;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}
.answer-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.answer-card-body {
  color: #cbd5e1;
  font-size: 0.9375rem;
  line-height: 1.75;
}
.answer-card-body p + p { margin-top: 0.75rem; }
.answer-card-body strong {
  color: #f1f5f9;
  font-weight: 600;
}

/* ─── Pricing Cards ─────────────────────────────────── */
.pricing-card {
  position: relative;
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
  cursor: pointer;
}
.pricing-card:hover { border-color: rgba(99,102,241,0.4); }
.pricing-card.popular {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.05);
}
.popular-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: linear-gradient(to right, #6366f1, #818cf8);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 10px;
  border-radius: 999px;
}

/* ─── Chart Canvas ──────────────────────────────────── */
#chart-canvas { border-radius: 50%; }

/* ─── Streaming text effect ─────────────────────────── */
.typing::after {
  content: '▋';
  animation: blink 1s step-start infinite;
  color: #818cf8;
  font-size: 0.9em;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }
