@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* DESIGN VARIABLES */
:root {
  --primary-bg: #050505;
  --secondary-bg: #121212;
  --accent-lime: #39FF14;
  --accent-lime-glow: rgba(57, 255, 20, 0.4);
  --accent-muted: #1E3B0A;
  --text-white: #F5F5F5;
  --text-gray: #777777;
  --border-dark: #222222;
  --border-light: #444444;
  --font-mono: 'Space Mono', monospace;
  --font-display: 'Orbitron', sans-serif;
}

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

body {
  background-color: var(--primary-bg);
  color: var(--text-white);
  font-family: var(--font-mono);
  overflow-x: hidden;
  min-height: 100vh;
}

/* CRT SCANLINE SYSTEM */
body::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.8;
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--primary-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-muted);
  border: 1px solid var(--accent-lime);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-lime);
}

/* GLOW AND NEON UTILITIES */
.glow-lime {
  text-shadow: 0 0 8px var(--accent-lime-glow);
}
.box-glow-lime {
  box-shadow: 0 0 15px var(--accent-lime-glow);
}
.neon-border {
  border: 1px solid var(--accent-lime);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.1);
}

/* HEADINGS & DISPLAY */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

/* LAYOUT & NAVIGATION */
.app-header {
  border-bottom: 1px solid var(--border-dark);
  background-color: var(--secondary-bg);
}

.nav-tab {
  border: 1px solid transparent;
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.nav-tab:hover {
  color: var(--text-white);
  border-bottom-color: var(--border-light);
}
.nav-tab.active {
  color: var(--accent-lime);
  border-bottom: 2px solid var(--accent-lime);
  text-shadow: 0 0 5px var(--accent-lime-glow);
}

/* VINYL ROTATING ANIMATION */
.spinning-vinyl-container {
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}
.record-card:hover .spinning-vinyl-container {
  animation-play-state: running;
}

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

/* SCANNER INTERFACE VIEWFINDER */
.scanner-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 4/3;
  background-color: #000;
  border: 1px solid var(--border-light);
  overflow: hidden;
}




.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 2px solid var(--border-dark);
}

.scanner-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(57, 255, 20, 0.4);
  border-radius: 50%;
}
.scanner-crosshair::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 1px;
  background-color: rgba(57, 255, 20, 0.3);
}
.scanner-crosshair::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 5%;
  bottom: 5%;
  width: 1px;
  background-color: rgba(57, 255, 20, 0.3);
}

.scanner-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-lime);
  box-shadow: 0 0 8px var(--accent-lime);
  animation: scan-line 2.5s ease-in-out infinite;
}

@keyframes scan-line {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.scanner-corner {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid var(--accent-lime);
}
.corner-tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.corner-tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.corner-br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* MAP BOX & LEAFLET OVERRIDES */
#map {
  background-color: var(--primary-bg) !important;
}
.leaflet-container {
  background: var(--primary-bg) !important;
}
/* Force Leaflet tile overlay to high-contrast neon/dark using CSS filters */
.leaflet-tile-container img {
  filter: brightness(0.9) contrast(1.2) saturate(0.6);
}

.leaflet-bar a {
  background-color: var(--secondary-bg) !important;
  color: var(--accent-lime) !important;
  border-bottom: 1px solid var(--border-dark) !important;
}
.leaflet-bar a:hover {
  background-color: var(--border-dark) !important;
  color: var(--text-white) !important;
}

/* BUTTONS & INPUTS */
button, input, select {
  font-family: var(--font-mono);
}

.input-rave {
  background-color: var(--primary-bg);
  border: 1px solid var(--border-dark);
  color: var(--text-white);
  padding: 8px 12px;
  font-size: 13px;
  width: 100%;
  transition: border-color 0.2s;
}
.input-rave:focus {
  outline: none;
  border-color: var(--accent-lime);
  box-shadow: 0 0 5px var(--accent-lime-glow);
}

.btn-rave {
  background-color: var(--secondary-bg);
  border: 1px solid var(--border-light);
  color: var(--text-white);
  padding: 10px 20px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-rave:hover {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  text-shadow: 0 0 5px var(--accent-lime-glow);
}

.btn-lime {
  background-color: var(--accent-lime);
  border: 1px solid var(--accent-lime);
  color: #000;
  font-weight: 900;
}
.btn-lime:hover {
  background-color: #000;
  color: var(--accent-lime);
  box-shadow: 0 0 10px var(--accent-lime);
}

/* AUTH MODAL STYLING */
.modal-overlay {
  background-color: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(5px);
  z-index: 99999 !important;
}

/* SYSTEM NOTIFICATIONS */
.offline-banner {
  background-color: var(--accent-muted);
  border: 1px solid var(--accent-lime);
  color: var(--accent-lime);
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0% { border-color: var(--accent-lime); }
  50% { border-color: transparent; }
  100% { border-color: var(--accent-lime); }
}
