:root {
  --bg-deep: #0A0A14;
  --bg-card: #1A1A2E;
  --bg-card2: #16213E;
  --cyan: #00F0FF;
  --magenta: #FF2D78;
  --neon-green: #39FF14;
  --amber: #FFB800;
  --text-primary: #E8E8E8;
  --text-secondary: #8888AA;
  --border: #2A2A4A;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Chakra Petch', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

#root {
  height: 100%;
  width: 100%;
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

input, textarea, select {
  font-family: 'Chakra Petch', sans-serif;
}

.leaflet-container {
  background: #0A0A14 !important;
}

.leaflet-control-zoom a {
  background: #1A1A2E !important;
  color: #00F0FF !important;
  border-color: #2A2A4A !important;
}

.leaflet-control-attribution {
  background: rgba(10,10,20,0.8) !important;
  color: #8888AA !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a {
  color: #00F0FF !important;
}

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

@keyframes radar-ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce-in {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bolt-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px var(--cyan)); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 12px var(--cyan)); }
}

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.animate-slide-up {
  animation: slide-up 0.3s ease-out;
}

.animate-bounce-in {
  animation: bounce-in 0.4s ease-out;
}

.glow-cyan {
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3), 0 0 40px rgba(0, 240, 255, 0.1);
}

.glow-green {
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.3), 0 0 40px rgba(57, 255, 20, 0.1);
}

.glow-magenta {
  box-shadow: 0 0 15px rgba(255, 45, 120, 0.3), 0 0 40px rgba(255, 45, 120, 0.1);
}

.user-marker {
  position: relative;
}

.user-marker-dot {
  width: 16px;
  height: 16px;
  background: var(--cyan);
  border-radius: 50%;
  border: 3px solid #0A0A14;
  position: relative;
  z-index: 2;
}

.user-marker-ping {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: rgba(0, 240, 255, 0.3);
  border-radius: 50%;
  animation: radar-ping 2s ease-out infinite;
  z-index: 1;
}

.blip-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid;
  background: rgba(10, 10, 20, 0.9);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.blip-marker:hover {
  transform: scale(1.2);
}

.blip-marker-draggable {
  cursor: grab !important;
}
.blip-marker-draggable:active {
  cursor: grabbing !important;
}

.leaflet-dragging .leaflet-grab {
  cursor: grabbing !important;
}

.blip-marker-remote {
  border-style: dashed !important;
}

.blip-marker-expiring {
  animation: pulse-glow 1.5s ease-in-out infinite;
}

.leaflet-popup-content-wrapper {
  background: #1A1A2E !important;
  color: #E8E8E8 !important;
  border: 1px solid #2A2A4A !important;
  border-radius: 12px !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15) !important;
}
.leaflet-popup-tip {
  background: #1A1A2E !important;
  border: 1px solid #2A2A4A !important;
}
.leaflet-popup-close-button {
  color: #8888AA !important;
}

.message-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message-sent {
  background: linear-gradient(135deg, #00C8D9, #00A0B0);
  color: #0A0A14;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.message-received {
  background: #2A2A3E;
  color: #E8E8E8;
  border-bottom-left-radius: 4px;
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--cyan);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--cyan);
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--cyan) !important;
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.15);
}

.boost-btn {
  transition: all 0.15s ease;
}
.boost-btn:active {
  transform: scale(0.95);
}

.toast-notification {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  animation: slide-down 0.3s ease, fade-out 0.3s ease 2.7s forwards;
}

@keyframes slide-down {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes fade-out {
  to { opacity: 0; pointer-events: none; }
}