/**
 * Cosmic Alchemy - Global Styles
 * Dreamy, cosmic, mysterious but cute aesthetic
 * Target: North American young women (18-30)
 */

/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
  /* Primary Colors */
  --violet-deep: #2D1B4E;
  --violet-mid: #5B3A8C;
  --violet-light: #9B6DD7;
  --violet-pale: #D4BBFF;
  
  /* Accent Colors */
  --gold: #FFD700;
  --gold-light: #FFE566;
  --gold-dark: #D4A600;
  
  /* Background Colors */
  --deep-blue: #0D1B2A;
  --navy: #1B263B;
  --cosmic-dark: #0A0612;
  
  /* Text Colors */
  --text-primary: #FEFEFE;
  --text-secondary: rgba(254, 254, 254, 0.7);
  --text-muted: rgba(254, 254, 254, 0.5);
  
  /* Element Colors (Wu Xing) */
  --metal: #C0C0C0;
  --wood: #8B4513;
  --water: #4A90D9;
  --fire: #E25822;
  --earth: #DAA520;
  
  /* Gradients */
  --gradient-cosmic: linear-gradient(135deg, #2D1B4E 0%, #0D1B2A 50%, #1B263B 100%);
  --gradient-hero: linear-gradient(180deg, #0A0612 0%, #1B263B 50%, #2D1B4E 100%);
  --gradient-gold: linear-gradient(135deg, #FFD700, #FFE566);
  --gradient-violet: linear-gradient(135deg, #5B3A8C, #9B6DD7);
  
  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', 'Segoe UI', sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(91, 58, 140, 0.2);
  --shadow-glow: 0 0 30px rgba(155, 109, 215, 0.4);
  --shadow-gold: 0 0 20px rgba(255, 215, 0, 0.3);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gradient-hero);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--deep-blue);
}

::-webkit-scrollbar-thumb {
  background: var(--violet-mid);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--violet-light);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 65ch;
}

.text-gold { color: var(--gold); }
.text-violet { color: var(--violet-light); }
.text-center { text-align: center; }

/* ============================================
   Links & Buttons
   ============================================ */
a {
  color: var(--violet-light);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--cosmic-dark);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--violet-light);
  border: 2px solid var(--violet-light);
}

.btn-secondary:hover {
  background: var(--violet-light);
  color: var(--cosmic-dark);
}

.btn-violet {
  background: var(--gradient-violet);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.btn-violet:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(155, 109, 215, 0.5);
}

.btn-lg {
  padding: 1.25rem 3rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
}

/* ============================================
   Layout Components
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xxl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.divider {
  width: 80px;
  height: 2px;
  background: var(--gradient-gold);
  margin: var(--space-md) auto;
  border-radius: var(--radius-full);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition-smooth);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 6, 18, 0.95);
  backdrop-filter: blur(20px);
  padding: 0.75rem 0;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: 0.05em;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-violet);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition-smooth);
  border-radius: var(--radius-full);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--space-md) var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(91, 58, 140, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(155, 109, 215, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: var(--space-md);
  animation: fadeInDown 0.8s ease;
}

.hero-title {
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-title .highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

/* ============================================
   Star Field Background
   ============================================ */
.star-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 50%;
  opacity: 0.6;
  animation: twinkle 3s ease-in-out infinite;
}

.star.large {
  width: 4px;
  height: 4px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.star.golden {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.star.violet {
  background: var(--violet-light);
  box-shadow: 0 0 8px var(--violet-light);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Cards & Components
   ============================================ */
.card {
  background: linear-gradient(145deg, rgba(45, 27, 78, 0.4), rgba(27, 38, 59, 0.6));
  border: 1px solid rgba(155, 109, 215, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(155, 109, 215, 0.4);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-violet);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-soft);
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ============================================
   Form Elements
   ============================================ */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: rgba(27, 38, 59, 0.8);
  border: 1px solid rgba(155, 109, 215, 0.3);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--violet-light);
  box-shadow: 0 0 20px rgba(155, 109, 215, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239B6DD7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Element Selector (Wu Xing) */
.element-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
}

.element-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  background: rgba(27, 38, 59, 0.6);
  border: 2px solid rgba(155, 109, 215, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
}

.element-btn:hover {
  border-color: var(--violet-light);
  background: rgba(91, 58, 140, 0.3);
}

.element-btn.selected {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: var(--shadow-gold);
}

.element-btn .icon {
  font-size: 2rem;
}

.element-btn .name {
  letter-spacing: 0.05em;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--cosmic-dark);
  padding: var(--space-xl) 0 var(--space-lg);
  border-top: 1px solid rgba(155, 109, 215, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand .logo {
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links h4 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(155, 109, 215, 0.1);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   Animations
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Animation */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ============================================
   Report Display
   ============================================ */
.report-box {
  background: linear-gradient(145deg, rgba(45, 27, 78, 0.5), rgba(13, 27, 42, 0.8));
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

.report-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: var(--space-md);
  text-align: center;
}

.report-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  text-align: center;
}

.report-text strong {
  color: var(--violet-light);
}

/* Hidden Content */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  padding: 1rem 1.5rem;
  background: rgba(45, 27, 78, 0.95);
  border: 1px solid var(--violet-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
  transform: translateX(calc(100% + 2rem));
  transition: var(--transition-smooth);
  z-index: 9999;
  font-size: 0.95rem;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.toast.error {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

/* ============================================
   Spinner
   ============================================ */
.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(155, 109, 215, 0.2);
  border-top-color: var(--violet-light);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: var(--space-lg) auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   PayPal Container
   ============================================ */
.paypal-wrapper {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
}

#paypal-button-container {
  min-height: 50px;
}

/* ============================================
   Pricing Cards
   ============================================ */
.pricing-card {
  background: linear-gradient(145deg, rgba(45, 27, 78, 0.4), rgba(27, 38, 59, 0.7));
  border: 1px solid rgba(155, 109, 215, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: var(--transition-smooth);
}

.pricing-card.featured {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(45, 27, 78, 0.6), rgba(27, 38, 59, 0.8));
  transform: scale(1.05);
  box-shadow: var(--shadow-gold);
}

.pricing-card:hover {
  transform: translateY(-10px);
}

.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-10px);
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--gold);
  margin: var(--space-sm) 0;
}

.pricing-amount sup {
  font-size: 1.5rem;
  vertical-align: super;
}

.pricing-features {
  list-style: none;
  margin: var(--space-md) 0;
  text-align: left;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(155, 109, 215, 0.1);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-features li::before {
  content: '✧';
  color: var(--violet-light);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
  .pricing-card.featured {
    transform: scale(1);
  }
  
  .pricing-card.featured:hover {
    transform: translateY(-10px);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 6, 18, 0.98);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid rgba(155, 109, 215, 0.2);
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding-top: 100px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .element-selector {
    grid-template-columns: repeat(3, 1fr);
  }

  .element-btn:nth-child(4),
  .element-selector .element-btn:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .element-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .card {
    padding: var(--space-md);
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-lg { margin-top: var(--space-lg); }
.py-lg { padding: var(--space-lg) 0; }

/* Element Colors */
.element-metal { color: var(--metal); }
.element-wood { color: var(--wood); }
.element-water { color: var(--water); }
.element-fire { color: var(--fire); }
.element-earth { color: var(--earth); }
