@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;700&family=Outfit:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* --- DESIGN SYSTEM & TOKENS --- */
:root {
  /* Colors */
  --bg-lunaire: #FAF9F6;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-dark: rgba(13, 19, 38, 0.95);
  --primary-midnight: #0D1326;
  --primary-midnight-light: #1A2544;
  --accent-gold: #C5A059;
  --accent-gold-light: #E5C384;
  --accent-gold-dark: #A58039;
  --soft-purple: #F1EFF9;
  --soft-purple-dark: #DEDAEF;
  --powder-pink: #F8ECEB;
  --powder-pink-dark: #ECCECB;
  --accent-blue: #E3ECF5;
  --accent-green: #E6ECE6;
  
  --text-dark: #1A1F2C;
  --text-muted: #5C6479;
  --text-light: #FFFFFF;
  
  /* Gradients */
  --grad-mystic: radial-gradient(circle at 50% 50%, rgba(241, 239, 249, 0.8) 0%, rgba(248, 236, 235, 0.8) 50%, rgba(250, 249, 246, 1) 100%);
  --grad-gold: linear-gradient(135deg, #E5C384 0%, #C5A059 50%, #A58039 100%);
  --grad-midnight: linear-gradient(135deg, #0D1326 0%, #1F2C54 100%);
  
  /* Shadow & Blur */
  --shadow-luna: 0 12px 36px rgba(13, 19, 38, 0.05), 0 2px 10px rgba(197, 160, 89, 0.08);
  --shadow-inset: inset 0 2px 8px rgba(13, 19, 38, 0.03);
  --shadow-premium: 0 20px 50px rgba(13, 19, 38, 0.08), 0 4px 15px rgba(197, 160, 89, 0.12);
  --blur-glass: blur(16px);
  
  /* Fonts */
  --font-serif-logo: 'Cinzel', serif;
  --font-serif-title: 'Playfair Display', serif;
  --font-sans: 'Outfit', sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-lunaire);
  background-image: var(--grad-mystic);
  background-attachment: fixed;
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Layout container */
#app-container {
  width: 100%;
  max-width: 480px; /* Mobile first feel */
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(13, 19, 38, 0.03);
  background: rgba(250, 249, 246, 0.4);
  backdrop-filter: blur(100px);
}

@media (min-width: 768px) {
  #app-container {
    max-width: 520px;
    border-left: 1px solid rgba(197, 160, 89, 0.15);
    border-right: 1px solid rgba(197, 160, 89, 0.15);
  }
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, .serif-font {
  font-family: var(--font-serif-title);
  font-weight: 600;
  color: var(--primary-midnight);
  letter-spacing: -0.01em;
}

.logo-font {
  font-family: var(--font-serif-logo);
  letter-spacing: 0.18em;
  font-weight: 500;
}

/* --- APP HEADER & FOOTER --- */
header.app-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.08);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  width: 24px;
  height: 24px;
  fill: var(--primary-midnight);
  filter: drop-shadow(0 2px 4px rgba(197, 160, 89, 0.3));
}

.logo-text {
  font-size: 20px;
  color: var(--primary-midnight);
  text-transform: uppercase;
}

.premium-badge {
  background: var(--grad-gold);
  color: var(--primary-midnight);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2);
}

/* --- SPA PAGES MANAGEMENT --- */
.page {
  display: none;
  flex: 1;
  padding: 24px;
  flex-direction: column;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 18px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--grad-midnight);
  color: var(--text-light);
  box-shadow: 0 10px 25px rgba(13, 19, 38, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(13, 19, 38, 0.22);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-gold {
  background: var(--grad-gold);
  color: var(--primary-midnight);
  box-shadow: 0 10px 25px rgba(197, 160, 89, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(197, 160, 89, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-midnight);
  border: 1px solid rgba(197, 160, 89, 0.2);
  box-shadow: 0 4px 12px rgba(13, 19, 38, 0.02);
}

.btn-secondary:hover {
  background: var(--soft-purple);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

/* --- CARDS & GLASSMORPHISM --- */
.card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-luna);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  margin-bottom: 20px;
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(13, 19, 38, 0.07);
  border-color: rgba(197, 160, 89, 0.15);
}

/* --- LANDING PAGE `#landing` --- */
.landing-hero {
  text-align: center;
  padding: 20px 0 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.moon-stage {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 10px 0;
}

.moon-glow {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 195, 132, 0.25) 0%, rgba(222, 218, 239, 0.1) 60%, transparent 100%);
  filter: blur(8px);
  animation: pulse-glow 4s ease-in-out infinite alternate;
}

.moon-body {
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #F5F0E6 0%, #E3DAC9 60%, #B8A98F 100%);
  box-shadow: 
    inset -10px -10px 20px rgba(13, 19, 38, 0.15),
    inset 8px 8px 12px rgba(255, 255, 255, 0.8),
    0 10px 25px rgba(197, 160, 89, 0.15);
  animation: float-moon 6s ease-in-out infinite;
}

.moon-crescent {
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  box-shadow: inset -18px 0px 0px 0px rgba(13, 19, 38, 0.85);
  animation: float-moon 6s ease-in-out infinite;
}

@keyframes float-moon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.1); opacity: 1; }
}

.hero-tagline {
  font-family: var(--font-serif-title);
  font-size: 28px;
  line-height: 1.25;
  color: var(--primary-midnight);
  padding: 0 10px;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 90%;
}

.pilars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 24px;
}

.pilar-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.pilar-icon-container {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--soft-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pilar-icon {
  width: 20px;
  height: 20px;
  fill: var(--primary-midnight);
}

.pilar-text h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.pilar-text p {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- QUIZ PAGE `#quiz` --- */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.quiz-progress-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(13, 19, 38, 0.05);
  border-radius: 10px;
  margin: 0 16px;
  overflow: hidden;
}

.quiz-progress-bar-fill {
  height: 100%;
  background: var(--grad-gold);
  width: 0%;
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-step-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.btn-back-quiz {
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.btn-back-quiz:hover {
  background: rgba(13, 19, 38, 0.05);
}

.btn-back-quiz svg {
  width: 20px;
  height: 20px;
  fill: var(--primary-midnight);
}

.quiz-question-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
  min-height: 380px;
}

.quiz-category {
  font-family: var(--font-serif-title);
  font-style: italic;
  font-size: 14px;
  color: var(--accent-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.quiz-question-title {
  font-size: 24px;
  line-height: 1.3;
  margin-top: -8px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.quiz-option {
  background: var(--bg-card);
  border: 1px solid rgba(13, 19, 38, 0.06);
  padding: 16px 20px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(13, 19, 38, 0.01);
}

.quiz-option:hover {
  border-color: var(--accent-gold);
  background: var(--soft-purple);
  transform: scale(1.01) translateY(-1px);
}

.quiz-option.selected {
  border-color: var(--primary-midnight);
  background: var(--primary-midnight);
  color: var(--text-light);
  box-shadow: 0 8px 20px rgba(13, 19, 38, 0.15);
}

.quiz-option-bullet {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(13, 19, 38, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.quiz-option:hover .quiz-option-bullet {
  border-color: var(--accent-gold);
}

.quiz-option.selected .quiz-option-bullet {
  border-color: var(--accent-gold-light);
  background: var(--accent-gold);
}

.quiz-option-bullet-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition-bounce);
}

.quiz-option.selected .quiz-option-bullet-inner {
  opacity: 1;
  transform: scale(1);
}

/* Quiz Inputs (Text, Date, Time, Location) */
.quiz-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quiz-input {
  width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(13, 19, 38, 0.1);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-inset);
}

.quiz-input:focus {
  border-color: var(--accent-gold);
  background: var(--text-light);
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.1);
}

/* --- PASSWORD SHOW/HIDE TOGGLE --- */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .quiz-input {
  padding-right: 52px; /* space for the eye button */
}

.password-eye-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s ease, transform 0.2s ease;
  outline: none;
}

.password-eye-btn:hover {
  color: var(--accent-gold-dark);
  transform: translateY(-50%) scale(1.15);
}


.quiz-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- CREATION COMPTE `#register` --- */
.register-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  text-align: center;
}

.register-logo-icon {
  width: 44px;
  height: 44px;
  fill: var(--primary-midnight);
}

.register-title {
  font-size: 28px;
  margin-bottom: 6px;
}

.register-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 85%;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terms-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.4;
}

.terms-text a {
  color: var(--primary-midnight);
  text-decoration: underline;
}

/* --- LOADING ANIMATION SCENE `#loading-scene` --- */
.loading-scene-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 40px;
}

.astrolabe {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 40px;
}

.astrolabe-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(197, 160, 89, 0.4);
}

.ring-outer {
  top: 0; left: 0; width: 100%; height: 100%;
  animation: rotate-cw 20s linear infinite;
  border: 1px solid rgba(197, 160, 89, 0.15);
}

.ring-outer::before {
  content: '✦';
  position: absolute;
  top: -6px;
  left: 50%;
  color: var(--accent-gold);
  font-size: 12px;
}

.ring-middle {
  top: 15px; left: 15px; width: 150px; height: 150px;
  animation: rotate-ccw 15s linear infinite;
}

.ring-inner {
  top: 30px; left: 30px; width: 120px; height: 120px;
  animation: rotate-cw 10s linear infinite;
  border: 1px solid rgba(197, 160, 89, 0.25);
}

.astrolabe-center {
  position: absolute;
  top: 60px; left: 60px; width: 60px; height: 60px;
  background: radial-gradient(circle, #F9ECE2 0%, #ECC5A8 50%, #C5A059 100%);
  border-radius: 50%;
  box-shadow: 
    0 0 30px rgba(197, 160, 89, 0.4),
    inset -4px -4px 10px rgba(13, 19, 38, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

.astrolabe-center svg {
  width: 30px;
  height: 30px;
  fill: var(--primary-midnight);
}

@keyframes rotate-cw {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotate-ccw {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

.loading-status-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: var(--font-serif-title);
  color: var(--primary-midnight);
}

.loading-status-text {
  font-size: 14px;
  color: var(--text-muted);
  min-height: 24px;
  transition: opacity 0.3s ease;
}

/* --- RESULT PAGE `#result` --- */
.result-header {
  text-align: center;
  margin-bottom: 24px;
}

.result-header h2 {
  font-size: 26px;
  margin-bottom: 4px;
}

.energy-badge-large {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 24px;
  background: var(--soft-purple);
  border-radius: 20px;
  border: 1px solid rgba(197, 160, 89, 0.12);
  margin: 16px auto;
  text-align: center;
}

.energy-badge-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.energy-badge-val {
  font-family: var(--font-serif-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-midnight);
}

.result-section-title {
  font-size: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.1);
  padding-bottom: 6px;
}

.result-section-title svg {
  width: 18px;
  height: 18px;
  fill: var(--accent-gold-dark);
}

.grid-key-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-mini-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  text-align: center;
  box-shadow: var(--shadow-luna);
}

.stat-mini-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stat-mini-val {
  font-family: var(--font-serif-title);
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-midnight);
}

/* Paywall Blurring Teaser */
.teaser-locked-container {
  position: relative;
  margin-top: 24px;
  border-radius: 24px;
  overflow: hidden;
  padding: 24px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.blur-overlay {
  filter: blur(5px);
  opacity: 0.4;
  user-select: none;
  pointer-events: none;
}

.lock-card {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to top, rgba(250, 249, 246, 0.95) 40%, rgba(250, 249, 246, 0.6) 100%);
  padding: 24px;
  text-align: center;
}

.lock-icon-bg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-midnight);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(13, 19, 38, 0.15);
  margin-bottom: 14px;
}

.lock-icon-bg svg {
  width: 20px;
  height: 20px;
  fill: var(--accent-gold-light);
}

.lock-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  max-width: 80%;
}

.lock-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 90%;
}

/* --- PAYWALL PAGE `#paywall` --- */
.paywall-header {
  text-align: center;
  margin-bottom: 20px;
}

.paywall-crown-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--soft-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  border: 1px solid rgba(197, 160, 89, 0.2);
  box-shadow: 0 8px 16px rgba(197, 160, 89, 0.1);
}

.paywall-crown-container svg {
  width: 28px;
  height: 28px;
  fill: var(--accent-gold-dark);
}

.paywall-title {
  font-size: 26px;
  line-height: 1.25;
  margin-top: 6px;
  margin-bottom: 6px;
}

.paywall-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 85%;
  margin: 0 auto;
}

.paywall-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.pw-feature-row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}

.pw-feature-icon {
  width: 18px;
  height: 18px;
  fill: var(--accent-gold-dark);
  flex-shrink: 0;
}

/* Subscription options */
.subscription-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.sub-option {
  border-radius: 20px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(13, 19, 38, 0.08);
  cursor: pointer;
  transition: var(--transition-bounce);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub-option:hover {
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.sub-option.active {
  border-color: var(--accent-gold);
  background: rgba(248, 236, 235, 0.4);
  box-shadow: 0 8px 24px rgba(197, 160, 89, 0.08);
}

.sub-option-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sub-option-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(13, 19, 38, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sub-option.active .sub-option-check {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
}

.sub-option-check-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition-bounce);
}

.sub-option.active .sub-option-check-inner {
  opacity: 1;
  transform: scale(1);
}

.sub-option-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-midnight);
}

.sub-option-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.sub-option-right {
  text-align: right;
}

.sub-option-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-midnight);
}

.sub-option-period {
  font-size: 11px;
  color: var(--text-muted);
}

.sub-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--grad-midnight);
  color: var(--text-light);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 8px rgba(13, 19, 38, 0.15);
}

.guarantee-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
}

/* Simulated Stripe Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(13, 19, 38, 0.6);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: modal-bg-fade 0.3s ease forwards;
}

.modal-overlay.active {
  display: flex;
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
  }
}

.modal-content {
  width: 100%;
  max-width: 480px;
  background: var(--bg-lunaire);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 30px 24px;
  box-shadow: 0 -10px 40px rgba(13, 19, 38, 0.15);
  animation: modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 768px) {
  .modal-content {
    border-radius: 28px;
    margin: 20px;
    box-shadow: 0 25px 60px rgba(13, 19, 38, 0.25);
  }
}

@keyframes modal-bg-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.stripe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(13, 19, 38, 0.06);
  padding-bottom: 12px;
}

.stripe-logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: #635BFF; /* Stripe Violet */
  display: flex;
  align-items: center;
  gap: 6px;
}

.stripe-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #635BFF;
}

.stripe-close {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
}

.stripe-close:hover {
  background: rgba(13, 19, 38, 0.05);
}

.stripe-close svg {
  width: 20px;
  height: 20px;
  fill: var(--text-dark);
}

.stripe-summary {
  background: rgba(99, 91, 255, 0.04);
  border: 1px dashed rgba(99, 91, 255, 0.2);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.stripe-sum-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-midnight);
}

.stripe-sum-price {
  font-size: 16px;
  font-weight: 700;
  color: #635BFF;
}

.stripe-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stripe-input-card {
  position: relative;
}

.stripe-card-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 24px;
  height: 24px;
  fill: var(--text-muted);
}

.stripe-secure-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

.stripe-secure-text svg {
  width: 12px;
  height: 12px;
  fill: var(--text-muted);
}

/* --- DASHBOARD PAGE `#dashboard` --- */
.dash-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dash-user-info h2 {
  font-size: 22px;
  line-height: 1.2;
}

.dash-user-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.dash-zodiac-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(197, 160, 89, 0.12);
  box-shadow: var(--shadow-luna);
}

.dash-zodiac-icon {
  width: 20px;
  height: 20px;
  fill: var(--accent-gold-dark);
}

.dash-zodiac-name {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Energy Gauge Widget */
.energy-gauge-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: 24px;
}

.gauge-container {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent-gold);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.2; /* 2 * PI * R (R=40) */
  stroke-dashoffset: 251.2; /* Calculated in JS */
  transition: stroke-dashoffset 1s ease-in-out;
}

.gauge-text {
  position: absolute;
  font-family: var(--font-serif-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-midnight);
}

.gauge-info-text h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.gauge-info-text p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Dashboard Tabs Navigation */
.dash-tabs {
  display: flex;
  background: rgba(13, 19, 38, 0.03);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.dash-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 10px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.dash-tab.active {
  background: var(--bg-lunaire);
  color: var(--primary-midnight);
  box-shadow: 0 4px 10px rgba(13, 19, 38, 0.05);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.tab-pane.active {
  display: block;
}

/* Daily Horoscope Cards */
.daily-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-card {
  padding: 20px;
  border-radius: 20px;
}

.category-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cat-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-icon-container {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-icon {
  width: 16px;
  height: 16px;
}

.cat-name {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-midnight);
}

.cat-rating {
  display: flex;
  gap: 3px;
}

.star-mini {
  width: 12px;
  height: 12px;
  fill: var(--accent-gold-dark);
}

.star-mini.empty {
  fill: rgba(13, 19, 38, 0.1);
}

.cat-text {
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.5;
}

/* Colors specifically for categories */
.card-love {
  background: var(--powder-pink);
  border-color: var(--powder-pink-dark);
}
.card-love .cat-icon-container {
  background: var(--powder-pink-dark);
}
.card-love .cat-icon { fill: #C85A50; }

.card-career {
  background: var(--accent-blue);
  border-color: #D2DFED;
}
.card-career .cat-icon-container {
  background: #D2DFED;
}
.card-career .cat-icon { fill: #48668B; }

.card-wellbeing {
  background: var(--soft-purple);
  border-color: var(--soft-purple-dark);
}
.card-wellbeing .cat-icon-container {
  background: var(--soft-purple-dark);
}
.card-wellbeing .cat-icon { fill: #6F669B; }

/* Affirmation Card */
.affirmation-card {
  text-align: center;
  background: radial-gradient(circle at top right, #FBF8F3, #FAF2E6);
  border: 1px solid rgba(197, 160, 89, 0.2);
  position: relative;
  overflow: hidden;
}

.affirmation-card::before {
  content: '“';
  position: absolute;
  top: -10px;
  left: 20px;
  font-family: var(--font-serif-title);
  font-size: 90px;
  color: rgba(197, 160, 89, 0.08);
  line-height: 1;
}

.affirmation-text {
  font-family: var(--font-serif-title);
  font-style: italic;
  font-size: 17px;
  color: var(--primary-midnight);
  margin-bottom: 8px;
  line-height: 1.4;
  position: relative;
}

.affirmation-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold-dark);
}

/* Lucky Numbers Widget */
.lucky-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.lucky-box {
  background: var(--bg-card);
  border: 1px solid rgba(197, 160, 89, 0.08);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.lucky-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.lucky-val {
  font-family: var(--font-serif-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-midnight);
}

/* --- HISTORIQUE PAGE `#history` --- */
.history-title {
  margin-bottom: 16px;
}

.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item {
  position: relative;
  padding-left: 24px;
}

.history-item::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid var(--bg-lunaire);
  box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.3);
  z-index: 2;
}

.history-item::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 7px;
  width: 2px;
  height: calc(100% + 8px);
  background: rgba(197, 160, 89, 0.15);
  z-index: 1;
}

.history-item:last-child::after {
  display: none;
}

.history-card {
  padding: 16px;
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-luna);
}

.history-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold-dark);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.history-summary {
  font-size: 13px;
  color: var(--text-dark);
  line-height: 1.4;
}

/* --- SETTINGS PAGE `#settings` --- */
.settings-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.setting-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(13, 19, 38, 0.05);
}

.setting-toggle-row:last-child {
  border-bottom: none;
}

.setting-toggle-label h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
}

.setting-toggle-label p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Switch Toggle CSS */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(13, 19, 38, 0.08);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(13, 19, 38, 0.1);
}

input:checked + .slider {
  background-color: var(--primary-midnight);
}

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

/* --- FIXED NAVIGATION BAR (FOR LOGGED IN USERS) --- */
.nav-bar-container {
  display: none; /* Shown in app when logged in */
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(197, 160, 89, 0.08);
  padding: 8px 16px;
  justify-content: space-around;
  z-index: 100;
  margin-top: auto;
}

.nav-bar-container.active {
  display: flex;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 6px;
  border-radius: 12px;
  transition: var(--transition-smooth);
  width: 64px;
}

.nav-item-icon {
  width: 22px;
  height: 22px;
  fill: var(--text-muted);
  margin-bottom: 4px;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  color: var(--primary-midnight);
}

.nav-item:hover .nav-item-icon {
  fill: var(--primary-midnight);
}

.nav-item.active {
  color: var(--primary-midnight);
}

.nav-item.active .nav-item-icon {
  fill: var(--accent-gold-dark);
  filter: drop-shadow(0 2px 4px rgba(197, 160, 89, 0.2));
  transform: translateY(-2px);
}

/* --- FOOTER IN GENERAL PAGES --- */
.page-footer {
  text-align: center;
  padding: 30px 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.page-footer a {
  color: var(--primary-midnight);
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

/* --- SYSTEM TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--primary-midnight);
  color: var(--text-light);
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-premium);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-container.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-icon {
  width: 14px;
  height: 14px;
  fill: var(--accent-gold-light);
}

/* Autocomplete suggestions dropdown styling */
.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 12px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow-premium);
  margin-top: 4px;
}

.autocomplete-suggestion-item {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  border-bottom: 1px solid rgba(197, 160, 89, 0.08);
  transition: var(--transition-smooth);
  text-align: left;
}

.autocomplete-suggestion-item:last-child {
  border-bottom: none;
}

.autocomplete-suggestion-item:hover {
  background: var(--soft-purple);
  color: var(--primary-midnight);
}

/* --- PREMIUM LANGUAGE SWITCHER --- */
.lang-switcher {
  display: inline-flex;
  background: rgba(13, 19, 38, 0.04);
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
  backdrop-filter: var(--blur-glass);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-btn:hover {
  color: var(--text-dark);
}

.lang-btn.active {
  background: var(--grad-gold);
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.3);
}

/* --- ORACLE ASTROLOGICAL CARDS --- */
.quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 20px;
}

/* Base style for quiz options as astrological card */
.quiz-option.quiz-option-card {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  border-radius: 24px;
  border: 1.5px solid rgba(197, 160, 89, 0.15); /* Light gold border */
  background: var(--bg-card);
  box-shadow: var(--shadow-luna);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  min-height: 150px;
  gap: 8px;
}

.quiz-option.quiz-option-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(197, 160, 89, 0.15);
  background: var(--bg-card); /* Keep same bg but show glow */
}

/* Selected state - mystical midnight gradient */
.quiz-option.quiz-option-card.selected {
  border-color: var(--accent-gold-light);
  background: var(--grad-midnight);
  color: var(--text-light);
  box-shadow: var(--shadow-premium);
}

/* Oracle Card Symbol Decor */
.quiz-card-decor {
  font-size: 24px;
  color: var(--accent-gold);
  margin-bottom: 4px;
  transition: var(--transition-bounce);
}

.quiz-option.quiz-option-card.selected .quiz-card-decor {
  color: var(--accent-gold-light);
  transform: scale(1.25) rotate(15deg);
}

.quiz-card-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  font-family: var(--font-sans);
}

/* Grid layout media query for very small screens */
@media (max-width: 480px) {
  .quiz-options-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile for tight layout */
    gap: 12px;
  }
  .quiz-option.quiz-option-card {
    padding: 16px 10px;
    min-height: 130px;
  }
  .quiz-card-decor {
    font-size: 20px;
  }
  .quiz-card-text {
    font-size: 13px;
  }
}

/* --- MID-QUIZ ASTRAL SYNTHESIS --- */
.synthesis-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 10px 0;
}

.synthesis-title {
  font-size: 24px;
  color: var(--accent-gold);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
}

.synthesis-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.synthesis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 680px;
  margin-bottom: 24px;
}

.synthesis-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(197, 160, 89, 0.15);
  border-radius: 20px;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-luna);
  transition: var(--transition-bounce);
}

.synthesis-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(197, 160, 89, 0.12);
}

.synthesis-icon {
  font-size: 28px;
  color: var(--accent-gold);
  animation: pulseGold 3s infinite ease-in-out;
}

.synthesis-card:nth-child(2) .synthesis-icon {
  animation-delay: 0.5s;
}

.synthesis-card:nth-child(3) .synthesis-icon {
  animation-delay: 1s;
}

.synthesis-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.synthesis-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  font-family: var(--font-serif);
}

.synthesis-desc {
  font-size: 13.5px;
  color: var(--text-dark);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 28px;
  background: rgba(197, 160, 89, 0.05);
  border-left: 3px solid var(--accent-gold);
  padding: 14px 18px;
  border-radius: 0 16px 16px 0;
  text-align: left;
}

@keyframes pulseGold {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
    filter: drop-shadow(0 0 0px rgba(197, 160, 89, 0));
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(197, 160, 89, 0.4));
  }
}

/* Mobile responsive for synthesis */
@media (max-width: 600px) {
  .synthesis-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .synthesis-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 16px 20px;
    gap: 16px;
    text-align: left;
  }
  .synthesis-card .synthesis-icon {
    font-size: 24px;
  }
  .synthesis-card div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .synthesis-title {
    font-size: 20px;
  }
  .synthesis-desc {
    font-size: 12.5px;
    padding: 12px 14px;
  }
}

/* --- CELESTIAL ORACLE CHATBOT --- */
.chat-wrapper {
  background: var(--bg-card);
  border: 1.5px solid rgba(197, 160, 89, 0.15);
  border-radius: 24px;
  box-shadow: var(--shadow-luna);
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 680px;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--blur-glass);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 5px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

/* Custom Scrollbar for Chat */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.2);
  border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 160, 89, 0.4);
}

/* Chat bubble styling */
.chat-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 13.5px;
  line-height: 1.6;
  font-family: var(--font-sans);
  animation: bubbleAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
}

/* User Message - right aligned, dark/gold theme */
.chat-bubble.user {
  align-self: flex-end;
  background: var(--grad-midnight);
  color: var(--text-light);
  border-bottom-right-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.25);
  box-shadow: var(--shadow-premium);
}

/* Oracle Message - left aligned, light/card theme */
.chat-bubble.oracle {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  border: 1.5px solid rgba(197, 160, 89, 0.15);
  box-shadow: 0 4px 12px rgba(13, 19, 38, 0.03);
}

/* Chat Suggestions */
.chat-suggestions-container {
  margin-top: 12px;
  margin-bottom: 8px;
  text-align: left;
}

.chat-suggestions-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
  margin-left: 4px;
}

.chat-suggestions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 110px;
  overflow-y: auto;
  padding: 2px;
}

.chat-suggest-btn {
  background: rgba(197, 160, 89, 0.06);
  border: 1px solid rgba(197, 160, 89, 0.25);
  color: var(--accent-gold-dark);
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
  text-align: left;
}

.chat-suggest-btn:hover {
  background: var(--grad-gold);
  color: var(--text-light);
  border-color: var(--accent-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2);
}

/* Chat Input Bar */
.chat-input-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  border-top: 1.5px solid rgba(197, 160, 89, 0.12);
  padding-top: 14px;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(197, 160, 89, 0.2);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-dark);
  font-family: var(--font-sans);
  transition: border-color 0.25s ease;
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.08);
}

.chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 24px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Typing Indicator animation */
.chat-typing-indicator {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #0d1326 0%, #1a2544 100%);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  border: 1.5px solid rgba(197, 160, 89, 0.35);
  margin-left: 5px;
  margin-bottom: 8px;
  animation: bubbleAppear 0.3s ease both;
  box-shadow: 0 4px 15px rgba(13, 19, 38, 0.15);
}

.tarot-mini-card-back {
  width: 18px;
  height: 25px;
  background: var(--grad-gold);
  border: 1px solid var(--accent-gold-light);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-midnight);
  font-size: 9px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  animation: cardPulse 1.5s infinite ease-in-out;
}

@keyframes cardPulse {
  0%, 100% { transform: scale(1) rotate(0deg); box-shadow: 0 2px 5px rgba(0,0,0,0.25); }
  50% { transform: scale(1.08) rotate(3deg); box-shadow: 0 4px 12px rgba(197, 160, 89, 0.4); }
}

.typing-text {
  font-size: 12px;
  color: var(--accent-gold-light);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 5px;
  height: 5px;
  background: var(--accent-gold-light);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

/* Mystical Tarot Card Bubbles */
.chat-bubble.oracle.tarot-card {
  align-self: flex-start;
  background: linear-gradient(135deg, #090d1a 0%, #16203d 100%);
  color: #fcfbfa;
  border-radius: 20px;
  border: 2px solid var(--accent-gold);
  padding: 16px;
  margin-bottom: 8px;
  box-shadow: 
    inset 0 0 0 3px rgba(13, 19, 38, 0.9),
    inset 0 0 0 4px rgba(197, 160, 89, 0.35),
    0 8px 25px rgba(13, 19, 38, 0.35);
  perspective: 1000px;
  animation: tarotCardReveal 0.8s cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes tarotCardReveal {
  0% {
    opacity: 0;
    transform: rotateY(-70deg) translateZ(-85px) translateY(15px);
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg) translateZ(0) translateY(0);
  }
}

.tarot-card-inner {
  border: 1px solid rgba(197, 160, 89, 0.25);
  padding: 12px;
  border-radius: 12px;
  background: rgba(13, 19, 38, 0.25);
}

.tarot-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.tarot-card-title {
  font-family: var(--font-serif-logo);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent-gold-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tarot-arcana-symbol {
  color: var(--accent-gold-light);
  font-size: 11px;
  animation: pulseStar 2s infinite ease-in-out;
}

@keyframes pulseStar {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes bubbleAppear {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.chat-bubble p {
  margin: 0 0 8px 0;
}
.chat-bubble p:last-child {
  margin-bottom: 0;
}
.chat-bubble strong {
  color: var(--accent-gold-dark);
  font-weight: 600;
}
.chat-bubble.user strong {
  color: var(--accent-gold-light);
}

/* Mobile responsive adjustments for chat */
@media (max-width: 480px) {
  .chat-wrapper {
    height: 580px;
    padding: 12px;
  }
  .chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 12.5px;
  }
  .chat-input {
    padding: 10px 14px;
    font-size: 12.5px;
  }
  .chat-send-btn {
    padding: 0 16px;
  }
  .chat-send-btn span {
    display: none; /* Hide 'Send' text on mobile */
  }
  .chat-suggest-btn {
    padding: 6px 12px;
    font-size: 10.5px;
  }
}


/* ============================================================
   CARTE DU JOUR — Daily Oracle Card
   ============================================================ */

.carte-du-jour-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 8px 0 16px;
}

/* Date pill */
.carte-date-pill {
  background: linear-gradient(135deg, rgba(197,160,89,0.12), rgba(229,195,132,0.08));
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- TAROT DECK SELECTION (v12) --- */
.carte-deck {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 380px;
  margin: 10px auto 30px;
  perspective: 1200px;
}

.carte-deck-scene {
  position: absolute;
  width: 170px;
  height: 270px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.4s ease;
  z-index: 2;
  transform-style: preserve-3d;
}

.carte-deck-scene .carte-card {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

/* Fanning out positions */
.carte-deck-scene.scene-left {
  transform: translateX(-80px) rotate(-10deg) scale(0.9);
  z-index: 1;
}

.carte-deck-scene.scene-center {
  transform: translateY(-10px) scale(1);
  z-index: 3;
}

.carte-deck-scene.scene-right {
  transform: translateX(80px) rotate(10deg) scale(0.9);
  z-index: 1;
}

/* Hover effects for fanning out cards */
.carte-deck-scene:hover {
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.carte-deck-scene.scene-left:hover {
  transform: translateX(-95px) translateY(-15px) rotate(-12deg) scale(0.95);
  z-index: 4;
}

.carte-deck-scene.scene-center:hover {
  transform: translateY(-25px) scale(1.05);
  z-index: 4;
}

.carte-deck-scene.scene-right:hover {
  transform: translateX(95px) translateY(-15px) rotate(12deg) scale(0.95);
  z-index: 4;
}

/* 3D Card Scene */
.carte-scene {
  width: 220px;
  height: 340px;
  perspective: 1000px;
  cursor: pointer;
}

.carte-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-transition: -webkit-transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 20px;
}

.carte-card.flipped {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.carte-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* === Mystery back (shown first) === */
.carte-face-back {
  background: linear-gradient(145deg, #0D1326, #1A2544);
  box-shadow: 0 20px 60px rgba(13, 19, 38, 0.3), 0 0 0 1px rgba(197,160,89,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carte-back-pattern {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  text-align: center;
}

.carte-back-star {
  font-size: 48px;
  color: var(--accent-gold);
  animation: carte-star-pulse 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(197,160,89,0.5));
}

@keyframes carte-star-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.15) rotate(10deg); opacity: 1; }
}

.carte-back-rings {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 80px;
  height: 80px;
}

.carte-back-rings span {
  position: absolute;
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 50%;
  animation: carte-ring-expand 3s ease-out infinite;
}

.carte-back-rings span:nth-child(1) { width: 30px; height: 30px; animation-delay: 0s; }
.carte-back-rings span:nth-child(2) { width: 55px; height: 55px; animation-delay: 0.5s; }
.carte-back-rings span:nth-child(3) { width: 80px; height: 80px; animation-delay: 1s; }

@keyframes carte-ring-expand {
  0% { opacity: 0.7; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.3); }
}

.carte-back-hint {
  font-size: 11px;
  color: rgba(229, 195, 132, 0.7);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: carte-hint-blink 2s ease-in-out infinite;
}

@keyframes carte-hint-blink {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* === Revealed front === */
.carte-face-front {
  background: linear-gradient(160deg, rgba(250,249,246,1) 0%, rgba(241,239,249,0.95) 100%);
  box-shadow: 0 20px 60px rgba(13, 19, 38, 0.15), 0 0 0 1px rgba(197,160,89,0.15);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  gap: 12px;
  text-align: center;
}

.carte-symbol {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(197,160,89,0.25));
  animation: carte-symbol-appear 0.5s ease-out both;
}

@keyframes carte-symbol-appear {
  from { transform: scale(0.5) rotate(-15deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.carte-name {
  font-family: var(--font-serif-title);
  font-size: 17px;
  font-weight: 600;
  color: var(--primary-midnight);
  letter-spacing: -0.01em;
}

.carte-divider {
  width: 48px;
  height: 2px;
  background: var(--grad-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.carte-affirmation {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-sans);
}

.carte-keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}

.carte-keyword-pill {
  background: linear-gradient(135deg, rgba(197,160,89,0.12), rgba(229,195,132,0.08));
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-gold-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Hover shimmer on card back */
.carte-scene:hover .carte-face-back {
  box-shadow: 0 24px 70px rgba(13, 19, 38, 0.35), 0 0 0 1px rgba(197,160,89,0.35), 0 0 30px rgba(197,160,89,0.1);
}

/* Draw button with gold glow */
.carte-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Reflection panel */
.carte-reflection-panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(197, 160, 89, 0.15);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(8px);
  animation: fadeInUp 0.5s ease-out both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.carte-journal-input {
  width: 100%;
  background: rgba(250, 249, 246, 0.8);
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-dark);
  resize: none;
  outline: none;
  transition: border-color 0.3s ease;
  line-height: 1.6;
}

.carte-journal-input:focus {
  border-color: rgba(197, 160, 89, 0.5);
}

/* Already drawn notice */
.carte-already-drawn {
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, rgba(197,160,89,0.06), rgba(229,195,132,0.04));
  border: 1px solid rgba(197, 160, 89, 0.15);
  border-radius: 20px;
  padding: 28px 24px;
  animation: fadeInUp 0.4s ease-out both;
}

.carte-already-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.carte-already-drawn p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Nav dot indicator (shows when not yet drawn today) */
.nav-item-carte {
  position: relative;
}

.nav-carte-dot {
  position: absolute;
  top: 3px;
  right: 10px;
  width: 7px;
  height: 7px;
  background: var(--accent-gold);
  border-radius: 50%;
  border: 1.5px solid var(--bg-lunaire);
  animation: dot-pulse 2s ease-in-out infinite;
  display: none;
}

.nav-carte-dot.visible {
  display: block;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}


/* ============================================================
   CARTE DU JOUR — POPUP MODAL
   ============================================================ */

.carte-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 19, 38, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: overlay-in 0.35s ease both;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.carte-popup-modal {
  position: relative;
  background: linear-gradient(160deg, #faf9f6 0%, #f4f2fc 100%);
  border: 1.5px solid rgba(197, 160, 89, 0.3);
  border-radius: 32px;
  padding: 48px 32px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 40px 100px rgba(13, 19, 38, 0.25),
    0 0 0 1px rgba(197, 160, 89, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.8);
  overflow: hidden;
  animation: modal-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Glow top accent */
.carte-popup-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

/* Floating particles */
.carte-popup-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.carte-popup-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-gold);
  opacity: 0;
  animation: particle-float 6s ease-in-out infinite;
}

.carte-popup-particles span:nth-child(1) { left: 15%; top: 80%; animation-delay: 0s;   animation-duration: 5s; }
.carte-popup-particles span:nth-child(2) { left: 30%; top: 70%; animation-delay: 0.8s; animation-duration: 6.5s; }
.carte-popup-particles span:nth-child(3) { left: 60%; top: 75%; animation-delay: 1.5s; animation-duration: 5.5s; }
.carte-popup-particles span:nth-child(4) { left: 80%; top: 65%; animation-delay: 0.3s; animation-duration: 7s; }
.carte-popup-particles span:nth-child(5) { left: 45%; top: 85%; animation-delay: 2s;   animation-duration: 4.8s; }
.carte-popup-particles span:nth-child(6) { left: 10%; top: 50%; animation-delay: 1.2s; animation-duration: 6s; width: 3px; height: 3px; }
.carte-popup-particles span:nth-child(7) { left: 85%; top: 40%; animation-delay: 0.6s; animation-duration: 5.2s; width: 3px; height: 3px; }
.carte-popup-particles span:nth-child(8) { left: 55%; top: 20%; animation-delay: 1.8s; animation-duration: 7.5s; }

@keyframes particle-float {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.8; }
  80%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-80px) scale(1.2); }
}

/* Close button */
.carte-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(197, 160, 89, 0.25);
  background: rgba(255,255,255,0.7);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.carte-popup-close:hover {
  background: rgba(255,255,255,0.95);
  color: var(--primary-midnight);
  border-color: rgba(197, 160, 89, 0.5);
  transform: scale(1.1) rotate(90deg);
}

/* Main symbol */
.carte-popup-symbol {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 20px rgba(197,160,89,0.3));
  animation: symbol-bounce 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes symbol-bounce {
  from { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Label above title */
.carte-popup-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold-dark);
  margin: 0 0 8px;
  animation: fade-in-up 0.5s ease 0.3s both;
}

/* Card name title */
.carte-popup-card-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-midnight);
  margin: 0 0 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  animation: fade-in-up 0.5s ease 0.35s both;
}

/* Divider */
.carte-popup-divider {
  width: 60px;
  height: 2.5px;
  background: var(--grad-gold);
  border-radius: 3px;
  margin: 0 auto 20px;
  animation: fade-in-up 0.5s ease 0.4s both;
}

/* Affirmation quote */
.carte-popup-affirmation {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dark);
  font-style: italic;
  font-family: var(--font-sans);
  margin: 0 0 20px;
  padding: 0 8px;
  position: relative;
  animation: fade-in-up 0.5s ease 0.45s both;
}

.carte-popup-affirmation::before {
  content: '"';
  font-size: 60px;
  font-family: var(--font-serif-title);
  color: rgba(197, 160, 89, 0.15);
  position: absolute;
  top: -20px;
  left: -8px;
  line-height: 1;
}

/* Keywords row */
.carte-popup-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
  animation: fade-in-up 0.5s ease 0.5s both;
}

.carte-popup-keywords .carte-keyword-pill {
  font-size: 11px;
  padding: 5px 14px;
  background: linear-gradient(135deg, rgba(197,160,89,0.15), rgba(229,195,132,0.1));
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 50px;
  font-weight: 700;
  color: var(--accent-gold-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* CTA button */
.carte-popup-btn {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in-up 0.5s ease 0.55s both;
  letter-spacing: 0.01em;
}

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

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

/* Mobile adjustments */
@media (max-width: 480px) {
  .carte-popup-modal {
    padding: 40px 24px 28px;
    border-radius: 28px;
    margin: 0 8px;
  }
  .carte-popup-symbol {
    font-size: 60px;
  }
  .carte-popup-card-name {
    font-size: 22px;
  }
  .carte-popup-affirmation {
    font-size: 14px;
  }
}

/* --- Language Switcher --- */
.lang-switcher {
  display: flex;
  background: rgba(197, 160, 89, 0.05);
  border: 1px solid rgba(197, 160, 89, 0.12);
  border-radius: 14px;
  padding: 2px;
  gap: 2px;
  align-items: center;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
  outline: none;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--accent-gold-dark);
}

.lang-btn.active {
  background: var(--accent-gold-dark);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(197, 160, 89, 0.15);
}

/* --- INTERACTIVE CELESTIAL CONSTELLATION MAP (CO-STAR MINIMALIST STYLE) --- */
.celestial-spin {
  animation: celestialRotate 240s linear infinite;
  transform-origin: 150px 150px;
}

@keyframes celestialRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.constellation-star-node {
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
  transform-origin: center;
}

.constellation-star-node:hover {
  transform: scale(1.4) !important;
  filter: drop-shadow(0 0 10px #ffffff) drop-shadow(0 0 4px var(--accent-gold-light));
}

.constellation-star-node.active {
  transform: scale(1.5) !important;
  filter: drop-shadow(0 0 16px #ffffff) drop-shadow(0 0 8px var(--accent-gold-light));
}

.constellation-aspect-line {
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 0.8;
  stroke-dasharray: 3, 4;
  animation: dash 65s linear infinite;
  transition: stroke 0.4s ease, stroke-width 0.4s ease, filter 0.4s ease, stroke-dasharray 0.4s ease;
  pointer-events: none;
}

.constellation-aspect-line.active {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.5;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}

.star-particle {
  animation: starTwinkle 4s infinite ease-in-out;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.85; }
}

/* Faint Grid Lines */
.constellation-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 0.5;
  pointer-events: none;
}

/* Planet text label styling on SVG */
.constellation-label {
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 300;
  fill: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  pointer-events: none;
  transition: fill 0.3s ease, font-weight 0.3s ease;
}

.constellation-star-node:hover + .constellation-label,
.constellation-star-node.active + .constellation-label {
  fill: #faf9f6;
  font-weight: 500;
}

/* Premium Co-Star styled dark translucent cards */
.astral-card {
  padding: 20px;
  background: var(--primary-midnight-light);
  background: linear-gradient(135deg, rgba(26, 37, 68, 0.85) 0%, rgba(13, 19, 38, 0.95) 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.astral-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0);
  pointer-events: none;
  transition: border-color 0.4s ease;
}

.astral-card.highlighted {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(30, 42, 78, 0.95) 0%, rgba(16, 23, 46, 0.98) 100%);
}

.astral-card.highlighted::before {
  border-color: rgba(255, 255, 255, 0.2);
}

.astral-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.astral-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif-title);
  color: #FAF9F6;
  font-size: 14.5px;
  letter-spacing: 0.02em;
}

.astral-card-glyph {
  font-size: 16px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold-light);
}

.astral-card-coordinate {
  font-size: 9.5px;
  color: var(--accent-gold-light);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-family: var(--font-sans);
  border: 1px solid rgba(229, 195, 132, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
}

.astral-card-body {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(250, 249, 246, 0.75);
}

.astral-card-body p {
  margin-bottom: 8px;
}
.astral-card-body p:last-child {
  margin-bottom: 0;
}

.astral-card-body strong {
  color: #FAF9F6;
  font-weight: 600;
}

/* Minimalist Co-Star Element Row */
.minimalist-element-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.minimalist-element-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.minimalist-element-name {
  color: rgba(250, 249, 246, 0.7);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: 150px;
}

.minimalist-element-bar-bg {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin: 0 16px;
  overflow: hidden;
}

.minimalist-element-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.minimalist-element-val {
  font-weight: 600;
  width: 35px;
  text-align: right;
  font-family: var(--font-sans);
}
