/* ============================================================
   AI Palm Reader — Global Styles
   Mystical dark theme: purple × gold × cosmic
   Font: Cinzel (headings) × Crimson Text (body)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple-950: #1a0533;
  --purple-900: #2d0b5e;
  --purple-800: #4c1d95;
  --purple-700: #6d28d9;
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --purple-300: #c4b5fd;
  --purple-200: #ddd6fe;

  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #f6c90e;
  --amber-300: #fde68a;

  --gray-950: #0b0b0f;
  --gray-900: #111116;
  --gray-800: #1c1c24;
  --gray-700: #2e2e3a;

  --rose-500: #f43f5e;
  --emerald-500: #10b981;
  --teal-500: #14b8a6;
  --violet-500: #8b5cf6;
  --blue-500: #3b82f6;

  --radius: 1.25rem;
  --shadow-lg: 0 20px 60px rgba(124, 58, 237, 0.35);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Crimson Text', Georgia, serif;
  background: var(--gray-950);
  color: var(--purple-200);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Cosmic Background ───────────────────────────────────── */
.cosmic-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}
.bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(45,11,94,.82), rgba(124,58,237,.45), rgba(11,11,15,.92));
}
.dark-overlay {
  background: linear-gradient(to bottom, rgba(11,11,15,.8), rgba(45,11,94,.72), rgba(11,11,15,.95));
}
.pricing-overlay {
  background: linear-gradient(to bottom, rgba(11,11,15,.9), rgba(45,11,94,.82), rgba(11,11,15,.96));
}

/* ── Floating Sparkles ───────────────────────────────────── */
.sparkle {
  position: fixed; font-size: 1.4rem;
  color: var(--amber-400); z-index: 1;
  animation: sparkle-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
.sp1 { top: 12%; left: 8%;  animation-delay: 0s; }
.sp2 { top: 28%; right: 7%; animation-delay: .7s; font-size: 1rem; }
.sp3 { bottom: 22%; left: 10%; animation-delay: .4s; font-size: 1.1rem; }
.sp4 { bottom: 40%; right: 5%; animation-delay: 1s; font-size: .9rem; }

@keyframes sparkle-pulse {
  0%, 100% { opacity: .7; transform: scale(1) rotate(0deg); }
  50%       { opacity: .2; transform: scale(1.3) rotate(20deg); }
}

/* ── Toast ───────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--purple-800); color: white;
  padding: 12px 24px; border-radius: 999px;
  font-family: 'Cinzel', serif; font-size: .85rem;
  z-index: 9999; opacity: 0; transition: opacity .3s;
  pointer-events: none; white-space: nowrap;
}
#toast.show { opacity: 1; }
#toast.ok   { background: #065f46; }
#toast.warn { background: #92400e; }
#toast.error{ background: #7f1d1d; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 24px;
  background: linear-gradient(135deg, var(--purple-600), var(--amber-500));
  color: white; border: none; border-radius: var(--radius);
  font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all .3s;
  box-shadow: 0 8px 30px rgba(124,58,237,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(124,58,237,.55); }
.btn-primary.small { width: auto; padding: 10px 20px; font-size: .85rem; }

.btn-secondary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 12px 24px;
  background: transparent;
  border: 1.5px solid rgba(139,92,246,.45);
  color: var(--purple-300); border-radius: var(--radius);
  font-family: 'Cinzel', serif; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .3s;
}
.btn-secondary:hover { background: rgba(124,58,237,.2); color: white; }

.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,58,237,.2); border: 1px solid rgba(139,92,246,.3);
  color: var(--purple-300); border-radius: 12px;
  cursor: pointer; transition: all .25s;
}
.icon-btn:hover { background: rgba(124,58,237,.4); color: white; }
.icon-btn svg { width: 18px; height: 18px; }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-card {
  background: linear-gradient(135deg, var(--purple-900), var(--gray-900));
  border: 1.5px solid rgba(139,92,246,.4);
  border-radius: 24px; padding: 36px 28px;
  max-width: 360px; width: 100%; text-align: center;
  animation: modal-in .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modal-in {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal-icon   { font-size: 3rem; margin-bottom: 12px; }
.modal-orb    { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 16px;
                background: linear-gradient(135deg, var(--purple-600), var(--amber-500));
                display: flex; align-items: center; justify-content: center;
                font-size: 2rem; color: white; }
.modal-card h2 { font-family: 'Cinzel', serif; color: white; margin-bottom: 10px; }
.modal-card p  { color: var(--purple-300); font-size: 1rem; margin-bottom: 16px; }
.modal-btns   { display: flex; gap: 12px; margin-top: 20px; }
.confirm-price{ font-size: 2.8rem; font-family: 'Cinzel', serif; color: var(--amber-400);
                font-weight: 700; margin: 12px 0; }
.terms-note   { font-size: .8rem; color: var(--purple-400); margin-top: 12px; }

/* ─────────────────────────────────────────────────────────────
   ONBOARDING PAGE
   ───────────────────────────────────────────────────────────── */
.page-onboard {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.onboard-center { position: relative; z-index: 10; width: 100%; max-width: 420px; }

.onboard-header { text-align: center; margin-bottom: 32px; }
.eye-icon-wrap  { position: relative; display: inline-block; margin-bottom: 16px; }
.eye-icon       { width: 72px; height: 72px; }
.eye-glow       { position: absolute; inset: -12px; border-radius: 50%;
                  background: rgba(246,201,14,.25); filter: blur(16px); }

.main-title {
  font-family: 'Cinzel', serif; font-size: 2.4rem; font-weight: 700;
  color: white; letter-spacing: .03em; margin-bottom: 6px;
  text-shadow: 0 0 40px rgba(246,201,14,.3);
}
.main-subtitle { font-size: 1rem; color: var(--purple-300); font-style: italic; }

.form-card {
  background: rgba(17,17,22,.55);
  border: 1.5px solid rgba(139,92,246,.35);
  border-radius: 28px; padding: 36px 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.welcome-back-banner {
  display: flex; align-items: center; gap: 12px;
  background: rgba(124,58,237,.2); border: 1px solid rgba(139,92,246,.4);
  border-radius: 14px; padding: 14px 16px;
  margin-bottom: 24px;
}
.wb-icon { font-size: 1.6rem; }
.welcome-back-banner strong { display: block; color: var(--amber-400); font-family: 'Cinzel', serif; font-size: .95rem; }
.welcome-back-banner span  { font-size: .85rem; color: var(--purple-300); }

.field-group { margin-bottom: 20px; }
.field-group label {
  display: block; margin-bottom: 6px;
  font-size: .9rem; color: var(--purple-200); font-family: 'Cinzel', serif;
}
.field-group input,
.field-group select {
  width: 100%; height: 50px; padding: 0 16px;
  background: rgba(11,11,15,.65);
  border: 1.5px solid rgba(139,92,246,.4);
  border-radius: 14px; color: white;
  font-family: 'Crimson Text', serif; font-size: 1rem;
  transition: border-color .25s, box-shadow .25s;
  outline: none; appearance: none;
}
.field-group input::placeholder { color: rgba(255,255,255,.3); }
.field-group input:focus,
.field-group select:focus {
  border-color: var(--amber-400);
  box-shadow: 0 0 0 3px rgba(246,201,14,.15);
}

.select-wrap { position: relative; }
.select-arrow {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--purple-400); pointer-events: none; font-size: 1.2rem;
}

.field-hint { display: block; font-size: .8rem; margin-top: 4px; }
.field-hint.warn { color: var(--amber-400); }
.field-hint.ok   { color: var(--emerald-500); }

.btn-sparkle { font-size: 1rem; }

.privacy-note  { text-align: center; font-size: .82rem; color: rgba(196,181,253,.65); margin-top: 20px; }
.footer-note   { text-align: center; font-size: .8rem; color: rgba(196,181,253,.45); margin-top: 20px; }

/* ─────────────────────────────────────────────────────────────
   SCAN PAGE
   ───────────────────────────────────────────────────────────── */
.page-scan { min-height: 100vh; }
.scan-page {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  min-height: 100vh; padding: 0 0 32px;
}

.scan-header { text-align: center; padding: 32px 24px 16px; }
.scan-icon   { font-size: 2rem; display: block; margin-bottom: 8px; }
.scan-header h1 {
  font-family: 'Cinzel', serif; font-size: 1.8rem; color: white; margin-bottom: 4px;
}
.scan-header p { color: var(--purple-300); font-size: .95rem; font-style: italic; }

.scan-area-wrap { flex: 1; padding: 0 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.scan-frame {
  position: relative; width: 100%; max-width: 380px;
  aspect-ratio: 3/4; border-radius: 28px; overflow: hidden;
  border: 2px solid rgba(139,92,246,.5);
  background: rgba(17,17,22,.7);
  backdrop-filter: blur(6px);
}
.scan-frame video,
.scan-frame img#capturedImg {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.corner {
  position: absolute; width: 30px; height: 30px; z-index: 10;
  border-color: var(--amber-400); border-style: solid;
}
.tl { top: 12px; left: 12px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.bl { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

.hand-guide {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.hand-guide svg { width: 140px; height: 140px; opacity: .4; }

.scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber-400), transparent);
  animation: scan-sweep 2.5s ease-in-out infinite; z-index: 20;
}
@keyframes scan-sweep {
  0%   { top: 5%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 95%; opacity: 0; }
}
.scan-pulse {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(246,201,14,.08), transparent);
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%,100% { opacity: .5; } 50% { opacity: 1; }
}

.no-camera-msg {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 20px;
}
.no-camera-msg span { font-size: 3rem; }
.no-camera-msg p    { color: var(--purple-300); }
.no-camera-msg .small { font-size: .85rem; color: var(--purple-400); }
.btn-upload {
  display: inline-block; padding: 10px 20px; margin-top: 8px;
  background: rgba(124,58,237,.35); border: 1px solid rgba(139,92,246,.5);
  border-radius: 12px; color: white; cursor: pointer;
  font-family: 'Cinzel', serif; font-size: .85rem;
}

.scan-progress-wrap { width: 100%; max-width: 380px; margin-top: 16px; }
.scan-progress-inner {
  background: rgba(17,17,22,.7); border: 1px solid rgba(139,92,246,.35);
  border-radius: 18px; padding: 18px 20px;
  backdrop-filter: blur(10px);
}
.scan-prog-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.scan-prog-row span:first-child { color: white; font-size: .9rem; }
.scan-prog-row span:last-child  { color: var(--amber-400); font-weight: 700; }
.prog-hint { font-size: .8rem; color: var(--purple-300); text-align: center; margin-top: 8px; font-style: italic; }

.scan-bottom { padding: 0 20px; width: 100%; max-width: 420px; margin: 0 auto; }
.scan-tips {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(124,58,237,.12); border: 1px solid rgba(139,92,246,.3);
  border-radius: 18px; padding: 16px 18px; margin-bottom: 16px;
}
.tips-icon { font-size: 1.5rem; flex-shrink: 0; }
.tips-title { color: white; font-size: .9rem; font-weight: 600; margin-bottom: 6px; font-family: 'Cinzel', serif; }
.scan-tips ul { list-style: none; }
.scan-tips li { font-size: .85rem; color: var(--purple-200); margin-bottom: 3px; }

/* Progress Bar */
.progress-bar-bg   { height: 8px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 999px; transition: width 1s ease; }
.progress-bar-fill.emerald { background: linear-gradient(90deg, #10b981, #14b8a6); }
.progress-bar-fill.rose    { background: linear-gradient(90deg, #f43f5e, #ec4899); }
.progress-bar-fill.violet  { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.progress-bar-fill.blue    { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.progress-bar-fill         { background: linear-gradient(90deg, var(--purple-600), var(--amber-400)); }

/* ─────────────────────────────────────────────────────────────
   RESULTS PAGE
   ───────────────────────────────────────────────────────────── */
.page-results { min-height: 100vh; }
.results-page { position: relative; z-index: 10; padding-bottom: 40px; }

/* Loading */
.loading-state {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.pandit-loading {
  text-align: center; padding: 40px;
}
.pandit-orb {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--purple-700), var(--amber-500));
  animation: orb-pulse 2s ease-in-out infinite;
}
@keyframes orb-pulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 30px rgba(124,58,237,.5); }
  50%      { transform: scale(1.1); box-shadow: 0 0 50px rgba(246,201,14,.4); }
}
.pandit-loading p { color: var(--purple-200); font-family: 'Cinzel', serif; font-size: 1rem; margin-bottom: 16px; }
.loading-dots { display: flex; gap: 8px; justify-content: center; }
.loading-dots span {
  width: 10px; height: 10px; background: var(--amber-400); border-radius: 50%;
  animation: dot-bounce .8s infinite alternate;
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot-bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* AI Busy */
.ai-busy-state { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.busy-card {
  background: rgba(17,17,22,.8); border: 1.5px solid rgba(139,92,246,.4);
  border-radius: 28px; padding: 40px 28px; text-align: center; max-width: 400px;
  backdrop-filter: blur(20px);
}
.busy-pandit   { font-size: 4rem; margin-bottom: 16px; }
.busy-card h2  { font-family: 'Cinzel', serif; color: white; margin-bottom: 12px; }
.busy-card p   { color: var(--purple-300); margin-bottom: 20px; line-height: 1.6; }
.btn-whatsapp  {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  background: #25d366; color: white; text-decoration: none;
  border-radius: 14px; font-family: 'Cinzel', serif; font-size: .9rem;
  margin-bottom: 12px;
}
.helpline-note { font-size: .85rem; color: var(--purple-400); margin-bottom: 16px; }

/* Results header */
.results-header { padding: 32px 20px 0; }
.results-title-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.results-title-row h1 { font-family: 'Cinzel', serif; font-size: 1.8rem; color: white; }
.results-subtitle { color: var(--purple-300); font-size: .9rem; margin-top: 4px; }
.results-actions { display: flex; gap: 8px; }

.score-card {
  background: linear-gradient(135deg, rgba(45,11,94,.5), rgba(17,17,22,.5));
  border: 1.5px solid rgba(139,92,246,.35);
  border-radius: 22px; padding: 24px 22px;
  display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(12px);
}
.score-label { color: var(--purple-200); font-size: .9rem; margin-bottom: 6px; }
.score-value {
  font-family: 'Cinzel', serif; font-size: 2.8rem; font-weight: 700;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.score-orb {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(246,201,14,.15); border: 2px solid rgba(246,201,14,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--amber-400);
  animation: orb-pulse 2.5s ease-in-out infinite;
}
.score-message { color: var(--purple-300); font-size: .9rem; margin-top: 10px; font-style: italic; }

/* Section */
.section-wrap { padding: 20px 20px 0; }
.section-title { font-family: 'Cinzel', serif; font-size: 1.2rem; color: white; margin-bottom: 16px; }

/* Line cards */
.line-card {
  background: rgba(17,17,22,.6); border: 1.5px solid rgba(139,92,246,.2);
  border-radius: 20px; padding: 20px; margin-bottom: 14px;
  backdrop-filter: blur(10px);
  transition: border-color .25s;
}
.line-card:hover { border-color: rgba(139,92,246,.45); }
.line-card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.line-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.line-icon.emerald { background: linear-gradient(135deg, #10b981, #14b8a6); }
.line-icon.rose    { background: linear-gradient(135deg, #f43f5e, #ec4899); }
.line-icon.violet  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.line-icon.blue    { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.line-info { flex: 1; }
.line-info h3 { font-family: 'Cinzel', serif; font-size: 1.05rem; color: white; margin-bottom: 4px; }
.line-info p  { font-size: .88rem; color: var(--purple-300); }
.line-score   { font-family: 'Cinzel', serif; font-size: 1.5rem; font-weight: 700; flex-shrink: 0; }
.line-score.emerald { color: #10b981; }
.line-score.rose    { color: #f43f5e; }
.line-score.violet  { color: #8b5cf6; }
.line-score.blue    { color: #3b82f6; }
.line-full    { padding-top: 14px; border-top: 1px solid rgba(139,92,246,.2); margin-top: 10px; }
.line-full p  { font-size: .92rem; color: var(--purple-200); line-height: 1.7; }
.read-more-btn {
  background: none; border: none; color: var(--amber-400); cursor: pointer;
  font-size: .88rem; font-family: 'Cinzel', serif; margin-top: 10px;
  transition: color .2s;
}
.read-more-btn:hover { color: var(--amber-300); }

/* Pandit card */
.pandit-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(45,11,94,.3); border: 1.5px solid rgba(139,92,246,.3);
  border-radius: 20px; padding: 20px;
}
.pandit-avatar { font-size: 2.2rem; flex-shrink: 0; }
.pandit-name   { font-family: 'Cinzel', serif; color: var(--amber-400); font-size: .9rem; margin-bottom: 6px; }
.pandit-prediction { color: var(--purple-200); font-size: .95rem; margin-bottom: 8px; }
.pandit-msg    { font-style: italic; color: var(--purple-300); font-size: .9rem; line-height: 1.6; }

/* Lucky */
.lucky-row   { display: flex; gap: 12px; flex-wrap: wrap; }
.lucky-item  {
  flex: 1; min-width: 90px; text-align: center;
  background: rgba(124,58,237,.2); border: 1px solid rgba(139,92,246,.35);
  border-radius: 16px; padding: 16px 10px;
}
.lucky-item span { display: block; font-size: .75rem; color: var(--purple-400); margin: 6px 0 4px; }
.lucky-item strong { display: block; font-family: 'Cinzel', serif; color: white; font-size: .9rem; }

/* Actions */
.actions-section { display: flex; flex-direction: column; gap: 12px; padding-bottom: 10px; }

/* Q&A Section */
.qa-section { }
.qa-plan-info { margin-bottom: 14px; }
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font-family: 'Cinzel', serif; font-size: .8rem;
}
.badge.legendary { background: rgba(246,201,14,.15); color: var(--amber-400); border: 1px solid rgba(246,201,14,.3); }
.badge.pro       { background: rgba(124,58,237,.2); color: var(--purple-300); border: 1px solid rgba(139,92,246,.3); }
.badge.empty     { background: rgba(127,29,29,.3); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }

.chat-box {
  min-height: 200px; max-height: 400px; overflow-y: auto;
  background: rgba(11,11,15,.5); border: 1px solid rgba(139,92,246,.2);
  border-radius: 20px; padding: 16px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-msg { display: flex; align-items: flex-end; gap: 10px; }
.user-msg  { flex-direction: row-reverse; }
.chat-avatar { font-size: 1.4rem; flex-shrink: 0; }
.chat-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 18px;
  font-size: .92rem; line-height: 1.55;
}
.pandit-msg .chat-bubble {
  background: rgba(124,58,237,.25); border: 1px solid rgba(139,92,246,.35);
  color: var(--purple-100, #ede9fe);
  border-bottom-left-radius: 4px;
}
.user-msg .chat-bubble {
  background: rgba(246,201,14,.12); border: 1px solid rgba(246,201,14,.2);
  color: white;
  border-bottom-right-radius: 4px;
}
.typing-msg .chat-bubble {
  display: flex; align-items: center; gap: 5px; padding: 12px 16px;
}
.dot {
  width: 8px; height: 8px; background: var(--purple-400); border-radius: 50%;
  animation: dot-bounce .8s infinite alternate;
}
.dot:nth-child(2) { animation-delay: .2s; }
.dot:nth-child(3) { animation-delay: .4s; }

.chat-input-row {
  display: flex; gap: 10px;
}
.chat-input-row input {
  flex: 1; height: 48px; padding: 0 16px;
  background: rgba(11,11,15,.6); border: 1.5px solid rgba(139,92,246,.4);
  border-radius: 14px; color: white;
  font-family: 'Crimson Text', serif; font-size: 1rem; outline: none;
}
.chat-input-row input:focus { border-color: var(--amber-400); }
.chat-send-btn {
  height: 48px; padding: 0 18px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple-600), var(--amber-500));
  border: none; border-radius: 14px; color: white;
  font-family: 'Cinzel', serif; font-size: .85rem; cursor: pointer;
  transition: all .25s;
}
.chat-send-btn:hover { transform: scale(1.04); }
.chat-send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.no-questions-banner {
  background: rgba(127,29,29,.25); border: 1px solid rgba(239,68,68,.3);
  border-radius: 16px; padding: 16px; text-align: center;
}
.no-questions-banner p { color: #fca5a5; font-size: .9rem; margin-bottom: 12px; }

/* Q&A History */
.history-item {
  background: rgba(17,17,22,.5); border: 1px solid rgba(139,92,246,.15);
  border-radius: 16px; padding: 16px; margin-bottom: 12px;
}
.hist-q   { color: var(--amber-400); font-size: .9rem; margin-bottom: 6px; font-family: 'Cinzel', serif; }
.hist-a   { color: var(--purple-200); font-size: .92rem; line-height: 1.6; margin-bottom: 6px; }
.hist-time{ font-size: .78rem; color: var(--purple-500); }

/* ─────────────────────────────────────────────────────────────
   PRICING PAGE
   ───────────────────────────────────────────────────────────── */
.page-pricing { min-height: 100vh; }
.pricing-page { position: relative; z-index: 10; padding-bottom: 40px; }

.pricing-header { padding: 32px 20px 16px; }
.back-btn {
  background: none; border: none; color: var(--purple-300); cursor: pointer;
  font-size: .9rem; margin-bottom: 16px; display: flex; align-items: center; gap: 6px;
  transition: color .2s;
}
.back-btn:hover { color: white; }
.pricing-header h1 { font-family: 'Cinzel', serif; font-size: 2rem; color: white; margin-bottom: 6px; }
.pricing-header p  { color: var(--purple-300); font-style: italic; }

.plans-container { padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }

.plan-card {
  position: relative;
  border: 2px solid; border-radius: 28px; padding: 28px 24px;
  backdrop-filter: blur(14px);
  transition: transform .3s;
}
.plan-card:hover { transform: translateY(-3px); }
.plan-card.free      { background: linear-gradient(135deg, rgba(46,46,58,.45), rgba(17,17,22,.45)); border-color: rgba(70,70,90,.5); }
.plan-card.pro       { background: linear-gradient(135deg, rgba(45,11,94,.45), rgba(76,29,149,.35)); border-color: rgba(139,92,246,.6); box-shadow: 0 10px 40px rgba(124,58,237,.35); }
.plan-card.legendary { background: linear-gradient(135deg, rgba(78,42,0,.45), rgba(30,15,5,.45)); border-color: rgba(245,158,11,.55); box-shadow: 0 10px 40px rgba(245,158,11,.25); }

.plan-badge {
  position: absolute; top: 20px; right: 20px;
  padding: 5px 12px; border-radius: 999px;
  font-family: 'Cinzel', serif; font-size: .72rem; font-weight: 700;
}
.plan-badge.purple { background: var(--purple-600); color: white; }
.plan-badge.amber  { background: var(--amber-600); color: white; }

.plan-top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.plan-icon {
  width: 56px; height: 56px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.plan-icon.gray   { background: linear-gradient(135deg, #374151, #1f2937); }
.plan-icon.purple { background: linear-gradient(135deg, var(--purple-600), var(--purple-700)); }
.plan-icon.amber  { background: linear-gradient(135deg, var(--amber-500), #d97706); }
.plan-name        { font-family: 'Cinzel', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 2px; }
.plan-name.gray   { color: #9ca3af; }
.plan-name.purple { color: var(--purple-400); }
.plan-name.amber  { color: var(--amber-400); }
.plan-questions   { font-size: .9rem; color: var(--purple-400); }

.plan-price-wrap { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.plan-price      { font-family: 'Cinzel', serif; font-size: 2.4rem; font-weight: 700; color: white; }
.plan-original   { font-size: 1.1rem; color: #6b7280; text-decoration: line-through; }
.limited-offer   { font-size: .8rem; color: var(--purple-400); margin-bottom: 20px; }

.plan-features { list-style: none; margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.plan-features li { display: flex; align-items: flex-start; gap: 10px; }
.check {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; flex-shrink: 0; margin-top: 1px; color: white;
}
.check.gray   { background: #374151; }
.check.purple { background: var(--purple-600); }
.check.amber  { background: var(--amber-500); }
.plan-features li span + * { font-size: .95rem; color: var(--purple-200); line-height: 1.5; }

.plan-btn {
  width: 100%; height: 50px; border: none; border-radius: 16px;
  font-family: 'Cinzel', serif; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .3s;
}
.plan-btn.gray-btn   { background: rgba(55,65,81,.7); color: white; }
.plan-btn.gray-btn:hover { background: #374151; }
.plan-btn.purple-btn { background: linear-gradient(135deg, var(--purple-600), var(--purple-700)); color: white; box-shadow: 0 6px 20px rgba(124,58,237,.4); }
.plan-btn.purple-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(124,58,237,.55); }
.plan-btn.amber-btn  { background: linear-gradient(135deg, var(--amber-500), #d97706); color: white; box-shadow: 0 6px 20px rgba(245,158,11,.35); }
.plan-btn.amber-btn:hover  { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(245,158,11,.5); }

.security-footer {
  margin: 24px 20px 0;
  background: rgba(17,17,22,.4); border: 1px solid rgba(139,92,246,.2);
  border-radius: 16px; padding: 16px;
  text-align: center; font-size: .85rem; color: var(--purple-300);
  backdrop-filter: blur(10px);
}

/* ─────────────────────────────────────────────────────────────
   SCROLLBAR
   ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-900); }
::-webkit-scrollbar-thumb { background: var(--purple-700); border-radius: 3px; }

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .plans-container { max-width: 500px; margin: 0 auto; }
  .results-page, .scan-page { max-width: 500px; margin: 0 auto; }
}
