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

:root {
  --bg-deep: #07090e;
  --bg-card: rgba(13, 17, 27, 0.82);
  --border-card: rgba(45, 55, 75, 0.6);
  --accent-cyan: #00f2fe;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: #e2e8f0;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

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

/* Cybernetic Grid Background */
.cyber-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

.glass-panel-glow {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 242, 254, 0.25);
  box-shadow: 0 0 25px -5px rgba(0, 242, 254, 0.15), 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* Glowing text */
.text-glow-cyan {
  text-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
}

.text-glow-emerald {
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.text-glow-rose {
  text-shadow: 0 0 12px rgba(244, 63, 94, 0.6);
}

/* Neon Radar Sweep Animation */
@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-sweep-element {
  animation: radar-sweep 4s linear infinite;
  transform-origin: center;
}

/* Pulse Beacon */
@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

.pulse-beacon {
  position: absolute;
  border-radius: 50%;
  animation: pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* Glowing Border Pulse */
@keyframes border-glow-pulse {
  0%, 100% { border-color: rgba(0, 242, 254, 0.3); }
  50% { border-color: rgba(0, 242, 254, 0.8); }
}

.pulse-border {
  animation: border-glow-pulse 3s infinite ease-in-out;
}

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

::-webkit-scrollbar-track {
  background: rgba(10, 14, 23, 0.8);
}

::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

/* 3D Globe Container */
#globe-canvas-container {
  width: 100%;
  height: 100%;
  min-height: 440px;
  position: relative;
  overflow: hidden;
  cursor: grab;
}

#globe-canvas-container:active {
  cursor: grabbing;
}

/* Badge glow styles */
.badge-pass {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.badge-warn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.badge-fail {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

/* Waveform Canvas */
#sensor-wave-canvas {
  width: 100%;
  height: 70px;
  border-radius: 6px;
  background: rgba(7, 9, 14, 0.7);
}

/* Terminal code view */
.terminal-block {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: #090c14;
  border: 1px solid rgba(30, 41, 59, 0.8);
  border-radius: 8px;
  padding: 12px;
  color: #38bdf8;
  max-height: 380px;
  overflow-y: auto;
}

/* Leaflet Dark Customizations */
.leaflet-container {
  background: #060911 !important;
  font-family: var(--font-mono) !important;
}

.leaflet-bar {
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-bar a {
  background-color: rgba(13, 17, 27, 0.9) !important;
  color: #38bdf8 !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2) !important;
}

.leaflet-bar a:hover {
  background-color: rgba(0, 242, 254, 0.2) !important;
  color: #fff !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(13, 17, 27, 0.95) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(0, 242, 254, 0.4) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 242, 254, 0.2) !important;
}

.leaflet-popup-tip {
  background: rgba(13, 17, 27, 0.95) !important;
}

.cyber-leaflet-marker {
  pointer-events: auto;
}

/* Custom Cyber Dark Filter for OpenStreetMap (No Watermark / 100% Free) */
.cyber-dark-tiles {
  filter: brightness(0.65) invert(1) contrast(2.8) hue-rotate(195deg) saturate(0.35) brightness(0.9) !important;
}
