@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

* {
  font-family: 'Nunito', sans-serif;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FFCE54 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-text {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

#map {
  height: 100vh;
  width: 100%;
}

/* Map Controls - Cartoony style */
.leaflet-control-custom,
.leaflet-bar a,
.menu-control {
  font-size: 18px;
  font-weight: bold;
  line-height: 30px;
  text-align: center;
  user-select: none;
  border-radius: 12px !important;
  transition: all 0.2s ease;
}

.leaflet-bar {
  border-radius: 16px !important;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3) !important;
  border: none !important;
  overflow: hidden;
}

.leaflet-bar a {
  border-bottom: 1px solid #ffe0e0 !important;
}

.leaflet-bar a:hover {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%) !important;
  transform: scale(1.05);
}

.menu-control {
  font-size: 20px;
  cursor: pointer;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%) !important;
  color: white !important;
}

.menu-control:hover {
  background: linear-gradient(135deg, #FF8E53 0%, #FF6B6B 100%) !important;
  transform: scale(1.1);
}

/* Sidebar - Fun & Colorful */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
  z-index: 1002;
  transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 4px 0 25px rgba(255, 107, 107, 0.25);
  display: flex;
  flex-direction: column;
  border-radius: 0 24px 24px 0;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FFCE54 100%);
  color: white;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0 24px 0 0;
}

.sidebar-header .app-title {
  font-weight: 800;
  font-size: 1.4rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.sidebar-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px 12px;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.sidebar-close:hover {
  background: rgba(255,255,255,0.3);
  transform: rotate(90deg) scale(1.1);
}

.sidebar-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  text-align: left;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar-btn.primary {
  background: linear-gradient(135deg, #4ECDC4 0%, #44B39D 100%);
  color: white;
}

.sidebar-btn.primary:hover {
  background: linear-gradient(135deg, #44B39D 0%, #4ECDC4 100%);
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.sidebar-btn.secondary {
  background: white;
  color: #555;
  border: 2px solid #eee;
}

.sidebar-btn.secondary:hover {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
  border-color: #FF6B6B;
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
}

.sidebar-btn svg {
  flex-shrink: 0;
}

/* User info in sidebar */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border-radius: 20px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.15);
}

.sidebar-user .user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.sidebar-user .user-name {
  font-weight: 700;
  color: #2E7D32;
  font-size: 1.05rem;
}

/* Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 107, 107, 0.2);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Leaflet Popup - Cartoony Style */
.leaflet-popup-content-wrapper {
  border-radius: 20px !important;
  box-shadow: 0 8px 30px rgba(255, 107, 107, 0.25) !important;
  border: 3px solid #FF6B6B !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 16px 18px !important;
  font-size: 14px;
  line-height: 1.5;
}

.leaflet-popup-tip {
  background: #FF6B6B !important;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3) !important;
}

.leaflet-popup-close-button {
  color: #FF6B6B !important;
  font-size: 22px !important;
  font-weight: bold !important;
  padding: 8px 10px !important;
}

.leaflet-popup-close-button:hover {
  color: #FF8E53 !important;
}

/* Popup buttons */
.marker-popup button,
.leaflet-popup-content button {
  background: linear-gradient(135deg, #4ECDC4 0%, #44B39D 100%);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.marker-popup button:hover,
.leaflet-popup-content button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 18px rgba(78, 205, 196, 0.4);
}

/* Form inputs in popup */
.leaflet-popup-content input,
.leaflet-popup-content select,
.leaflet-popup-content textarea {
  border: 2px solid #eee;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: 'Nunito', sans-serif;
}

.leaflet-popup-content input:focus,
.leaflet-popup-content select:focus,
.leaflet-popup-content textarea:focus {
  outline: none;
  border-color: #FF6B6B;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

.leaflet-popup-content label {
  font-weight: 600;
  color: #555;
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
}

.leaflet-popup-content form button[type="submit"] {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  margin-top: 14px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

.leaflet-popup-content form button[type="submit"]:hover {
  background: linear-gradient(135deg, #FF8E53 0%, #FF6B6B 100%);
}

/* Zoom controls styling */
.leaflet-control-zoom a {
  background: white !important;
  color: #FF6B6B !important;
  font-weight: bold !important;
}

.leaflet-control-zoom a:hover {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%) !important;
  color: #FF8E53 !important;
}

/* Attribution - subtle */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.8) !important;
  border-radius: 8px 0 0 0 !important;
  font-size: 10px !important;
  padding: 4px 8px !important;
}

/* Custom Event Markers */
.event-marker-container {
  background: none !important;
  border: none !important;
}

.event-marker {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  border: 3px solid #FF6B6B;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.event-marker-container:hover .event-marker {
  transform: rotate(-45deg) scale(1.2);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.event-marker span {
  transform: rotate(45deg);
  display: block;
}
