/* GeoRiskPulse - Global Design System Tokens & Base CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color Palette - Premium Dark Theme */
  --bg-primary: #070b14;
  --bg-secondary: #0d1527;
  --bg-card: rgba(13, 21, 39, 0.78);
  --bg-card-hover: rgba(22, 33, 58, 0.88);
  --bg-glass: rgba(10, 16, 30, 0.72);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(0, 240, 255, 0.28);

  /* Brand Accents */
  --accent-cyan: #00f0ff;
  --accent-blue: #2563eb;
  --accent-orange: #ff6b35;
  --accent-red: #ff2a5f;
  --accent-amber: #ffb703;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Glass */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow-cyan: 0 0 20px rgba(0, 240, 255, 0.35);
  --shadow-glow-red: 0 0 20px rgba(255, 42, 95, 0.45);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --blur: blur(14px);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Glass Surface Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
}

/* Header Top Bar */
.top-navbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  pointer-events: auto;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f0ff 0%, #2563eb 50%, #ff2a5f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-cyan);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}

.brand-text h1 span.pulse-tag {
  color: var(--accent-cyan);
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* Search bar (Windy-style with GPS & Uploader Buttons) */
.search-wrapper {
  position: relative;
  width: 360px;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0 76px 0 36px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #fff;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 13px;
  pointer-events: none;
}

.search-action-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.search-action-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}

#btn-gps-locate {
  right: 38px;
  font-size: 12px;
}

#btn-open-uploader {
  right: 6px;
  color: #38bdf8;
}

#btn-open-uploader:hover {
  background: #0284c7;
  color: #fff;
}

/* Windy-Style Red Menu Button */
.btn-windy-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ffffff;
  padding: 6px 14px 6px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.5);
  transition: var(--transition);
}

.btn-windy-menu:hover {
  background: #dc2626;
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.8);
  transform: translateY(-1px);
}

.btn-windy-menu .menu-burger {
  font-size: 16px;
  line-height: 1;
}

/* Stats Badges */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-live-pulse {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 42, 95, 0.15);
  border: 1px solid rgba(255, 42, 95, 0.35);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: #ff85a1;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
  animation: live-blink 1.5s infinite;
}

@keyframes live-blink {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

.btn-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0099ff 100%);
  color: #050b14;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.btn-danger {
  background: linear-gradient(135deg, #ff2a5f 0%, #d90429 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 42, 95, 0.35);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 42, 95, 0.55);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}
