/**
 * @license
 * SPDX-License-Identifier: Apache-2.0
 */

/*
 * @license
 * SPDX-License-Identifier: Apache-2.0
 */

/* Safari Video Compatibility Fixes */
video {
  -webkit-playsinline: true;
  -webkit-appearance: none;
  appearance: none;
}

video[playsinline] {
  -webkit-playsinline: true;
}

/* Safari specific video controls styling */
video::-webkit-media-controls {
  -webkit-appearance: media-controls-background;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  bottom: 0;
  width: 100%;
  height: 100%;
  right: 0;
  left: 0;
  top: 0;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.1);
}

video::-webkit-media-controls-enclosure {
  -webkit-appearance: media-controls-dark-bar-background;
  width: 100%;
  max-width: 100%;
  height: 30px;
  flex-shrink: 0;
  bottom: 0;
  text-indent: 0;
  padding: 0;
  box-sizing: border-box;
}

/* InfoWindow Video Controls Fix */
.infowindow-video {
  position: relative !important;
  z-index: 10 !important;
}

.infowindow-video::-webkit-media-controls {
  display: flex !important;
  -webkit-appearance: media-controls-background !important;
  opacity: 1 !important;
  visibility: visible !important;
  background-color: rgba(0, 0, 0, 0.8) !important;
  position: absolute !important;
  bottom: 0 !important;
  width: 100% !important;
  height: auto !important;
  z-index: 100 !important;
}

.infowindow-video::-webkit-media-controls-enclosure {
  display: flex !important;
  -webkit-appearance: media-controls-dark-bar-background !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 100% !important;
  height: 40px !important;
  background-color: rgba(0, 0, 0, 0.9) !important;
  border-radius: 0 0 8px 8px !important;
  z-index: 101 !important;
}

.infowindow-video::-webkit-media-controls-play-button {
  display: block !important;
  -webkit-appearance: media-controls-play-button !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 40px !important;
  height: 40px !important;
  z-index: 102 !important;
}

.infowindow-video::-webkit-media-controls-timeline {
  display: block !important;
  -webkit-appearance: media-controls-timeline !important;
  opacity: 1 !important;
  visibility: visible !important;
  flex: 1 !important;
  height: 20px !important;
  z-index: 102 !important;
}

/* For non-webkit browsers */
.infowindow-video[controls] {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Root Variables for Dark Theme */
:root {
  /* Dark Theme (Default) */
  --primary-dark: #1a1a1a;
  --secondary-dark: #2d2d2d;
  --accent-color: #4CAF50;
  --text-light: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* Light Theme */
[data-theme="light"] {
  --primary-dark: #ffffff;
  --secondary-dark: #f5f5f5;
  --accent-color: #4CAF50;
  --text-light: #333333;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* Light theme specific overrides */
[data-theme="light"] .video-overlay {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #333333 !important;
}

[data-theme="light"] .modal-overlay {
  background: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .side-menu {
  background: var(--primary-dark) !important;
  border-right: 1px solid var(--border-color) !important;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--accent-color);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.3s ease;
  margin: 0 8px;
  -webkit-user-select: none;
  user-select: none;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--shadow);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Theme transition for smooth switching */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--primary-dark);
  color: var(--text-light);
}

#root {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Navigation Bar */
.top-navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 10px var(--shadow);
  position: relative;
  z-index: 2500;
  border-bottom: 1px solid var(--border-color);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 20px;
  cursor: pointer;
  padding: 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 3000;
}

.menu-toggle:hover {
  background-color: var(--secondary-dark);
  color: var(--accent-color);
}

.nav-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-title i {
  color: var(--accent-color);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* User Profile Navigation */
.user-profile-nav {
  display: none; /* Hidden by default, shown when logged in */
  align-items: center;
  gap: 6px;
  background: var(--secondary-dark);
  padding: 6px 8px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  height: 32px; /* Match the Live Cam button height */
}

.user-profile-nav:hover {
  background: var(--border-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow);
}

.nav-profile-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-color);
}

.nav-username {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Show user profile when logged in */
body.logged-in .user-profile-nav {
  display: flex;
}

/* Responsive styles for user profile navigation */
@media (max-width: 768px) {
  .nav-right {
    gap: 8px;
  }
  
  .user-profile-nav {
    padding: 4px 6px;
    gap: 4px;
    height: 28px;
  }
  
  .nav-profile-img {
    width: 20px;
    height: 20px;
  }
  
  .nav-username {
    font-size: 11px;
    max-width: 60px;
  }
  
  .live-cam-btn {
    padding: 6px 10px;
    font-size: 12px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .nav-username {
    display: none; /* Hide username on very small screens */
  }
  
  .user-profile-nav {
    padding: 4px;
    gap: 0;
    width: 28px;
    height: 28px;
    justify-content: center;
  }
  
  .nav-profile-img {
    width: 18px;
    height: 18px;
  }
}

.live-cam-btn {
  background: linear-gradient(135deg, var(--accent-color) 0%, #45a049 100%);
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

.live-cam-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* Side Menu */
.side-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
  z-index: 2000;
  transition: left 0.3s ease;
  border-right: 1px solid var(--border-color);
  box-shadow: 2px 0 15px var(--shadow);
  /* iOS scroll fix */
  -webkit-overflow-scrolling: touch;
  overflow: hidden;
}

/* Ensure menu is hidden by default - override any other rules */
.side-menu:not(.active) {
  left: -300px !important;
}

.side-menu.active {
  left: 0;
}

.side-menu-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-dark);
}

.side-menu-header h3 {
  color: var(--text-light);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-menu-header i {
  color: var(--accent-color);
}

.close-menu {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.close-menu:hover {
  color: var(--accent-color);
  background-color: var(--secondary-dark);
}

.menu-items {
  list-style: none;
  padding: 20px 0;
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: calc(100vh - 70px);
  /* iOS smooth scrolling */
  -webkit-overflow-scrolling: touch;
  /* Prevent rubber band effect */
  overscroll-behavior: contain;
  /* Touch action for better iOS handling */
  touch-action: pan-y;
  /* Extra padding bottom for iPhone safe area */
  padding-bottom: 80px;
}

.menu-items li {
  margin: 0;
}

.menu-items a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 25px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.menu-items a:hover {
  background-color: var(--secondary-dark);
  color: var(--text-light);
  border-left-color: var(--accent-color);
}

.menu-items a i {
  width: 20px;
  text-align: center;
  color: var(--accent-color);
}

.menu-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 20px 25px;
}

/* Menu Section Headers */
.menu-section-header {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 25px 8px 25px;
  color: var(--accent-color);
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  margin: 10px 0 5px 0;
  background: rgba(76, 175, 80, 0.1);
}

.menu-section-header i {
  font-size: 16px;
  color: var(--accent-color);
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Map Container */
#map {
  flex: 1;
  width: 100%;
  height: 100vh;
  position: relative;
}

/* Minimized LiveCam Overlay */
.minimized-livecam {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  height: 240px;
  background: var(--secondary-dark);
  border-radius: 15px;
  border: 2px solid var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  resize: both;
  min-width: 250px;
  min-height: 180px;
  max-width: 500px;
  max-height: 400px;
}

.minimized-livecam.active {
  display: flex;
}

.mini-cam-header {
  background: var(--primary-dark);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-light);
  cursor: move;
}

.mini-cam-header span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.mini-cam-header i {
  color: var(--accent-color);
}

.mini-cam-controls {
  display: flex;
  gap: 5px;
}

.mini-cam-controls button {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 3px;
  font-size: 12px;
  transition: all 0.3s ease;
}

.mini-cam-controls button:hover {
  background: var(--accent-color);
  color: white;
}

#miniCamVideo {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.mini-cam-status {
  background: var(--primary-dark);
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}

.mini-recording-indicator {
  display: none;
  color: #ff4757;
  font-weight: bold;
  animation: pulse 1.5s infinite;
}

.mini-recording-indicator.active {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Session Recording Panel */
.session-recording-panel {
  position: fixed;
  top: 80px;
  right: 20px;
  background: linear-gradient(135deg, var(--panel-bg), rgba(45, 45, 65, 0.95));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0;
  min-width: 280px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1002;
  transition: all 0.3s ease;
}

.session-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: linear-gradient(135deg, var(--accent-color), #667eea);
  border-radius: 12px 12px 0 0;
  color: white;
  font-weight: 600;
}

.session-panel-controls {
  display: flex;
  gap: 5px;
}

.minimize-session-btn,
.close-session-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.minimize-session-btn:hover,
.close-session-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.session-panel-body {
  padding: 20px;
}

.session-record-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.session-record-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.session-record-btn.recording {
  background: linear-gradient(135deg, #27ae60, #229954);
  animation: recording-pulse 2s infinite;
}

.session-status {
  text-align: center;
  font-size: 14px;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 6px;
  font-weight: 500;
}

.session-status.ready {
  background: rgba(52, 152, 219, 0.1);
  color: var(--accent-color);
}

.session-status.recording {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  animation: recording-pulse 2s infinite;
}

.session-status.saved {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.session-timer {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 15px;
  font-family: 'Courier New', monospace;
}

.session-controls {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 15px;
}

.session-controls .setting-item {
  margin-bottom: 12px;
}

.session-controls label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
}

.session-controls select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--panel-bg);
  color: var(--text-color);
  font-size: 13px;
}

/* Minimized Session Panel */
.minimized-session-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.95), rgba(192, 57, 43, 0.95));
  border: 2px solid rgba(231, 76, 60, 0.8);
  border-radius: 12px;
  padding: 12px;
  min-width: 180px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(231, 76, 60, 0.3);
  z-index: 1003;
  display: none;
  cursor: move;
  transition: all 0.3s ease;
}

.minimized-session-panel:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(231, 76, 60, 0.4);
}

.mini-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.recording-pulse {
  animation: recording-pulse 1.5s infinite;
}

.mini-session-controls {
  display: flex;
  gap: 5px;
}

.mini-session-controls button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.2s ease;
}

.mini-session-controls button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.mini-session-timer {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  color: white;
  font-family: 'Courier New', monospace;
}

@keyframes recording-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* Recording Markers */
.recording-marker {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.recording-marker:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.recording-marker-icon {
  font-size: 14px;
  margin-bottom: 2px;
}

.recording-marker-time {
  font-size: 8px;
  font-weight: bold;
  text-align: center;
  line-height: 1;
}

/* Recording Modal */
.recording-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 4000;
}

.recording-modal-content {
  background: var(--secondary-dark);
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.recording-modal-header {
  background: linear-gradient(135deg, var(--accent-color), #667eea);
  color: white;
  padding: 20px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recording-modal-header h3 {
  margin: 0;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-recording-modal {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.close-recording-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.recording-modal-body {
  padding: 20px;
}

.recording-info {
  margin-top: 15px;
  padding: 15px;
  background: var(--primary-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.recording-info p {
  margin: 8px 0;
  color: var(--text-color);
  font-size: 14px;
}

.recording-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.download-btn,
.delete-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.download-btn {
  background: linear-gradient(135deg, var(--accent-color), #667eea);
  color: white;
}

.download-btn:hover {
  background: linear-gradient(135deg, #667eea, var(--accent-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.delete-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.delete-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Footer */
.app-footer {
  position: relative;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
  border-top: 2px solid var(--accent-color);
  padding: 20px 0;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 0 20px;
}

.footer-left p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-center {
  text-align: center;
}

.created-by {
  margin: 0;
  color: var(--accent-color);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.created-by strong {
  background: linear-gradient(135deg, var(--accent-color), #667eea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 18px;
}

.created-by .fas.fa-heart {
  color: #e74c3c;
  animation: heartbeat 2s ease-in-out infinite;
}

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

.footer-right {
  text-align: right;
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
}

.footer-links a:hover {
  color: var(--accent-color);
  background: rgba(52, 152, 219, 0.1);
  transform: translateY(-2px);
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 15px;
  }
  
  .footer-right {
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .created-by {
    font-size: 14px;
  }
  
  .created-by strong {
    font-size: 16px;
  }
}

/* Info Modals */
.info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5000;
}

.info-modal-content {
  background: var(--secondary-dark);
  border-radius: 15px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.info-modal-header {
  background: linear-gradient(135deg, var(--accent-color), #667eea);
  color: white;
  padding: 20px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-modal-header h3 {
  margin: 0;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-info-modal {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.close-info-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.info-modal-body {
  padding: 25px;
  color: var(--text-color);
  line-height: 1.6;
}

.info-modal-body h4 {
  color: var(--accent-color);
  margin: 20px 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.info-modal-body p {
  margin: 10px 0;
  color: var(--text-secondary);
}

.info-modal-body ul {
  margin: 10px 0 10px 20px;
  color: var(--text-secondary);
}

.info-modal-body li {
  margin: 8px 0;
}

.info-modal-body strong {
  color: var(--text-color);
}

.about-section, .contact-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.about-section:last-child, .contact-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.team-members {
  display: grid;
  gap: 20px;
  margin-top: 15px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--primary-dark);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.member-avatar {
  font-size: 40px;
  color: var(--accent-color);
}

.member-info h5 {
  margin: 0 0 5px 0;
  color: var(--text-color);
  font-size: 16px;
}

.member-info p {
  margin: 3px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: var(--primary-dark);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  font-size: 14px;
}

.social-links a:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

@media (max-width: 600px) {
  .info-modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .info-modal-body {
    padding: 20px;
  }
  
  .team-member {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .social-links {
    justify-content: center;
  }
}

/* Live Cam Modal */
.live-cam-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.live-cam-modal.active {
  display: flex;
}

.modal-content {
  background: var(--secondary-dark);
  border-radius: 15px;
  width: 95%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
  background: var(--primary-dark);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal-header h3 {
  color: var(--text-light);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header i {
  color: var(--accent-color);
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: #ff4757;
  background-color: var(--secondary-dark);
}

.modal-body {
  padding: 20px;
}

/* Camera Selection */
.camera-selection {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--primary-dark);
  border-radius: 10px;
}

.camera-selection label {
  color: var(--text-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.camera-selection select {
  flex: 1;
  padding: 8px 12px;
  background: var(--secondary-dark);
  color: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
}

.camera-selection button {
  background: var(--accent-color);
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.camera-selection button:hover {
  background: #45a049;
}

/* Video Display */
#liveCamVideo {
  width: 100%;
  height: 400px;
  background-color: #000;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

/* Stream Info */
.stream-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  padding: 10px;
  background: var(--primary-dark);
  border-radius: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

#streamStatus {
  font-weight: 500;
}

#streamResolution {
  color: var(--accent-color);
}

/* Enhanced Controls */
.cam-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.control-group {
  background: var(--primary-dark);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.control-group h4 {
  color: var(--text-light);
  margin: 0 0 15px 0;
  font-size: 14px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

/* Mobile Notice for Screen Capture */
.mobile-notice {
  display: none;
  background: #ff9800;
  color: white;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.mobile-notice i {
  margin-right: 5px;
}

.mobile-notice strong {
  display: block;
  margin-bottom: 4px;
}

/* Mobile Info Section */
.mobile-info-section {
  display: none;
  margin: 15px 0;
  padding: 15px;
  background: var(--secondary-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.info-card {
  margin-bottom: 15px;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.info-card:last-child {
  margin-bottom: 0;
}

.info-card.success {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid #4CAF50;
  color: #c8e6c9;
}

.info-card.warning {
  background: rgba(255, 152, 0, 0.2);
  border: 1px solid #ff9800;
  color: #ffcc80;
}

.info-card.info {
  background: rgba(33, 150, 243, 0.2);
  border: 1px solid #2196F3;
  color: #bbdefb;
}

.info-card.feature {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid #ffc107;
  color: #fff3c4;
}

.info-card.feature {
  background: rgba(156, 39, 176, 0.2);
  border: 1px solid #9c27b0;
  color: #e1bee7;
}

.info-card i {
  margin-right: 8px;
  font-size: 16px;
}

.info-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.info-card ul {
  margin: 0;
  padding-left: 20px;
}

.info-card li {
  margin-bottom: 4px;
}

/* VideoLog Overlay */
.videolog-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #fd79a8;
  box-shadow: 0 4px 15px rgba(253, 121, 168, 0.3);
  display: none;
  z-index: 1000;
  min-width: 280px;
}

.videolog-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 14px;
}

.videolog-header i {
  margin-right: 8px;
  color: #fd79a8;
}

.recording-indicator {
  margin-left: auto;
  color: #ff4757;
  animation: pulse 1.5s infinite;
}

.videolog-details {
  font-size: 12px;
  line-height: 1.4;
}

.videolog-time {
  font-size: 16px;
  font-weight: bold;
  color: #fd79a8;
  margin-bottom: 4px;
}

.videolog-location {
  color: #26de81;
  margin-bottom: 2px;
}

.videolog-date {
  color: #74b9ff;
}

/* Position video container relative for overlay */
.modal-body {
  position: relative;
}

/* VideoLog Marker Styles */
.videolog-marker-icon {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.videolog-marker-icon:hover {
  transform: scale(1.1);
}

.marker-icon-videolog {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
  border: 3px solid white;
  animation: videolog-pulse 2s infinite;
}

@keyframes videolog-pulse {
  0% {
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
  }
  50% {
    box-shadow: 0 4px 25px rgba(253, 121, 168, 0.8);
  }
  100% {
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
  }
}

/* VideoLog Marker with Thumbnail Styles */
.videolog-marker-icon.video-thumbnail-marker {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.videolog-marker-icon.video-thumbnail-marker:hover {
  transform: scale(1.1);
}

.marker-thumbnail-container {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: thumbnail-pulse 3s infinite;
}

.marker-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.marker-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 8px;
}

@keyframes thumbnail-pulse {
  0% {
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
  }
  50% {
    box-shadow: 0 4px 25px rgba(253, 121, 168, 0.8);
  }
  100% {
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
  }
}

/* VideoLog Info Window Styles */
.videolog-info-window {
  max-width: 350px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.videolog-info-header {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
  padding: 12px;
  border-radius: 8px 8px 0 0;
  margin: -8px -8px 12px -8px;
}

.videolog-info-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.videolog-info-header i {
  margin-right: 8px;
}

.videolog-info-body {
  padding: 0;
}

.videolog-preview {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #000;
}

.videolog-details {
  margin-bottom: 12px;
}

.videolog-details p {
  margin: 6px 0;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.videolog-details i {
  width: 16px;
  color: #fd79a8;
  margin-right: 6px;
}

.videolog-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.videolog-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.videolog-btn.primary {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
}

.videolog-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(253, 121, 168, 0.3);
}

.videolog-btn.secondary {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
}

.videolog-btn.secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(116, 185, 255, 0.3);
}

.control-btn {
  width: 100%;
  border: none;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.camera-btn {
  background: linear-gradient(135deg, var(--accent-color) 0%, #45a049 100%);
}

.stop-btn {
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
}

.switch-btn {
  background: linear-gradient(135deg, #3742fa 0%, #2f3542 100%);
}

.minimize-btn {
  background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%);
}

.screen-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.window-btn {
  background: linear-gradient(135deg, #a55eea 0%, #8b5cf6 100%);
}

.record-btn {
  background: linear-gradient(135deg, #ff4757 0%, #c44569 100%);
}

.record-btn.recording {
  background: linear-gradient(135deg, #ff3838 0%, #ff2828 100%);
  animation: pulse 1.5s infinite;
}

.videolog-btn {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

.videolog-btn.recording {
  background: linear-gradient(135deg, #ff6b9d 0%, #f093fb 100%);
  animation: pulse 1.5s infinite;
}

.photo-btn {
  background: linear-gradient(135deg, #26de81 0%, #20bf6b 100%);
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.control-btn:last-child {
  margin-bottom: 0;
}

/* Settings Panel */
.settings-panel {
  margin-top: 20px;
  padding: 20px;
  background: var(--primary-dark);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.settings-panel h4 {
  color: var(--text-light);
  margin: 0 0 15px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 10px;
  background: var(--secondary-dark);
  border-radius: 5px;
}

.setting-item label {
  color: var(--text-light);
  font-weight: 500;
  flex: 1;
}

.setting-item select {
  padding: 6px 10px;
  background: var(--primary-dark);
  color: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  min-width: 120px;
}

.setting-item input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--accent-color);
}

/* Animations */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
  }
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
  .modal-content {
    width: 98%;
    max-height: 95vh;
  }
  
  .cam-controls {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .camera-selection {
    flex-direction: column;
    align-items: stretch;
  }
  
  .camera-selection label {
    margin-bottom: 8px;
  }
  
  #liveCamVideo {
    height: 250px;
  }
  
  .minimized-livecam {
    width: 250px;
    height: 180px;
    bottom: 15px;
    right: 15px;
  }
  
  .session-recording-panel {
    top: 70px;
    right: 15px;
    min-width: 200px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-title {
    font-size: 16px;
  }
  
  .side-menu {
    width: 280px;
  }
  
  /* iOS scroll fix for menu */
  .menu-items {
    -webkit-overflow-scrolling: touch !important;
    overflow-y: auto !important;
    height: calc(100vh - 80px) !important;
    padding-bottom: 100px !important;
  }
  
  /* Settings link visibility fix for iPhone */
  #settingsMenuLink {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    margin: 8px !important;
    border-radius: 6px !important;
  }
  
  .live-cam-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
}

@media (max-width: 480px) {
  .top-navbar {
    padding: 0 15px;
  }
  
  .nav-title span {
    display: none;
  }
  
  .side-menu {
    width: 260px;
  }
}

/* Info Window Styling */
.info-window-content {
  background: var(--secondary-dark);
  color: var(--text-light);
  border-radius: 8px;
  min-width: 200px;
}

/* Navigation Buttons in Info Windows */
.info-window-content button {
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.info-window-content button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.info-window-content button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Route Info Panel */
#routeInfo {
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Animation Classes */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-in {
  animation: slideInLeft 0.3s ease;
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

.info-window-content {
  font-weight: bold;
  text-align: left;
  min-width: 240px;
  max-width: 300px;
}

.info-window-content h3 {
  margin: 0 0 12px 0;
  color: #1976D2;
  font-size: 16px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 6px;
}

.info-window-content p {
  margin: 8px 0;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.4;
}

.info-window-content p strong {
  color: #333;
}

.map-error {
  padding: 2em;
  text-align: center;
  color: #333;
  background-color: #fff1f1;
  border: 1px solid #ffcccc;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.map-error h2 {
    color: #d8000c;
}

.map-error p {
    line-height: 1.6;
    max-width: 600px;
}

.map-error ol {
    text-align: left;
    display: inline-block;
    margin-top: 1em;
    padding-left: 2em;
}

.map-error code {
    background-color: #e0e0e0;
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
    font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
}

/* Profiles Modal Styles */
.profiles-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.profiles-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profiles-modal-content {
    background: var(--secondary-dark);
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.profiles-modal-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.profiles-modal-header h2 {
    color: var(--text-light);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.profiles-modal-header h2 i {
    margin-right: 10px;
    color: var(--accent-color);
}

.close-profiles-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-profiles-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transform: rotate(90deg);
}

.profiles-modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 0;
}

.profile-card {
    background: var(--primary-dark);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.profile-card:hover::before {
    left: 100%;
}

.profile-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-color);
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-card:hover .profile-image img {
    transform: scale(1.1);
}

.profile-info h3 {
    color: var(--text-light);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.2;
}

.profile-title {
    color: var(--accent-color);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.profile-location {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.profile-location i {
    margin-right: 5px;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.social-link.facebook {
    background: rgba(24, 119, 242, 0.2);
    border: 2px solid #1877f2;
    color: #1877f2;
}

.social-link.facebook::before {
    background: #1877f2;
}

.social-link.facebook:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
}

.social-link.instagram {
    background: rgba(225, 48, 108, 0.2);
    border: 2px solid #e1306c;
    color: #e1306c;
}

.social-link.instagram::before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link.instagram:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(225, 48, 108, 0.3);
}

.social-link.linkedin {
    background: rgba(0, 119, 181, 0.2);
    border: 2px solid #0077b5;
    color: #0077b5;
}

.social-link.linkedin::before {
    background: #0077b5;
}

.social-link.linkedin:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 119, 181, 0.3);
}

/* Responsive Design for Profiles */
@media (max-width: 768px) {
    .profiles-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .profiles-modal-header {
        padding: 15px 20px;
    }
    
    .profiles-modal-header h2 {
        font-size: 20px;
    }
    
    .profiles-modal-body {
        padding: 20px;
    }
    
    .profiles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile-card {
        padding: 20px;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .profile-info h3 {
        font-size: 20px;
    }
    
    .social-links {
        gap: 12px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .profiles-modal-header h2 {
        font-size: 18px;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
    
    .profile-info h3 {
        font-size: 18px;
    }
    
    .profile-title {
        font-size: 14px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Profile Markers Styles */
.profile-marker-icon {
    position: relative;
    cursor: pointer;
}

.profile-marker-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-marker-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.profile-marker-image:hover {
    transform: scale(1.1);
    border-color: #ffffff;
}

.profile-marker-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Profile Info Window Styles */
.profile-info-window {
    max-width: 350px;
    padding: 0;
    background: var(--secondary-dark);
    border-radius: 12px;
    overflow: hidden;
    color: var(--text-light);
}

.profile-info-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.profile-info-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    object-fit: cover;
}

.profile-info-text h3 {
    margin: 0;
    color: var(--text-light);
    font-size: 18px;
    font-weight: 600;
}

.profile-info-title {
    margin: 4px 0 0 0;
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 500;
}

.profile-info-body {
    padding: 15px;
}

.profile-info-body p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.profile-info-body i {
    color: var(--accent-color);
    margin-right: 8px;
    width: 16px;
}

.profile-video-container {
    margin: 15px 0;
}

.profile-video-container video {
    background: #000;
    border: 1px solid var(--border-color);
}

.profile-info-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.profile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.profile-social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.profile-social-link:hover::before {
    transform: scale(1);
}

.profile-social-link i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.profile-social-link.facebook {
    background: rgba(24, 119, 242, 0.2);
    border: 2px solid #1877f2;
    color: #1877f2;
}

.profile-social-link.facebook::before {
    background: #1877f2;
}

.profile-social-link.facebook:hover {
    color: white;
}

.profile-social-link.instagram {
    background: rgba(225, 48, 108, 0.2);
    border: 2px solid #e1306c;
    color: #e1306c;
}

.profile-social-link.instagram::before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.profile-social-link.instagram:hover {
    color: white;
}

.profile-social-link.linkedin {
    background: rgba(0, 119, 181, 0.2);
    border: 2px solid #0077b5;
    color: #0077b5;
}

.profile-social-link.linkedin::before {
    background: #0077b5;
}

.profile-social-link.linkedin:hover {
    color: white;
}

.profile-info-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-info-btn.primary {
    background: var(--accent-color);
    color: white;
    margin-bottom: 6px;
}

.profile-info-btn.primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.profile-info-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.profile-info-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Multi-User Shared Video Markers */
.shared-videolog-marker-icon {
    position: relative;
    cursor: pointer;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.shared-marker-container {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ff4444;
    background: linear-gradient(45deg, #ff4444, #ff6b6b);
    animation: sharedMarkerPulse 2s infinite;
}

@keyframes sharedMarkerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
}

.shared-marker-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.shared-marker-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Shared Video Info Window */
.shared-videolog-info-window {
    max-width: 350px;
    background: var(--primary-dark);
    color: var(--text-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.shared-videolog-info-header {
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shared-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.shared-user-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shared-user-name {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.shared-videolog-info-body {
    padding: 15px;
}

.shared-videolog-info-body p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.shared-videolog-info-body p strong {
    color: var(--text-light);
}

.shared-videolog-info-body p i {
    color: #ff4444;
    width: 16px;
    text-align: center;
}

.shared-video-preview {
    margin: 15px 0;
    text-align: center;
}

.shared-video-preview video {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: black;
}

.shared-video-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.shared-video-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.shared-video-btn.primary {
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: white;
}

.shared-video-btn.primary:hover {
    background: linear-gradient(135deg, #e63946, #ff4444);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

.shared-video-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.shared-video-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Online Status in Menu */
#onlineStatus {
    font-weight: 600;
    margin-left: 8px;
}

/* Responsive adjustments for shared video elements */
@media (max-width: 768px) {
    .shared-videolog-info-window {
        max-width: 300px;
    }
    
    .shared-video-actions {
        flex-direction: column;
    }
    
    .shared-video-btn {
        min-width: auto;
        flex: none;
    }
    
    .shared-marker-container {
        width: 40px;
        height: 40px;
    }
    
    .shared-marker-badge {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
}

/* ===== AUTHENTICATION MODAL STYLES ===== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    background: linear-gradient(145deg, var(--secondary-dark), var(--primary-dark));
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    border: 1px solid var(--border-color);
}

.auth-modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-modal-header h2 {
    color: var(--text-light);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-modal-header h2 i {
    color: var(--accent-color);
}

.auth-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.auth-modal-body {
    padding: 25px;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.auth-form-group input::placeholder {
    color: var(--text-secondary);
}

.auth-form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.auth-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.auth-btn.primary {
    background: linear-gradient(135deg, var(--accent-color), #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.auth-btn.primary:hover {
    background: linear-gradient(135deg, #45a049, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.auth-btn.secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.auth-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border-color: var(--accent-color);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-btn i {
    font-size: 16px;
}

/* Auth Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive for Auth Modal */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .auth-modal-header,
    .auth-modal-body {
        padding: 20px;
    }
    
    .auth-modal-header h2 {
        font-size: 20px;
    }
    
    .auth-form-actions {
        gap: 10px;
    }
}

/* Loading states */
.auth-btn.loading {
    position: relative;
    color: transparent;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Authentication Modals */

/* Modal overlay base, come live-cam-modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  transition: all 0.3s ease;
}

.modal.show {
  display: flex;
}

.modal-content {
    background: var(--secondary-dark);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    max-width: 420px;
    width: 100%;
    margin: 0;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--accent-color), #45a049);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header .close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-header .close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

.auth-modal {
    max-width: 400px;
    width: 90%;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--primary-dark);
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(76, 175, 80, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #45a049);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-fullwidth {
    width: 100%;
}

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

.text-center a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.text-center a:hover {
    text-decoration: underline;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    display: none;
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    display: none;
}

/* Profile Styles */
.profile-section {
    margin-bottom: 30px;
}

.profile-section h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-field label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.profile-field span {
    color: var(--text-light);
    font-weight: 500;
}

/* Hidden utility classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-modal {
        width: 95%;
        margin: 10px;
    }
    
    .auth-modal .modal-body {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Menu Authentication Visibility Control */
#loginMenuItem,
#registerMenuItem {
    display: block !important;
}

#userMenuItem,
#logoutMenuItem {
    display: none !important;
}

/* When logged in, hide login/register and show user/logout */
.logged-in #loginMenuItem,
.logged-in #registerMenuItem {
    display: none !important;
}

.logged-in #userMenuItem,
.logged-in #logoutMenuItem {
    display: block !important;
}

/* User Location Marker Styles */
.user-location-marker {
    position: relative;
    cursor: pointer;
}

.user-marker-container {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #2196F3;
    background: #fff;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    animation: userLocationPulse 2s infinite;
}

.user-marker-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-marker-pulse {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 68px;
    height: 68px;
    border: 2px solid #2196F3;
    border-radius: 50%;
    animation: userLocationPulse 2s infinite;
    opacity: 0.6;
}

.user-marker-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #2196F3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

@keyframes userLocationPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

/* User location marker hover effect */
.user-location-marker:hover .user-marker-container {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.6);
}

/* User location marker in info window */
.user-location-info {
    text-align: center;
    padding: 15px;
    min-width: 250px;
}

.user-location-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #2196F3;
    margin-bottom: 12px;
    object-fit: cover;
}

.user-location-info h3 {
    color: #2196F3;
    margin: 10px 0;
    font-size: 18px;
}

.user-location-info p {
    margin: 6px 0;
    font-size: 14px;
}

.user-location-info .coordinates {
    color: #666;
    font-size: 12px;
    font-family: monospace;
}

.user-location-info .timestamp {
    color: #999;
    font-size: 11px;
}

.user-location-buttons {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.user-location-buttons button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-location-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.user-location-buttons .btn-center {
    background: #2196F3;
    color: white;
}

.user-location-buttons .btn-remove {
    background: #f44336;
    color: white;
}

/* Responsive design for user location marker */
@media (max-width: 768px) {
    .user-marker-container {
        width: 50px;
        height: 50px;
        border-width: 3px;
    }
    
    .user-marker-pulse {
        width: 56px;
        height: 56px;
        top: -3px;
        left: -3px;
    }
    
    .user-marker-badge {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .user-marker-container {
        width: 45px;
        height: 45px;
        border-width: 2px;
    }
    
    .user-marker-pulse {
        width: 49px;
        height: 49px;
        top: -2px;
        left: -2px;
    }
    
    .user-marker-badge {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
    
    .user-location-info {
        min-width: 200px;
        padding: 12px;
    }
    
    .user-location-buttons {
        flex-direction: column;
        gap: 6px;
    }
}

/* InfoWindow enhanced styling */
.gm-style-iw-d {
    max-height: 500px !important;
    overflow: auto !important;
}

.gm-style-iw-tc::after {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%) !important;
}

/* InfoWindow button animations */
.gm-style-iw button,
.gm-style-iw a[style*="background"] {
    transition: all 0.2s ease !important;
}

.gm-style-iw button:hover,
.gm-style-iw a[style*="background"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

.gm-style-iw button:active,
.gm-style-iw a[style*="background"]:active {
    transform: translateY(0px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

/* InfoWindow video styling */
.gm-style-iw video {
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

.gm-style-iw video:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important;
}

/* Mobile Android Chrome file input improvements */
#profileImgInput {
    width: 100% !important;
    padding: 8px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    background: #f9f9f9 !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

#profileImgInput:focus {
    border-color: #4caf50 !important;
    outline: none !important;
    background: #fff !important;
}

/* Android Chrome specific styles */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    #profileImgInput {
        -webkit-appearance: none !important;
        appearance: none !important;
    }
}

/* Mobile responsive for profile image selection */
@media (max-width: 768px) {
    #settingsProfileImg {
        width: 80px !important;
        height: 80px !important;
    }
    
    #profileImgInput {
        font-size: 16px !important; /* Prevents zoom on iOS */
        -webkit-text-size-adjust: 100% !important;
    }
    
    button[onclick="triggerImageSelect()"] {
        width: 100% !important;
        margin-top: 12px !important;
        margin-left: 0 !important;
        padding: 12px !important;
        font-size: 16px !important;
        background: linear-gradient(135deg, #4caf50 0%, #43a047 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 12px rgba(76,175,80,0.3) !important;
    }
}

/* GPS Toggle Switch Styles */
.gps-toggle-container {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.gps-toggle-label {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
}

.gps-toggle-input {
    display: none;
}

.gps-toggle-slider {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    border: 2px solid #ddd;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 70px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gps-toggle-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
    transition: left 0.3s ease;
    z-index: 1;
}

.gps-toggle-input:checked + .gps-toggle-slider::before {
    left: 0;
}

.gps-icon {
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
    color: #666;
}

.gps-text {
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
    color: #666;
}

.gps-toggle-input:checked + .gps-toggle-slider .gps-icon,
.gps-toggle-input:checked + .gps-toggle-slider .gps-text {
    color: white;
}

.gps-toggle-input:checked + .gps-toggle-slider {
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
    transform: scale(1.02);
}

/* Hover effects */
.gps-toggle-label:hover .gps-toggle-slider {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gps-toggle-container {
        margin-right: 10px;
    }
    
    .gps-toggle-slider {
        padding: 6px 10px;
        min-width: 60px;
    }
    
    .gps-text {
        font-size: 11px;
    }
    
    .gps-icon {
        font-size: 12px;
    }
}

/* Settings Modal Profile Buttons */
#settingsModal .profile-field button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
    display: block !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 8px !important;
}

#settingsModal .profile-field button:hover {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.4);
}

#settingsModal .profile-field button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

#settingsModal .profile-field input[type="file"] {
    padding: 8px;
    border: 2px dashed #1976d2;
    border-radius: 6px;
    background: rgba(25, 118, 210, 0.05);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 8px !important;
    box-sizing: border-box;
}

#settingsModal .profile-field input[type="file"]:hover {
    border-color: #1565c0;
    background: rgba(25, 118, 210, 0.1);
}

/* Force vertical layout for profile image section */
#settingsModal .profile-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#settingsModal .profile-field > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Settings modal header with only close button */
#settingsModal .modal-header {
    justify-content: flex-end;
    padding: 15px 20px 10px 20px;
    border-bottom: 1px solid #e0e0e0;
}

#settingsModal .close {
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
}

#settingsModal .close:hover {
    color: #333;
}

/* Online Profiles Modal */
.online-profiles-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.online-profiles-modal-content {
    background-color: var(--bg-color);
    margin: 3% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.4s ease;
}

.online-profiles-header {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.online-profiles-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.online-profiles-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.online-profiles-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.online-profiles-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.online-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.online-profile-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.online-profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid #1976d2;
}

.profile-info h3 {
    margin: 0 0 5px 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-online {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-recent {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.profile-location {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.profile-videos {
    margin-top: 15px;
}

.videos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.videos-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
}

.video-count {
    background: #1976d2;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.video-list {
    max-height: 150px;
    overflow-y: auto;
    border-radius: 8px;
    background: var(--bg-secondary);
    padding: 8px;
}

.video-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 4px 0;
    background: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.video-item:hover {
    background: var(--hover-bg);
}

.video-icon {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #1976d2, #1565c0);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
    font-size: 12px;
}

.video-details {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
}

.no-videos {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .online-profiles-modal-content {
        width: 95%;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    .online-profiles-grid {
        grid-template-columns: 1fr;
    }
    
    .online-profile-card {
        padding: 15px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .profile-avatar {
        width: 60px !important;
        height: 60px !important;
    }
}

@media (max-width: 480px) {
    .online-profiles-modal .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .online-profiles-modal .modal-header {
        padding: 15px;
    }
    
    .online-profiles-modal .modal-body {
        padding: 15px;
    }
    
    .online-profile-card {
        padding: 12px;
    }
    
    .profile-videos h4 {
        font-size: 14px;
    }
    
    .video-item {
        padding: 8px;
    }
    
    .video-list {
        max-height: 200px;
    }
}

/* ========================================
   🌙 TEMA SCURO - Dark Theme Support
   ======================================== */

body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme .top-navbar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    border-bottom: 1px solid #333;
}

body.dark-theme .nav-title {
    color: #e0e0e0;
}

body.dark-theme .side-menu {
    background: linear-gradient(180deg, #1a1a1a 0%, #2c2c2c 100%);
    border-right: 1px solid #333;
}

body.dark-theme .side-menu-header {
    background: linear-gradient(135deg, #2c2c2c 0%, #1976d2 100%);
    border-bottom: 1px solid #333;
}

body.dark-theme .menu-items li a {
    color: #e0e0e0;
    border-bottom: 1px solid #333;
}

body.dark-theme .menu-items li a:hover {
    background: linear-gradient(135deg, #333 0%, #1976d2 100%);
    color: #fff;
}

body.dark-theme .menu-items li a i {
    color: #1976d2;
}

body.dark-theme .live-cam-modal .modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    border: 1px solid #333;
}

body.dark-theme .modal-header {
    background: linear-gradient(135deg, #2c2c2c 0%, #1976d2 100%);
    border-bottom: 1px solid #333;
}

body.dark-theme .modal-header h2,
body.dark-theme .modal-header h3 {
    color: #e0e0e0;
}

body.dark-theme .control-btn {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-theme .control-btn:hover {
    background: linear-gradient(135deg, #555 0%, #1976d2 100%);
    transform: translateY(-1px);
}

body.dark-theme .settings-panel {
    background: rgba(42, 42, 42, 0.9);
    border: 1px solid #333;
}

body.dark-theme .setting-item label {
    color: #e0e0e0;
}

body.dark-theme select {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-theme .app-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    border-top: 1px solid #333;
}

body.dark-theme .footer-content p,
body.dark-theme .footer-links a {
    color: #e0e0e0;
}

body.dark-theme .footer-links a:hover {
    color: #1976d2;
}

body.dark-theme .profiles-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    border: 1px solid #333;
}

body.dark-theme .profile-card {
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid #333;
}

body.dark-theme .profile-card:hover {
    background: rgba(42, 42, 42, 0.95);
    border: 1px solid #1976d2;
}

body.dark-theme .profile-info h3 {
    color: #e0e0e0;
}

body.dark-theme .profile-title,
body.dark-theme .profile-location {
    color: #bbb;
}

/* Info Window Dark Theme */
body.dark-theme .gm-style .gm-style-iw-c {
    background: #2c2c2c !important;
    border: 1px solid #555 !important;
}

body.dark-theme .gm-style .gm-style-iw-d {
    color: #e0e0e0 !important;
}

/* 🗺️ MARKER ANIMATIONS - Animazioni per marker personalizzati */
.custom-marker {
    animation: markerBounce 0.6s ease-out;
    transition: all 0.3s ease;
}

.custom-marker:hover {
    transform: scale(1.1);
}

@keyframes markerBounce {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 📱 MOBILE RESPONSIVE IMPROVEMENTS */
@media (max-width: 768px) {
    body.dark-theme .side-menu {
        width: 100%;
    }
    
    body.dark-theme .menu-items li a {
        padding: 16px 20px;
        font-size: 16px;
    }
}

/* 🎨 CUSTOM SCROLLBAR - Dark Theme */
body.dark-theme ::-webkit-scrollbar {
    width: 8px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #1976d2;
}

/* 🌟 NOTIFICATION IMPROVEMENTS - Dark Theme */
body.dark-theme .notification {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border: 1px solid #555;
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.dark-theme .notification.success {
    border-left: 4px solid #4CAF50;
}

body.dark-theme .notification.error {
    border-left: 4px solid #f44336;
}

body.dark-theme .notification.warning {
    border-left: 4px solid #ff9800;
}

body.dark-theme .notification.info {
    border-left: 4px solid #1976d2;
}

/* 🎬 VIDEO LOG OVERLAY - Dark Theme */
body.dark-theme .videolog-overlay {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid #333;
}

body.dark-theme .videolog-info {
    color: #e0e0e0;
}

/* 🔧 GPS TOGGLE - Dark Theme */
body.dark-theme .gps-toggle-slider {
    background: #333;
}

body.dark-theme .gps-toggle-input:checked + .gps-toggle-slider {
    background: #1976d2;
}

body.dark-theme .gps-text {
    color: #e0e0e0;
}

/* 🌍 ONLINE/OFFLINE INDICATOR */
.online-indicator {
    position: relative;
    display: inline-block;
}

.online-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

.offline-indicator::after {
    background: #ff9800;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* 🏷️ MARKER CATEGORY BADGES */
.marker-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #1976d2;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 1000;
}

.marker-badge.transport { background: #4CAF50; }
.marker-badge.shopping { background: #E91E63; }
.marker-badge.restaurant { background: #FF9800; }

/* 📱 iOS SPECIFIC FIXES */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari specific */
  .side-menu {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Fix for iPhone safe areas */
    height: calc(100vh - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100vh - env(safe-area-inset-bottom, 0px)) !important;
  }
  
  .menu-items {
    -webkit-overflow-scrolling: touch !important;
    overflow-y: scroll !important;
    position: relative;
    /* Adjust height for iPhone home indicator */
    height: calc(100vh - 150px) !important;
    max-height: calc(100vh - 150px) !important;
    /* Extra padding for safe scrolling */
    padding-bottom: 100px !important;
  }
  
  /* Simple iOS touch fix */
  .menu-items a {
    -webkit-tap-highlight-color: rgba(255,255,255,0.2) !important;
    cursor: pointer !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    /* Ensure clickable area */
    position: relative !important;
    z-index: 1000 !important;
  }
  
  /* Settings specific fix - move it higher */
  #settingsMenuLink {
    background: rgba(255,255,255,0.1) !important;
    border-radius: 4px !important;
    margin: 5px !important;
    /* Make it more prominent */
    border: 1px solid rgba(255,255,255,0.2) !important;
    /* Ensure it's in clickable area */
    margin-bottom: 20px !important;
  }
  
  /* Force GPU acceleration */
  .menu-items li {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  /* iPhone X and newer - safe area support */
  @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
    .menu-items {
      height: calc(100vh - 180px) !important;
      padding-bottom: 120px !important;
    }
  }
}
.marker-badge.park { background: #8BC34A; }
.marker-badge.healthcare { background: #f44336; }
.marker-badge.camera { background: #9C27B0; }

/* END Dark Theme Support */
