html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #F5F7FA;
  color: #0C3442;
  overflow: hidden;
}

.hidden { display: none; }

#map {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 0;
}

.leaflet-container {
  filter: saturate(1.2);
}

/* =========================
Splash Screen
========================= */
#splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0C3442, #5ABF96);
  color: #F5F7FA;
  z-index: 9999;
  animation: fadeOut 2.4s ease-in-out forwards;
  animation-delay: 2s;
}
#splash .splash-content {
  text-align: center;
}
#splash h1 {
  font-weight: 700;
  font-size: 2.2em;
  margin: 0.4em 0;
}
#splash p {
  font-weight: 400;
  opacity: 0.9;
  font-size: 1em;
}
@keyframes fadeOut {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* Sidebar */
#sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 340px;
  height: 100vh;
  background: rgba(12,52,66,0.97);
  color: #F5F7FA;
  padding: 1.6em;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  box-shadow: 4px 0 12px rgba(0,0,0,0.25);
  border-right: 2px solid rgba(255,255,255,0.1);
}
#sidebar.open { transform: translateX(0); }
.logo-bar {
  display: flex; align-items: center; gap: 10px;
}
.logo { width: 32px; height: 32px; }
#sidebar h1 {
  margin: 0; font-weight: 700; font-size: 1.5em; color: #5ABF96;
}
#sidebar p { opacity: 0.9; font-size: 0.9em; margin-top: 0.4em; }

/* =========================
Inputs & Buttons
========================= */
.location-input {
  display: flex;
  align-items: center;
  margin-top: .5em;
  position: relative;
}
.location-input input {
  flex: 1;
  padding: .6em .8em;
  border-radius: 12px;
  border: 1px solid #5ABF96;
  outline: none;
  background: rgba(255,255,255,0.1);
  color: #F5F7FA;
}
.location-input button {
  background: none;
  border: none;
  color: #FFB347;
  font-size: 1.2em;
  margin-left: 6px;
  cursor: pointer;
}

/* Buttons */
.main-btn {
  width: 100%;
  margin-top: 1em;
  padding: .8em;
  border: none;
  border-radius: 16px;
  background: linear-gradient(90deg,#0C3442,#5ABF96);
  color: white;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.main-btn:hover { opacity: .9; transform: translateY(-1px); }
.secondary-btn {
  width: 100%;
  margin-top: .6em;
  padding: .6em;
  border: 2px solid #5ABF96;
  border-radius: 16px;
  background: none;
  color: #5ABF96;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}
.secondary-btn:hover {
  background: #5ABF96;
  color: #0C3442;
}

/* =========================
Status & Loading
========================= */
#loading {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  color: white; z-index: 200;
  visibility: hidden; opacity: 0;
  transition: opacity 0.3s;
}
#loading.active { visibility: visible; opacity: 1; }
.spinner {
  border: 4px solid #F5F7FA;
  border-top: 4px solid #5ABF96;
  border-radius: 50%;
  width: 36px; height: 36px;
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

#statusBar {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  background: #0C3442;
  color: #F5F7FA;
  padding: .5em 0;
  font-size: .9em;
}

/* Footer */
footer {
  position: fixed;
  bottom: 6px;
  right: 10px;
  font-size: .8em;
  opacity: .8;
}
footer a { color: #00A9CE; }

@media (max-width: 800px) {
  #sidebar { width: 90%; }
}
