/*
Theme Name: LiveWorldAI
Theme URI: https://liveworldai.netslim.nl
Author: LiveWorldAI Team
Author URI: https://liveworldai.netslim.nl
Description: Een real-time wereld event AI dashboard met interactieve wereldkaart, AI-analyse van wereldgebeurtenissen, user registratie en live data feeds voor aardbevingen, crypto crashes, beursnieuws, stroomstoringen, oorlog en meer.
Version: 1.0.0
License: GPL v2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: liveworldai
Domain Path: /languages
Tags: dashboard, ai, world-map, real-time, events, responsive, dark-mode
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ===== CSS VARIABLES ===== */
:root {
  --color-bg: #0a0e1a;
  --color-bg-light: #111827;
  --color-bg-card: #1a1f2e;
  --color-bg-hover: #232838;
  --color-border: #2d3748;
  --color-primary: #00d4ff;
  --color-primary-dark: #00a8cc;
  --color-secondary: #7c3aed;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-dark: #64748b;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== IMPORT FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

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

.hidden { display: none !important; }

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 212, 255, 0.3); }
  50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.6); }
}

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

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease forwards;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  height: 70px;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
  background: rgba(0, 212, 255, 0.08);
}

.main-nav a .nav-icon {
  font-size: 1.1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
  color: #000;
}

.btn-secondary {
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--color-text);
  background: rgba(255,255,255,0.05);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ===== LIVE INDICATOR ===== */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-success);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-bottom: 32px;
  font-family: var(--font-mono);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.hero-description {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 80px;
  padding: 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

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

.hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-mono);
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ===== MAP SECTION ===== */
.map-section {
  position: relative;
  padding: 40px 0;
}

.map-container {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

#world-map {
  width: 100%;
  height: 100%;
  background: #0d1117;
}

.map-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 500;
}

.map-overlay > * {
  pointer-events: all;
}

.map-controls {
  display: flex;
  gap: 8px;
}

.map-control-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.map-control-btn:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-primary);
}

/* ===== EVENT FILTERS ===== */
.event-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-muted);
  font-family: var(--font-main);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.filter-btn.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn .filter-icon {
  font-size: 1rem;
}

.filter-btn .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--color-bg-hover);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ===== EVENT POPUP ===== */
.event-popup {
  min-width: 280px;
  max-width: 320px;
}

.event-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.event-popup-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
}

.event-popup-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.event-popup-type {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-popup-body {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 12px;
}

.event-popup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.event-popup-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.event-popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* ===== EVENT CARDS ===== */
.events-section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.event-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: var(--transition);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 212, 255, 0.3);
}

.event-card:hover::before {
  opacity: 1;
}

.event-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.event-card-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-type-earthquake { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.event-type-crypto { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.event-type-finance { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.event-type-power { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.event-type-war { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.event-type-outage { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.event-type-disaster { background: rgba(249, 115, 22, 0.15); color: #fb923c; }

.event-card-severity {
  display: flex;
  gap: 3px;
}

.severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}

.severity-dot.active {
  background: var(--color-danger);
}

.event-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.event-card-description {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.event-card-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.event-card-time {
  font-family: var(--font-mono);
}

/* ===== AI CHAT SECTION ===== */
.ai-section {
  padding: 60px 0;
}

.ai-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 600px;
}

.ai-chat {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}

.ai-avatar {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50%;
  font-size: 1.5rem;
}

.ai-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.ai-info p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 8px;
}

.ai-message {
  display: flex;
  gap: 12px;
  max-width: 85%;
}

.ai-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 1rem;
}

.ai-message-avatar.ai {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.ai-message-avatar.user {
  background: var(--color-bg-hover);
}

.ai-message-content {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ai-message.user .ai-message-content {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
}

.ai-input-area {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  margin-top: 16px;
}

.ai-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.ai-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.ai-input::placeholder {
  color: var(--color-text-dark);
}

.ai-sidebar {
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ai-status-panel {
  padding: 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.ai-status-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.ai-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.ai-status-item:last-child {
  border-bottom: none;
}

.ai-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.ai-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ai-status-dot.online {
  background: var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}

.ai-status-dot.busy {
  background: var(--color-warning);
}

/* ===== AUTH FORMS ===== */
.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 40px;
  position: relative;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius);
  font-size: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-dark);
}

.form-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  margin-top: 6px;
}

.form-success {
  color: var(--color-success);
  font-size: 0.85rem;
  margin-top: 6px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ===== DASHBOARD ===== */
.dashboard-section {
  padding: 100px 0 40px;
  min-height: 100vh;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.dashboard-sidebar {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 90px;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.dashboard-user-avatar {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
}

.dashboard-user-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.dashboard-user-info p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.dashboard-nav {
  list-style: none;
}

.dashboard-nav li {
  margin-bottom: 4px;
}

.dashboard-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
  background: rgba(0, 212, 255, 0.08);
  color: var(--color-primary);
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dashboard-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== STATS ROW ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.stat-card-change {
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-card-change.positive { color: var(--color-success); }
.stat-card-change.negative { color: var(--color-danger); }

/* ===== PREFERENCE CARDS ===== */
.preferences-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.preference-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.preference-card:hover {
  border-color: var(--color-primary);
}

.preference-card.active {
  background: rgba(0, 212, 255, 0.05);
  border-color: var(--color-primary);
}

.preference-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.preference-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.preference-info p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  margin-left: auto;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--color-border);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}

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

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

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-column h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #000;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    position: static;
  }
  
  .ai-container {
    grid-template-columns: 1fr;
  }
  
  .ai-sidebar {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-header {
    height: auto;
    padding: 12px 0;
  }
  
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .main-nav {
    order: 3;
    width: 100%;
  }
  
  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .hero-section {
    padding-top: 160px;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
  }
  
  .events-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .preferences-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ===== LEAFLET MAP OVERRIDES ===== */
.leaflet-container {
  background: #0d1117 !important;
  font-family: var(--font-main) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--color-bg-card) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
  color: var(--color-text) !important;
  box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-tip {
  background: var(--color-bg-card) !important;
  border: 1px solid var(--color-border) !important;
}

.leaflet-popup-close-button {
  color: var(--color-text-muted) !important;
  font-size: 20px !important;
  padding: 8px !important;
}

.leaflet-popup-close-button:hover {
  color: var(--color-danger) !important;
}

.leaflet-control-zoom a {
  background: var(--color-bg) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--color-bg-hover) !important;
}

/* ===== LOADING STATES ===== */
.loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-card) 25%,
    var(--color-bg-hover) 50%,
    var(--color-bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer-load {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== NOTIFICATION TOAST ===== */
.toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  max-width: 400px;
}

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-danger); }
.toast-warning { border-left: 4px solid var(--color-warning); }
.toast-info { border-left: 4px solid var(--color-primary); }

/* ===== SECTION DIVIDER ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 60px 0;
}

/* ===== SCANLINE EFFECT ===== */
.scanline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0, 212, 255, 0.1);
  animation: scanline 8s linear infinite;
  pointer-events: none;
}

/* ===== PARTICLE CANVAS ===== */
#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== LEAFLET CUSTOM MARKERS ===== */
.custom-marker {
  background: transparent;
  border: none;
}

.marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.2);
}

.marker-pulse {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  animation: markerPulse 2s ease-out infinite;
}

@keyframes markerPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Type-specific marker colors */
.marker-earthquake { background: rgba(239, 68, 68, 0.9); }
.marker-crypto { background: rgba(245, 158, 11, 0.9); }
.marker-finance { background: rgba(16, 185, 129, 0.9); }
.marker-power { background: rgba(251, 191, 36, 0.9); }
.marker-war { background: rgba(239, 68, 68, 0.9); }
.marker-outage { background: rgba(148, 163, 184, 0.9); }
.marker-disaster { background: rgba(249, 115, 22, 0.9); }

/* Pulse colors */
.marker-earthquake + .marker-pulse { background: rgba(239, 68, 68, 0.4); }
.marker-crypto + .marker-pulse { background: rgba(245, 158, 11, 0.4); }
.marker-finance + .marker-pulse { background: rgba(16, 185, 129, 0.4); }
.marker-power + .marker-pulse { background: rgba(251, 191, 36, 0.4); }
.marker-war + .marker-pulse { background: rgba(239, 68, 68, 0.4); }
.marker-outage + .marker-pulse { background: rgba(148, 163, 184, 0.4); }
.marker-disaster + .marker-pulse { background: rgba(249, 115, 22, 0.4); }

/* ===== MAP LEGEND ===== */
.map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  z-index: 500;
  font-size: 0.8rem;
}

.map-legend-title {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
  font-size: 1.2rem;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #000;
  transform: translateY(-4px);
}

/* ===== RESPONSIVE NAV MOBILE ===== */
.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 16px;
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .site-header,
  .site-footer,
  .scroll-top,
  .ai-input-area,
  .map-controls,
  .event-filters {
    display: none !important;
  }
  
  .map-container {
    height: 500px;
    page-break-inside: avoid;
  }
}
