html, body, #map { height: 100%; margin: 0; }

.panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;            /* was white */
  padding: 0;                         /* remove panel padding */
  border-radius: 0;
  box-shadow: none;
}

/* Mood buttons: transparent + 30% smaller (60px -> 42px, 36px -> ~25px) */
.panel button {
  padding: 0;
  cursor: pointer;
  border: none;                       /* remove border ring */
  background: transparent;            /* transparent background */
  font-size: 25px;                    /* was 36px */
  width: 42px;                        /* was 60px */
  height: 42px;                       /* was 60px */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: none;
  transition: transform 0.15s ease;
}

.panel button:hover {
  transform: scale(1.1);
  box-shadow: none;
}

.panel button:active {
  transform: scale(0.95);
}

#msg {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Menu button */
#menu-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1003;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  color: white;
}

#menu-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Menu overlay */
#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1004;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 80px 20px 20px 20px;
  transition: all 0.3s ease;
}

#menu-overlay.menu-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

#menu-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 24px;
  min-width: 280px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-family: system-ui, -apple-system, sans-serif;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.menu-hidden #menu-content {
  transform: translateY(-20px);
}

/* Menu user info */
#menu-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

#menu-user-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#menu-user-details {
  flex: 1;
  min-width: 0;
}

#menu-user-name {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

#menu-user-role {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#menu-user-role.admin {
  color: #dc2626;
  font-weight: 600;
}

/* Menu divider */
.menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
  margin: 16px -8px;
}

/* Menu items */
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.menu-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  transform: translateX(4px);
}

.menu-item:active {
  transform: translateX(2px) scale(0.98);
}

.menu-item svg {
  color: inherit;
  flex-shrink: 0;
}

#menu-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* Control buttons group */
#control-buttons {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1002;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Location button */
#location-btn {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  color: white;
}

#location-btn:hover {
  background: rgba(168, 85, 247, 0.9);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

#location-btn:active {
  transform: scale(0.95);
}

/* Toggle button for mood history */
.toggle-btn {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: linear-gradient(135deg, #007bff, #0056b3) !important;
  color: white !important;
  padding: 12px 16px !important;
  border-radius: 30px !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 16px rgba(0, 123, 255, 0.4) !important;
  border: none !important;
  min-width: 140px !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  justify-content: center !important;
}

.toggle-btn:hover {
  background: linear-gradient(135deg, #0056b3, #004085) !important;
  transform: scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6) !important;
}

.toggle-btn.active {
  background: linear-gradient(135deg, #28a745, #1e7e34) !important;
  box-shadow: 0 4px 16px rgba(40, 167, 69, 0.5) !important;
}

.toggle-btn.active:hover {
  background: linear-gradient(135deg, #1e7e34, #155724) !important;
  transform: scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.7) !important;
}

#toggle-icon {
  width: 18px !important;
  height: 18px !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) !important;
}

#toggle-text {
  color: white !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  white-space: nowrap !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
}

/* Admin toggle button styles */
#admin-toggle-btn {
  background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
  border: 2px solid #8b5cf6 !important;
}

/* Hide admin button by default - only show for admins */
#admin-toggle-btn.admin-only {
  display: none !important;
}

#admin-toggle-btn.admin-only.show-admin {
  display: flex !important;
}

#admin-toggle-btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
  border-color: #a78bfa !important;
  transform: translateY(-1px) !important;
}

#admin-toggle-btn.active {
  background: linear-gradient(135deg, #dc2626, #991b1b) !important;
  border-color: #ef4444 !important;
}

#admin-toggle-btn.active:hover {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  border-color: #f87171 !important;
}

#admin-toggle-icon {
  width: 18px !important;
  height: 18px !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) !important;
}

#admin-toggle-text {
  color: white !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  white-space: nowrap !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
}





/* User location marker */
.user-location-marker {
  width: 20px;
  height: 20px;
  background: #3b82f6;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  animation: locationPulse 2s infinite;
  position: relative;
}

.user-location-marker::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid #3b82f6;
  border-radius: 50%;
  animation: locationRipple 2s infinite;
  opacity: 0;
}

@keyframes locationPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes locationRipple {
  0% {
    transform: scale(0.8);
    opacity: 0.7;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Responsive design */
@media (max-width: 480px) {
  #menu-btn {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  
  #control-buttons {
    bottom: 15px;
    left: 15px;
    gap: 10px;
  }
  
  #location-btn {
    width: 40px;
    height: 40px;
  }
  
  .toggle-btn {
    padding: 10px 14px !important;
    min-width: 120px !important;
    font-size: 13px !important;
  }
  
  #menu-overlay {
    padding: 70px 15px 15px 15px;
  }
  
  #menu-content {
    min-width: 260px;
    padding: 20px;
  }
  
  #menu-user-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  #menu-user-name {
    font-size: 15px;
  }
}
