/* ==========================================================================
   GeoPulse AI - Main Global Design Tokens & Base CSS
   Aesthetic: Ultra-modern deep slate navy with AI electric blue & lavender glow
   ========================================================================== */

:root {
  /* Color Palette - Dark AI Palette */
  --bg-dark: #0B0F19;
  --bg-dark-elevated: #111827;
  --bg-card: rgba(17, 24, 39, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-input: rgba(15, 23, 42, 0.85);

  /* Primary AI Accents - Blue & Lilac Gradient System */
  --blue-primary: #3B82F6;
  --blue-glow: rgba(59, 130, 246, 0.4);
  --blue-hover: #2563EB;
  
  --purple-glow: #8B5CF6;
  --lilac-accent: #C084FC;
  --lilac-glow: rgba(192, 132, 252, 0.3);

  --emerald-accent: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.35);

  --amber-warning: #F59E0B;
  --rose-danger: #EF4444;

  /* Typography & Text */
  --text-main: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;
  --text-dim: #475569;

  /* Borders & Glassmorphism */
  --border-card: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(147, 197, 253, 0.3);
  --border-glow: rgba(192, 132, 252, 0.4);
  --glass-backdrop: blur(16px) saturate(180%);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions & Shadows */
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.05);
  --shadow-glow: 0 0 35px rgba(139, 92, 246, 0.25);
  --shadow-btn: 0 4px 20px rgba(59, 130, 246, 0.35);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Ambient Animated Gradient Background */
.bg-gradient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -2;
  background: 
    radial-gradient(circle at 50% 15%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(192, 132, 252, 0.08) 0%, transparent 40%);
  animation: pulseGlow 12s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.8; transform: scale(0.98); }
}

/* Subtle Grid Background Pattern */
.bg-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 80%);
}

/* Layout Wrapper */
#app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view-section {
  width: 100%;
  padding: 2rem 1.5rem 4rem 1.5rem;
  transition: opacity 0.3s ease;
}

.view-section.hidden {
  display: none !important;
}

.view-section.active {
  display: block;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-white { color: #FFFFFF !important; }
.text-purple { color: var(--lilac-accent) !important; }
.text-amber { color: var(--amber-warning) !important; }
.text-emerald { color: var(--emerald-accent) !important; }

.gradient-text-ai {
  background: linear-gradient(135deg, #60A5FA 0%, #A855F7 50%, #E879F9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient {
  background: linear-gradient(135deg, #93C5FD 0%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(192, 132, 252, 0.3);
}

/* Common Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-primary) 0%, var(--purple-glow) 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45);
  filter: brightness(1.1);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-card);
  backdrop-filter: var(--glass-backdrop);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-card);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: var(--lilac-accent);
}

.btn-full {
  width: 100%;
}

/* Simple Keyframe Animations */
.animate-fade-in { animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-slide-up { animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-slide-up-delay { animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards; opacity: 0; }
.animate-slide-up-delay2 { animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards; opacity: 0; }
.animate-fade-in-delay { animation: fadeIn 0.7s ease 0.4s forwards; opacity: 0; }
.animate-fade-in-delay2 { animation: fadeIn 0.7s ease 0.5s forwards; opacity: 0; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Spin animation for loading icons */
.spin {
  animation: spin 1s linear infinite;
}

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