/* ==========================================================================
   DESIGN SYSTEM - NUDE MINIMALIST & FORMAL ELEGANCE
   ========================================================================== */

:root {
  /* Color Palette - Premium Nude Tones */
  --bg-primary: #FDFBF7;
  --bg-secondary: #F7F0EA;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  
  --color-text-main: #3C3230;
  --color-text-muted: #796C68;
  --color-text-light: #A39490;
  
  --color-border: #E8DDD3;
  --color-border-hover: #D0BEB0;
  --color-border-active: #B59A82;
  
  --color-accent-gold: #C5A880;
  --color-accent-gold-dark: #A3835B;
  --color-accent-soft: #F2E8DF;
  --color-accent-glow: rgba(197, 168, 128, 0.25);
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Shadows & Glassmorphism */
  --shadow-sm: 0 4px 12px rgba(85, 65, 58, 0.04);
  --shadow-md: 0 10px 30px rgba(85, 65, 58, 0.08);
  --shadow-lg: 0 20px 45px rgba(85, 65, 58, 0.12);
  --shadow-active: 0 8px 24px rgba(163, 131, 91, 0.2);
  
  --backdrop-blur: blur(20px);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient Animated Background Orbs */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #F3E3D3 0%, rgba(243, 227, 211, 0) 70%);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #EAD8C7 0%, rgba(234, 216, 199, 0) 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: -6s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #E8D6C9 0%, rgba(232, 214, 201, 0) 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* Main Layout Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent-gold-dark);
  font-weight: 600;
  backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-sm);
}

.sparkle-icon {
  font-size: 0.9rem;
  color: var(--color-accent-gold);
}

/* Main Glassmorphism Card Container */
.main-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
  position: relative;
}

/* Section Views Handling */
.view-section {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* HERO / INTRO VIEW */
.hero-content {
  text-align: center;
  max-width: 660px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.main-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 600;
  color: var(--color-text-main);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  font-weight: 400;
  line-height: 1.7;
}

.feature-pills {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  font-weight: 500;
}

.pill i {
  color: var(--color-accent-gold-dark);
}

/* BUTTON STYLES */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #4A3D39 0%, #2E2523 100%);
  color: #FAF6F0;
  padding: 16px 36px;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(54, 43, 39, 0.25);
  transition: var(--transition-bounce);
  text-decoration: none;
  font-family: var(--font-sans);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(54, 43, 39, 0.35);
  background: linear-gradient(135deg, #5C4C47 0%, #3A2F2C 100%);
}

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

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-secondary);
  color: var(--color-text-main);
  padding: 14px 28px;
  border-radius: 50px;
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-sans);
}

.btn-secondary:hover:not(:disabled) {
  background: #EFE4DA;
  border-color: var(--color-border-hover);
  color: var(--color-text-main);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* QUIZ VIEW STYLES */
.quiz-header {
  margin-bottom: 32px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.progress-bar-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--color-accent-gold) 0%, var(--color-accent-gold-dark) 100%);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.question-wrapper {
  margin-bottom: 40px;
}

.question-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 8px;
  line-height: 1.3;
}

.question-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

/* OPTIONS GRID - Interactive Box Style */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-hover);
  border: 1.5px solid var(--color-border);
  padding: 18px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-bounce);
  user-select: none;
  position: relative;
  outline: none;
}

.option-card:hover {
  border-color: var(--color-border-hover);
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.option-card.selected {
  border-color: var(--color-accent-gold-dark);
  background: var(--color-accent-soft);
  box-shadow: var(--shadow-active);
  transform: scale(1.01);
}

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

/* Custom radio box indicator */
.radio-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  flex-shrink: 0;
  background: #FFF;
}

.option-card.selected .radio-indicator {
  border-color: var(--color-accent-gold-dark);
  background: var(--color-accent-gold-dark);
}

.radio-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFF;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition-bounce);
}

.option-card.selected .radio-indicator::after {
  opacity: 1;
  transform: scale(1);
}

.option-text {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text-main);
}

.option-card.selected .option-text {
  font-weight: 600;
  color: #2E2523;
}

.quiz-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

/* LOADING VIEW */
.loading-content {
  text-align: center;
  padding: 60px 20px;
}

.crystal-spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-gem {
  font-size: 2.5rem;
  color: var(--color-accent-gold-dark);
  animation: pulseRotate 2s infinite ease-in-out;
}

@keyframes pulseRotate {
  0% { transform: scale(0.9) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.15) rotate(180deg); opacity: 1; filter: drop-shadow(0 0 12px var(--color-accent-gold)); }
  100% { transform: scale(0.9) rotate(360deg); opacity: 0.7; }
}

.loading-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--color-text-main);
  margin-bottom: 8px;
}

.loading-text {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* RESULT VIEW STYLES */
.result-card {
  text-align: center;
  animation: fadeIn 0.8s ease;
}

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

.result-badge {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--color-accent-gold-dark);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.result-stone-name {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.1;
  margin-bottom: 6px;
}

.result-essence {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  font-style: italic;
}

.stone-image-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stone-image-halo {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 168, 128, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  animation: haloGlow 3s ease-in-out infinite alternate;
}

@keyframes haloGlow {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1.1); opacity: 0.95; }
}

.stone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(50, 40, 35, 0.15);
  border: 4px solid #FFFFFF;
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease;
}

.stone-img:hover {
  transform: scale(1.03) rotate(2deg);
}

.stone-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  margin-bottom: 40px;
}

.detail-box {
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  padding: 22px 26px;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.detail-box:hover {
  border-color: var(--color-border-hover);
  background: #FAF3EC;
}

.detail-box h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent-gold-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-box p {
  font-size: 0.98rem;
  color: var(--color-text-main);
  line-height: 1.6;
}

.affirmation-quote {
  font-family: var(--font-serif);
  font-size: 1.25rem !important;
  font-style: italic;
  color: #2E2523 !important;
  font-weight: 500;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #362B27;
  color: #FAF6F0;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 100;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* FOOTER */
.site-footer {
  text-align: center;
  padding-top: 30px;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 640px) {
  .app-container {
    padding: 20px 12px;
  }
  
  .main-card {
    padding: 32px 20px;
    border-radius: var(--radius-lg);
  }
  
  .main-title {
    font-size: 2.1rem;
  }
  
  .question-title {
    font-size: 1.6rem;
  }
  
  .result-stone-name {
    font-size: 2.5rem;
  }
  
  .stone-image-container {
    width: 180px;
    height: 180px;
  }
  
  .result-actions {
    flex-direction: column-reverse;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
  }
}
