:root {
  /* Light theme colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-color: rgba(15, 23, 42, 0.1);
  
  /* Gradient colors */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  
  /* Theme transition */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

[data-theme="dark"] {
  /* Dark theme colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.3);
  
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
  --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

.theme-transition * {
  transition: background var(--transition-normal), 
              color var(--transition-normal), 
              border-color var(--transition-normal),
              box-shadow var(--transition-normal);
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out;
}

.gradient-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--gradient-primary);
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.gradient-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--gradient-secondary);
  bottom: -150px;
  left: -150px;
  animation-delay: -7s;
}

.gradient-orb-3 {
  width: 200px;
  height: 200px;
  background: var(--gradient-accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* Theme Toggle */
.theme-toggle-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-around;
  transition: all var(--transition-normal);
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px var(--shadow-color);
}

.theme-toggle i {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.theme-toggle i.sun-icon {
  opacity: 1;
}

.theme-toggle i.moon-icon {
  opacity: 0;
  position: absolute;
}

.theme-toggle i.system-icon {
  opacity: 0;
  position: absolute;
}

[data-theme="dark"] .theme-toggle i.sun-icon {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle i.moon-icon {
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  .theme-toggle i.system-icon {
    opacity: 1;
  }
  .theme-toggle i.sun-icon,
  .theme-toggle i.moon-icon {
    opacity: 0;
  }
}

/* Navigation */
.nav-container {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: all var(--transition-normal);
}

[data-theme="dark"] .nav-container {
  background: rgba(15, 23, 42, 0.9);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

.nav-link:hover::after {
  width: 100%;
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-color);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero-section {
  padding: 120px 0;
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: 64px;
  animation: fadeInUp 0.8s ease-out;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Features Section */
.features-section {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--bg-primary);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow-color);
  border-color: transparent;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon i {
  color: white;
  width: 28px;
  height: 28px;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
  padding: 120px 0;
  background: var(--bg-primary);
}

.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}

.toggle-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  transition: var(--transition-normal);
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 3px;
  background: var(--gradient-primary);
  transition: var(--transition-normal);
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--bg-tertiary);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.savings-badge {
  background: var(--gradient-secondary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-normal);
}

.savings-badge.visible {
  opacity: 1;
  transform: scale(1);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow-color);
}

.pricing-card.popular {
  border-color: transparent;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  box-shadow: 0 20px 40px var(--shadow-color);
  transform: scale(1.05);
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-8px);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.plan-header {
  margin-bottom: 32px;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.plan-description {
  color: var(--text-secondary);
}

.plan-price {
  margin-bottom: 16px;
}

.price-monthly,
.price-yearly {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.price-period {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.price-yearly {
  display: none;
}

.billing-yearly .price-monthly {
  display: none;
}

.billing-yearly .price-yearly {
  display: inline;
}

.plan-savings {
  margin-bottom: 24px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 4px solid #10b981;
}

.original-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.savings-amount {
  display: block;
  color: #10b981;
  font-weight: 600;
  font-size: 0.875rem;
}

.plan-features {
  list-style: none;
  margin-bottom: 32px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.plan-features i {
  color: #10b981;
  width: 16px;
  height: 16px;
}

/* CTA Section */
.cta-section {
  padding: 120px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.cta-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  background: var(--bg-tertiary);
  padding: 64px 0 32px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 80px 0;
  }
  
  .features-section,
  .pricing-section,
  .cta-section {
    padding: 80px 0;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-large {
    width: 100%;
    max-width: 300px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-card.popular {
    transform: none;
  }
  
  .pricing-card.popular:hover {
    transform: translateY(-8px);
  }
  
  .billing-toggle {
    flex-wrap: wrap;
  }
}

/* Loading Animation */
.loading {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Hover animations for interactive elements */
.nav-actions button,
.feature-card,
.pricing-card,
.footer-links a {
  transition: all var(--transition-normal);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}