/* CSS Variables - Design System */
:root {
  --background: 0 0% 100%;
  --foreground: 215 25% 15%;
  --card: 0 0% 100%;
  --card-foreground: 215 25% 15%;
  /* Colors - HSL format for better manipulation */
  --primary: 215 100% 8%;
  --primary-foreground: 0 0% 100%;
  --primary-light: 215 100% 12%;
  --primary-lighter: 215 85% 16%;
  --success: 84, 85%, 35%;
  --success-foreground: 0 0% 100%;
  --success-light: 84 85% 42%;
  --warning: 35 100% 50%;
  --warning-foreground: 0 0% 100%;
  --warning-light: 15 80% 63%;
  --secondary: 215 15% 97%;
  --secondary-foreground: 215 25% 15%;
  --muted: 215 15% 96%;
  --muted-foreground: 215 12% 45%;
  --accent: 215 100% 97%;
  --accent-foreground: 215 100% 8%;
  --border: 215 15% 92%;
  --input: 215 15% 94%;
  --urgency: 36 98 50%;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(215 100% 6%) 0%, hsl(215 100% 6%) 0%);
  --gradient-success: linear-gradient(135deg, hsl(var(--success)), hsl(var(--success-light)));
  --gradient-warning: linear-gradient(135deg, hsl(var(--warning)), hsl(var(--warning-light)));
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  --gradient-info: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --gradient-hero: linear-gradient(135deg, hsl(0 0% 100%) 0%, hsl(0 0% 98%) 30%, hsl(0 0% 95%) 70%, hsl(0 0% 92%) 100%);
  --gradient-card: linear-gradient(135deg, hsl(0 0% 100%) 0%, hsl(215 15% 99%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(215 100% 97%) 0%, hsl(215 50% 98%) 100%);
  --gradient-urgency: linear-gradient(35deg, hsl(35 62% 90%) 0%, hsl(35 50% 90%) 100%);

  /* Shadows */
  --shadow-soft: 0 2px 10px -2px hsl(var(--primary) / 0.1);
  --shadow-medium: 0 8px 25px -5px hsl(var(--primary) / 0.15);
  --shadow-strong: 0 25px 50px -12px hsl(var(--primary) / 0.25);
  --shadow-xs: 0 1px 2px hsl(215 25% 15% / 0.05);
  --shadow-sm: 0 2px 4px hsl(215 25% 15% / 0.06), 0 1px 2px hsl(215 25% 15% / 0.1);
  --shadow-md: 0 4px 8px hsl(215 25% 15% / 0.07), 0 2px 4px hsl(215 25% 15% / 0.05);
  --shadow-lg: 0 8px 16px hsl(215 25% 15% / 0.08), 0 4px 8px hsl(215 25% 15% / 0.06);
  --shadow-xl: 0 16px 32px hsl(215 25% 15% / 0.1), 0 8px 16px hsl(215 25% 15% / 0.08);

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: 4rem;
  --font-headline: 3rem;
  --font-title: 1.75rem;
  --font-body-large: 1.25rem;
  --font-body: 1rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Layout */
  --content-max-width: 1200px;
  --section-padding: 4rem 0;
  --container-padding: 0 1rem;

  /* Animations */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Dark Theme Base (default) */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(10, 17, 34, 0.5);
  --bg-card-hover: rgba(30, 41, 59, 0.6);
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-tertiary: #686c70;
  --color-primary: #3b82f6;
  --color-primary-light: #60a5fa;
  --color-success: #0bb64a;
  --color-success-dark: #076027;
  --color-danger: #ef4444;
  --color-danger-dark: #dc2626;
  --color-info: #3b82f6;
  --color-warning: #f59e0b;
  --chart-grid: rgba(255, 255, 255, 0.05);
  --chart-text: #94a3b8;
  --border-color: rgba(51, 65, 85, 0.5);
  --glow-primary: 0 0 20px rgba(59, 130, 246, 0.3);
  --glow-success: 0 0 20px rgba(34, 197, 94, 0.3);
}

/* Dark Mode - Support both body.dark-mode and [data-theme="dark"] */
body.dark-mode,
[data-theme="dark"] {
  --background: 215 100% 4%;
  --foreground: 0 0% 98%;
  --card: 215 100% 6%;
  --card-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 215 100% 8%;
  --secondary: 215 30% 12%;
  --secondary-foreground: 0 0% 98%;
  --muted: 215 30% 12%;
  --muted-foreground: 215 20% 70%;
  --accent: 215 30% 12%;
  --accent-foreground: 0 0% 98%;
  --border: 215 30% 12%;
  --input: 215 30% 12%;
  --gradient-primary: linear-gradient(135deg, hsl(0 0% 98%) 0%, hsl(215 0% 98%) 0%);
  --gradient-hero: linear-gradient(135deg, hsl(215 100% 2%) 0%, hsl(215 100% 6%) 50%, hsl(215 85% 10%) 100%);
  --gradient-card: linear-gradient(135deg, hsl(215 100% 6%) 0%, hsl(215 85% 8%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(215 100% 6%) 0%, hsl(215 85% 8%) 100%);
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(10, 17, 34, 0.5);
  --bg-card-hover: rgba(30, 41, 59, 0.6);
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-tertiary: #686c70;
  --color-primary: #3b82f6;
  --color-primary-light: #60a5fa;
  --color-success: #0bb64a;
  --color-success-dark: #076027;
  --color-danger: #ef4444;
  --color-danger-dark: #dc2626;
  --color-info: #3b82f6;
  --color-warning: #f59e0b;
  --chart-grid: rgba(255, 255, 255, 0.05);
  --chart-text: #94a3b8;
  --border-color: rgba(51, 65, 85, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glow-primary: 0 0 20px rgba(59, 130, 246, 0.3);
  --glow-success: 0 0 20px rgba(34, 197, 94, 0.3);
}

/* Light Mode - Support [data-theme="light"] */
[data-theme="light"] {
  --background: 0 0% 100%;
  --foreground: 215 25% 15%;
  --card: 0 0% 100%;
  --card-foreground: 215 25% 15%;
  --primary: 215 100% 8%;
  --primary-foreground: 0 0% 100%;
  --secondary: 215 15% 97%;
  --secondary-foreground: 215 25% 15%;
  --muted: 215 15% 96%;
  --muted-foreground: 215 12% 45%;
  --accent: 215 100% 97%;
  --accent-foreground: 215 100% 8%;
  --border: 215 15% 92%;
  --input: 215 15% 94%;
  --bg-primary: #eceff2;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fc;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-tertiary: #718096;
  --color-primary: #5a67d8;
  --color-primary-light: #7c88e8;
  --color-success: #10b981;
  --color-success-dark: #059669;
  --color-danger: #f97316;
  --color-danger-dark: #ea580c;
  --color-info: #0ea5e9;
  --color-warning: #f59e0b;
  --chart-grid: rgba(0, 0, 0, 0.06);
  --chart-text: #4a5568;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --glow-primary: 0 0 20px rgba(90, 103, 216, 0.2);
  --glow-success: 0 0 20px rgba(16, 185, 129, 0.2);
}
/* Toast Notification */
.toast {
  position: fixed;
  top: 4rem;
  right: 2rem;
  z-index: 10000;
  background: hsl(var(--card));
  border-radius: 0.75rem;
  box-shadow: var(--shadow-strong);
  border: 1px solid hsl(var(--border));
  padding: 1rem 1.5rem;
  min-width: 300px;
  transform: translateX(120%);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.toast.peek {
  transform: translateX(90%);
}
.toast.peek .toast-text {
  display: none;
}
.toast.peek:hover .toast-text {
  display: block;
}
.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.toast-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--success));
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.toast-text {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.toast-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
body.booting {
    visibility: hidden;
}

@media (max-width: 768px) {
  .toast {
    right: 1rem;
    left: 1rem;
    min-width: auto;
  }
}
.spinner {
  width: 1rem !important;
  height: 1rem !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-top: 2px solid white !important;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.social-login {
  margin-top: 1.5rem;
}

.social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.social-btn {
  height: 2.75rem;
  padding: 0 1rem;
  background: hsl(var(--card));
  border: 2px solid hsl(var(--border));
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
}

.social-btn:hover {
  background: hsl(var(--accent) / 0.5);
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.social-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.social-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
.social-divider {
  position: relative;
  text-align: center;
  margin: 1rem 0;
}

.social-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: hsl(var(--border));
}

.social-divider span {
  position: relative;
  background: hsl(var(--background));
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
}
/* Footer Glassmorphism */
.footer-glass {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
}

[data-theme="light"] .footer-glass {
  background: rgba(255, 255, 255, 0.9);
  border-top-color: #e5e7eb;
}
/* Theme Toggle Button (from styles.css) */
.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--glow-primary);
  transform: translateY(-2px);
}

[data-theme="light"] .theme-toggle-btn {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: var(--bg-card-hover);
}
/* Sun and Moon Icon Classes */
.sun-icon {
  display: block;
}

.moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon,
body.dark-mode .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon,
body.dark-mode .moon-icon {
  display: none;
}

[data-theme="light"] .sun-icon {
  display: none !important;
}

[data-theme="light"] .moon-icon {
  display: block !important;
}
/* Light Theme Glassmorphism */
[data-theme="light"] #mainHeader {
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dark Theme Glassmorphism */
[data-theme="dark"] #mainHeader {
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.email-submit-btn {
  height: 3rem !important;
  padding: 0 1.5rem !important;
  background: #65a30d !important;
  color: white !important;
  border: none !important;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 1rem !important;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.email-submit-btn:hover {
  background: hsl(var(--success-light)) !important;
  transform: scale(1.02) !important;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-medium);
}
.email-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}