/* Screen reader only class for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Avatar System Styles */
.avatar-container {
  position: fixed !important;
  top: 35px !important;
  right: 40px !important;
  z-index: 9999 !important;
}

.avatar-button {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  border: 3px solid white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  position: relative !important;
}

.avatar-dropdown {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  margin-top: 16px !important;
  width: 320px !important;
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  border: 1px solid #f3f4f6 !important;
  overflow: hidden !important;
  z-index: 10000 !important;
}

.auth-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10001 !important;
  padding: 16px !important;
}

.carnival-dropdown {
  position: absolute !important;
  top: 60px !important;
  right: 0 !important;
  width: 320px !important;
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
  z-index: 10001 !important;
  overflow: hidden !important;
}



/* Simple Header */
.simple-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  height: 15px;
  background-color: transparent;
  z-index: 1000;
  box-shadow: none;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: transparent;
  overflow: hidden;
}





/* Main container without header */
.main-container {
  margin-top: 20px;
}



/* Centered Controls Container */
.controls-container {
  position: fixed;
  top: 35px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* Search Bar Styles */
.search-container {
  width: 300px;
  max-width: 300px;
  margin-left: 0;
  margin-right: auto;
}

/* Festivals Dropdown Styles */
.festivals-container {
  width: 300px;
  max-width: 300px;
  margin: 0 auto;
  position: relative;
}







/* Old toggle switch removed - using modern profile system */

.search-bar {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 300% 300%;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  padding: 6px;
  transition: all 0.3s ease;
  height: 32px;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.search-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.search-bar:focus-within::before {
  left: 100%;
}

.search-bar:focus-within {
  background: linear-gradient(135deg, #7c8ff0, #8a5bb8, #f5a4fc, #f66a7a);
  background-size: 300% 300%;
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
  animation: searchGradientShift 2.5s ease infinite;
}

@keyframes searchGradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.search-icon {
  color: rgba(255, 255, 255, 0.9);
  margin-left: 8px;
  margin-right: 6px;
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.search-bar:focus-within .search-icon {
  color: #fff;
  transform: scale(1.1);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 18px;
  background: transparent;
  color: #fff;
  height: 28px;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.search-input::placeholder {
  color: #999;
}

.clear-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  margin-right: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  min-width: 44px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(5px);
}

.clear-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.1);
}

.clear-button:hover {
  background: #f0f0f0;
  color: #666;
}

.search-button {
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1);
  background-size: 200% 200%;
  border: none;
  color: white;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  height: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(255, 107, 107, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.search-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.4s ease;
}

.search-button:hover::before {
  left: 100%;
}

.search-button:hover {
  background: linear-gradient(135deg, #ff8e8e, #6ee7df, #6bc5e0);
  background-size: 200% 200%;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  animation: searchButtonShift 1.5s ease infinite;
}

@keyframes searchButtonShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.search-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.festivals-bar {
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 20px;
  box-shadow: none;
  padding: 6px;
  transition: all 0.3s ease;
  position: relative;
  height: 32px;
}

.festivals-bar:focus-within {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.festivals-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
  background-size: 400% 400%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  height: 46px;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  animation: iconicProfileGlow 6s ease-in-out infinite;
}

.festivals-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.festivals-button:hover::before {
  left: 100%;
}

.festivals-button:hover {
  background: linear-gradient(135deg, #7c8ff0 0%, #8a5bb8 25%, #f5a4fc 50%, #f66a7a 75%, #5fb8fe 100%);
  background-size: 400% 400%;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
  animation: iconicProfileGlow 6s ease-in-out infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.festivals-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

.festivals-text {
  font-weight: 600;
  color: #fff;
  text-align: left;
  flex: 1;
  font-size: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6), 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.dropdown-icon {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.festivals-button:hover .dropdown-icon {
  transform: translateY(1px);
}

.festivals-dropdown {
  position: absolute;
  top: 100%;
  left: 70px;
  right: 0;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 300% 300%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 10000;
  backdrop-filter: blur(10px);
  animation: dropdownGradientShift 3s ease infinite;
}

@keyframes dropdownGradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.festivals-dropdown.show {
  display: block;
  animation: dropdownSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.festivals-list {
  padding: 8px 0;
}

.festival-item {
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 17px;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.festival-item.coming-soon {
  filter: blur(1px);
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}

/* Make all festivals except Notting Hill Carnival unclickable */
.festival-item:not(.available) {
  pointer-events: none;
  filter: blur(1px);
  opacity: 0.6;
  cursor: not-allowed;
}

.festival-item.selected {
  background: rgba(255, 255, 255, 0.2);
  border-left: 3px solid #fff;
  font-weight: 600;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.festival-item.coming-soon::after {
  content: 'Coming Soon';
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 8px;
  text-shadow: none;
  backdrop-filter: blur(5px);
}

.festival-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.4s ease;
}

.festival-item:hover::before {
  left: 100%;
}

.festival-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(3px);
  box-shadow: none;
}

.festival-item:active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(2px) scale(0.98);
}

.festival-item.coming-soon:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.festival-item.coming-soon:active {
  background: transparent;
  transform: none;
}

.festival-item.coming-soon:hover::before {
  left: -100%;
}

/* Interactive Map Toolbar */
.map-toolbar {
  position: fixed;
  top: 120px;
  left: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Responsive scaling for toolbar */
@media (max-width: 430px) and (min-width: 320px) {
  .map-toolbar {
    transform: scale(0.7);
    top: 90px;
    left: 12px;
  }

  .toolbar-btn {
    width: 24px;
    height: 24px;
    font-size: 9px;
    border-radius: 8px;
  }

  .toolbar-section {
    gap: 6px;
    padding: 8px 6px;
  }

  .search-container {
    width: 25%;
    max-width: 60px;
  }

  .festivals-container {
    width: 50%;
    max-width: 120px;
  }

}



.toolbar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border-radius: 20px;
  padding: 16px 12px;
  border: none;
  box-shadow: none;
}

.toolbar-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}



/* Food Stalls button - Green energy */
#foodStallBtn {
  color: #4ecdc4;
  text-shadow: 0 0 10px rgba(78, 205, 196, 0.6);
  border: 3px solid rgba(78, 205, 196, 0.8);
  box-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
}

#foodStallBtn:hover {
  color: #6ee7df;
  text-shadow: 0 0 15px rgba(110, 231, 223, 0.8);
  border: 3px solid rgba(110, 231, 223, 1);
  box-shadow: 0 0 25px rgba(110, 231, 223, 0.6);
}

/* Float Trucks button - Blue energy */
#floatTruckBtn {
  color: #45b7d1;
  text-shadow: 0 0 10px rgba(69, 183, 209, 0.6);
  border: 3px solid rgba(69, 183, 209, 0.8);
  box-shadow: 0 0 20px rgba(69, 183, 209, 0.4);
}

#floatTruckBtn:hover {
  color: #6bc5e0;
  text-shadow: 0 0 15px rgba(107, 197, 224, 0.8);
  border: 3px solid rgba(107, 197, 224, 1);
  box-shadow: 0 0 25px rgba(107, 197, 224, 0.6);
}

/* Artists & Bands button - Purple energy */
#artistBandBtn {
  color: #a855f7;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
  border: 3px solid rgba(168, 85, 247, 0.8);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

#artistBandBtn:hover {
  color: #c084fc;
  text-shadow: 0 0 15px rgba(192, 132, 252, 0.8);
  border: 3px solid rgba(192, 132, 252, 1);
  box-shadow: 0 0 25px rgba(192, 132, 252, 0.6);
}

/* Festival button - Orange/Amber energy */
#festivalBtn {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  border: 3px solid rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

#festivalBtn:hover {
  color: #fbbf24;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.8);
  border: 3px solid rgba(251, 191, 36, 1);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
}

.toolbar-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.toolbar-btn:hover::before {
  left: 100%;
}

.toolbar-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.toolbar-btn:active {
  transform: translateY(0) scale(0.98);
}

.toolbar-btn.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.3));
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.5);
  border: 3px solid rgba(255, 255, 255, 0.8);
}

/* Carnival Tracker button - Purple gradient */
#carnivalTrackerBtn {
  color: #a855f7;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
  border: 3px solid rgba(168, 85, 247, 0.8);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.1));
}

#carnivalTrackerBtn:hover {
  color: #c084fc;
  text-shadow: 0 0 15px rgba(192, 132, 252, 0.8);
  border: 3px solid rgba(192, 132, 252, 1);
  box-shadow: 0 0 25px rgba(192, 132, 252, 0.6);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.2));
}

#carnivalTrackerBtn.active {
  color: #c084fc;
  text-shadow: 0 0 15px rgba(192, 132, 252, 0.8);
  border: 3px solid rgba(192, 132, 252, 1);
  box-shadow: 0 0 25px rgba(192, 132, 252, 0.6);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(236, 72, 153, 0.3));
}

/* Active states for individual buttons with brighter colors */

#foodStallBtn.active {
  color: #6ee7df;
  text-shadow: 0 0 20px rgba(110, 231, 223, 1);
  border: 3px solid rgba(110, 231, 223, 1);
  box-shadow: 0 0 30px rgba(110, 231, 223, 0.8);
  background: linear-gradient(135deg, rgba(110, 231, 223, 0.3), rgba(78, 205, 196, 0.2));
}

#floatTruckBtn.active {
  color: #6bc5e0;
  text-shadow: 0 0 20px rgba(107, 197, 224, 1);
  border: 3px solid rgba(107, 197, 224, 1);
  box-shadow: 0 0 30px rgba(107, 197, 224, 0.8);
  background: linear-gradient(135deg, rgba(107, 197, 224, 0.3), rgba(69, 183, 209, 0.2));
}

#artistBandBtn.active {
  color: #c084fc;
  text-shadow: 0 0 20px rgba(192, 132, 252, 1);
  border: 3px solid rgba(192, 132, 252, 1);
  box-shadow: 0 0 30px rgba(192, 132, 252, 0.8);
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.3), rgba(168, 85, 247, 0.2));
}

#festivalBtn.active {
  color: #f59e0b;
  text-shadow: 0 0 20px rgba(245, 158, 11, 1);
  border: 3px solid rgba(245, 158, 11, 1);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.8);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.2));
}

.location-btn.active {
  color: #34d399;
  text-shadow: 0 0 20px rgba(52, 211, 153, 1);
  border: 3px solid rgba(52, 211, 153, 1);
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.8);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.3), rgba(16, 185, 129, 0.2));
}



.location-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.5);
}

.location-btn:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* Pull Up Panel */
.pull-up-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 300% 300%;
  border-radius: 25px 25px 0 0;
  box-shadow: 0 -10px 40px rgba(102, 126, 234, 0.4);
  z-index: 10002;
  transform: translateY(calc(100% - 60px));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: panelGradientShift 4s ease infinite;
}

@keyframes panelGradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.pull-up-panel.expanded {
  transform: translateY(0);
}

.panel-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 0 10px 0;
  cursor: pointer;
  user-select: none;
}

.handle-bar {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.handle-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.panel-content {
  padding: 0 20px 30px 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.panel-header h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.close-panel {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.close-panel:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0 5px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 70px;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.tab-btn i {
  font-size: 16px;
  margin-bottom: 2px;
}

.tab-btn span {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* Tab Content */
.tab-content {
  color: #fff;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.tab-header h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tab-header p {
  font-size: 14px;
  margin: 0;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Content Lists */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.content-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.content-item:hover {
  background: #ffffff;
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.item-image {
  width: 120px;
  height: 100px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

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

.content-item:hover .item-image img {
  transform: scale(1.05);
}

.item-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  flex: 1;
}

.item-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.item-info {
  flex: 1;
}

.item-info h5 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #333;
}

.item-info p {
  font-size: 13px;
  margin: 0 0 8px 0;
  color: #666;
  line-height: 1.4;
}

.item-location {
  font-size: 12px;
  color: #888;
  font-weight: 600;
}

.item-specialties {
  font-size: 11px;
  color: #666;
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

.item-hours {
  font-size: 11px;
  color: #10b981;
  font-weight: 600;
  margin-top: 2px;
  display: block;
}

/* Settings List */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.setting-info h5 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 5px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.setting-info p {
  font-size: 13px;
  margin: 0;
  opacity: 0.9;
  line-height: 1.4;
}

/* Switch Toggle for Settings */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.3);
  transition: 0.3s;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  border-color: rgba(255, 255, 255, 0.4);
}

input:checked+.slider:before {
  transform: translateX(26px);
}

/* Responsive card sizing for pull-up panel */
@media (max-width: 430px) and (min-width: 320px) {
  .content-item {
    flex-direction: column;
  }

  .item-image {
    width: 100%;
    height: 80px;
  }

  .item-content {
    padding: 12px;
    gap: 10px;
  }

  .item-icon {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .item-info h5 {
    font-size: 14px;
  }

  .item-info p {
    font-size: 12px;
  }

  .item-location {
    font-size: 11px;
  }

  .setting-item {
    padding: 12px;
  }

  .setting-info h5 {
    font-size: 15px;
  }

  .setting-info p {
    font-size: 12px;
  }
}

/* Full Scale Map Container */
#map {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  background-color: #e8e8e8;
}

/* Hide Leaflet attribution */
.leaflet-control-attribution {
  display: none !important;
}











/* Ensure popups are visible */
.leaflet-popup-content-wrapper {
  background: white !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-content {
  margin: 8px !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.leaflet-popup-tip {
  background: white !important;
}

/* User location marker (blue dot) */
.user-location-marker {
  z-index: 1000 !important;
}

.user-location-marker div {
  animation: pulse-blue 2s ease-in-out infinite;
}

@keyframes pulse-blue {

  0%,
  100% {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.6);
  }

  50% {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.8);
  }
}



/* Large Desktop Dropdown */
@media (min-width: 1001px) {
  .festivals-dropdown {
    max-height: 300px;
    width: auto;
    min-width: 280px;
  }

  .festival-item {
    padding: 16px 24px;
    font-size: 18px;
  }
}

/* Responsive Design */
@media (max-width: 760px) and (min-width: 641px) {
  .festivals-container {
    width: 50%;
    max-width: 150px;
  }

  .search-container {
    width: 70%;
    max-width: 224px;
    margin-left: 0;
    margin-right: auto;
  }






}

@media (max-width: 640px) and (min-width: 541px) {
  .festivals-container {
    width: 50%;
    max-width: 150px;
  }

  .search-container {
    width: 50%;
    max-width: 150px;
    margin-left: 0;
    margin-right: auto;
  }

  .profile-container {
    padding: 8px;
    gap: 8px;
    flex-direction: column;
  }

  .profile-button {
    padding: 6px;
    min-height: 32px;
    min-width: 32px;
  }

  .profile-icon {
    font-size: 14px;
  }




}

@media (max-width: 540px) and (min-width: 481px) {
  .festivals-container {
    width: 50%;
    max-width: 150px;
  }

  .search-container {
    width: 50%;
    max-width: 150px;
    margin-left: 0;
    margin-right: auto;
  }

  .profile-container {
    padding: 8px;
    gap: 8px;
    flex-direction: column;
  }

  .profile-button {
    padding: 6px;
    min-height: 32px;
    min-width: 32px;
  }

  .profile-icon {
    font-size: 14px;
  }




}

@media (max-width: 480px) and (min-width: 431px) {
  .festivals-container {
    width: 50%;
    max-width: 150px;
  }

  .search-container {
    width: 70%;
    max-width: 224px;
    margin-left: 0;
    margin-right: auto;
  }

  .profile-container {
    padding: 8px;
    gap: 8px;
    flex-direction: column;
    align-items: center;
  }

  .profile-button {
    padding: 6px;
    min-height: 32px;
    min-width: 32px;
  }

  .profile-icon {
    font-size: 14px;
  }





  .festivals-dropdown {
    left: 70px !important;
    max-height: 180px !important;
  }

  .festival-item {
    padding: 6px 10px !important;
    font-size: 11px !important;
    min-height: 32px !important;
  }

  /* Profile Dropdown for 431-480px - REMOVED CONFLICTING RULES */
}

@media (max-width: 768px) {
  .controls-container {
    top: 15px;
    gap: 15px;
    width: 95%;
    max-width: 600px;
    padding: 0 15px;
  }

  .profile-container {
    top: 15px;
    right: 15px;
    padding: 8px;
    gap: 8px;
  }

  .profile-button {
    padding: 6px;
    min-height: 32px;
    min-width: 32px;
  }

  .profile-icon {
    font-size: 14px;
  }





  .search-container {
    width: 70%;
    max-width: 224px;
    margin-left: 0;
    margin-right: auto;
  }

  .search-bar {
    padding: 5px;
  }

  .search-input {
    padding: 7px 5px;
    font-size: 13px;
  }

  .search-button {
    padding: 7px 10px;
    font-size: 11px;
  }

  .festivals-container {
    width: 280px;
    flex: 1;
  }

  .festivals-button {
    padding: 7px 10px;
    font-size: 12px;
  }

  /* Profile Dropdown for 768px and below - REMOVED CONFLICTING RULES */
}





@media (max-width: 360px) and (min-width: 320px) {
  .controls-container {
    top: 10px;
    gap: 8px;
    flex-direction: column;
    width: 95%;
    max-width: 320px;
    padding: 0 8px;
    left: 2.5%;
    right: 2.5%;
    align-items: flex-start;
  }

  .profile-container {
    top: 10px;
    right: 10px;
    padding: 8px;
    gap: 8px;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 479px) and (min-width: 361px) {
  .controls-container {
    top: 10px;
    gap: 8px;
    flex-direction: column;
    width: 95%;
    max-width: 360px;
    padding: 0 8px;
    left: 2.5%;
    right: 2.5%;
    align-items: flex-start;
  }

  .profile-container {
    top: 10px;
    right: 10px;
    padding: 8px;
    gap: 8px;
    flex-direction: column;
    align-items: center;
  }

  .profile-button {
    padding: 6px;
    min-height: 32px;
    min-width: 32px;
  }

  .profile-icon {
    font-size: 14px;
  }

  /* Old toggle switch removed - using modern profile system */

  .search-container {
    width: 17.5% !important;
    /* 35% * 0.5 = 17.5% (50% reduction) */
    max-width: 56px !important;
    /* 112px * 0.5 = 56px (50% reduction) */
    margin-left: auto !important;
    /* Center the search bar */
    margin-right: auto !important;
    /* Center the search bar */
  }

  .search-bar {
    padding: 6px;
    min-height: 40px;
  }

  .search-input {
    padding: 8px 6px;
    font-size: 13px;
    min-height: 28px;
  }

  .search-button {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 28px;
    min-width: 28px;
  }

  .clear-button {
    padding: 4px;
    font-size: 10px;
    min-height: 20px;
    min-width: 20px;
  }

  .festivals-container {
    width: 100%;
    max-width: 320px;
  }

  .festivals-button {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 44px;
    justify-content: center;
    text-align: center;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .festivals-button:hover {
    background: linear-gradient(135deg, #7c8ff0, #8a5bb8, #f5a4fc, #f66a7a);
    background-size: 300% 300%;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.35);
    animation: searchGradientShift 3s ease infinite;
  }

  .festivals-text {
    font-size: 11px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 1px 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    text-align: center;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  }

  .dropdown-icon {
    font-size: 13px;
    margin-left: 6px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .festivals-button:hover .dropdown-icon {
    transform: translateY(2px) rotate(180deg);
  }

  .festivals-dropdown {
    border-radius: 20px;
    margin-top: 10px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
    z-index: 10000;
    left: 70px;
    max-height: 200px;
  }

  .festival-item {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    min-height: 32px;
  }

  /* Enhanced blending and user experience for mobile */
  .festivals-container {
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .festivals-bar {
    background: transparent;
    border-radius: 25px;
    padding: 4px;
  }

  /* Improved search bar blending */
  .search-container {
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .search-bar {
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
  }

  /* Enhanced profile container blending */
  .profile-container {
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .dropdown-icon {
    font-size: 10px;
  }
}





@media (max-width: 360px) and (min-width: 321px) {
  .controls-container {
    width: 98%;
    max-width: 300px;
    top: 6px;
    gap: 6px;
    padding: 0 6px;
    left: 1%;
    right: 1%;
    align-items: flex-start;
  }

  .profile-container {
    top: 6px;
    right: 6px;
    padding: 6px;
    gap: 6px;
    flex-direction: column;
    align-items: center;
  }

  .profile-button {
    padding: 5px;
    min-height: 28px;
    min-width: 28px;
  }

  .profile-icon {
    font-size: 12px;
  }

  /* TOGGLE SWITCH COMMENTED OUT FOR MOBILE PROFILE TESTING */
  /*



  */

  .search-container {
    width: 7.5% !important;
    /* 15% * 0.5 = 7.5% (50% reduction) */
    max-width: 22.5px !important;
    /* 45px * 0.5 = 22.5px (50% reduction) */
    margin-left: auto !important;
    /* Center the search bar */
    margin-right: auto !important;
    /* Center the search bar */
  }

  .search-bar {
    padding: 5px;
    min-height: 36px;
  }

  .search-input {
    font-size: 12px;
    min-height: 26px;
    padding: 6px 5px;
  }

  .search-button {
    font-size: 11px;
    min-height: 26px;
    min-width: 26px;
    padding: 5px 8px;
  }

  .clear-button {
    padding: 3px;
    font-size: 9px;
    min-height: 18px;
    min-width: 18px;
  }

  .festivals-container {
    max-width: 300px;
  }

  .festivals-button {
    font-size: 11px;
    min-height: 36px;
    padding: 5px 8px;
  }

  .festivals-text {
    font-size: 11px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 1px 1px 2px rgba(0, 0, 0, 0.5);
  }

  .dropdown-icon {
    font-size: 9px;
  }

  .festivals-dropdown {
    max-height: 240px !important;
    /* Maintain size for 320px-360px */
    width: auto !important;
    min-width: 200px !important;
    top: 42px;
    z-index: 10000;
    left: 40px;
    transform: scale(0.8) !important;
    transform-origin: top left !important;
  }

  .festival-item {
    font-size: 14px !important;
    /* Maintain readable size */
    min-height: 32px;
    padding: 11px 16px !important;
    /* Maintain padding for 320px-360px */
  }



  /* Mobile Auth Modal Styles */
  .mobile-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  .mobile-auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
  }

  .mobile-auth-content {
    background: transparent;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from {
      transform: translateY(50px);
      opacity: 0;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .mobile-auth-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-auth-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
  }

  .mobile-auth-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
  }

  .mobile-auth-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .mobile-form-group {
    margin-bottom: 15px;
  }

  .mobile-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
  }

  .mobile-auth-close:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .mobile-auth-form {
    padding: 20px;
  }

  .mobile-auth-form input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
  }

  .mobile-auth-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  }

  .mobile-auth-form button {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
  }

  .mobile-auth-form button:hover {
    background: linear-gradient(135deg, #7c8ff0, #8a5bb8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
  }

  .mobile-auth-form button:active {
    transform: translateY(0);
  }
}

/* ========================================= */
/* CRITICAL OVERRIDE: Profile Container Layout Fix */
/* ========================================= */

/* Force vertical layout for mobile ranges - 320px to 480px */
@media (max-width: 480px) and (min-width: 320px) {
  .profile-container {
    flex-direction: column !important;
    align-items: center !important;
    top: 10px !important;
    right: 10px !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  /* Old mobile profile elements removed - using modern profile system */
}

/* SPECIFIC RANGE: 321px to 330px - GUARANTEED VERTICAL */
@media (max-width: 330px) and (min-width: 321px) {
  .profile-container {
    flex-direction: column !important;
    align-items: center !important;
    top: 10px !important;
    right: 10px !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  /* FORCE DESKTOP PROFILE VISIBLE AT 321px */
  .profile-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .profile-dropdown {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Old mobile profile elements removed - using modern profile system */
}

/* SEARCH BAR & UK FESTIVAL: Maintain 320px scale from 320px to 360px */
@media (max-width: 360px) and (min-width: 320px) {
  .search-container {
    width: 30% !important;
    max-width: 96px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  /* Old mobile profile elements removed - using modern profile system */

  .search-bar {
    padding: 6px !important;
    min-height: 40px !important;
  }

  .search-input {
    padding: 8px 6px !important;
    font-size: 13px !important;
    min-height: 28px !important;
  }

  .search-button {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-height: 28px !important;
    min-width: 28px !important;
  }

  .clear-button {
    padding: 4px !important;
    font-size: 10px !important;
    min-height: 20px !important;
    min-width: 20px !important;
  }

  .festivals-container {
    width: 50% !important;
    max-width: 160px !important;
  }

  .festivals-button {
    padding: 8px 16px !important;
    font-size: 14px !important;
    min-height: 44px !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 25px !important;
  }

  .festivals-text {
    font-size: 14px !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6), 1px 1px 2px rgba(0, 0, 0, 0.4) !important;
  }

  .dropdown-icon {
    font-size: 12px !important;
  }
}

/* PROFILE VERTICAL LAYOUT: 330px to 360px */
@media (max-width: 360px) and (min-width: 330px) {
  .profile-container {
    flex-direction: column !important;
    align-items: center !important;
    top: 10px !important;
    right: 10px !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  /* ENSURE DESKTOP PROFILE VISIBLE */
  .profile-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .profile-dropdown {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Old mobile profile elements removed - using modern profile system */
}

/* Scale down festivals dropdown by 20% for 360px to 481px */
@media (max-width: 480px) and (min-width: 360px) {
  .festivals-dropdown {
    max-height: 240px !important;
    /* 300px * 0.8 = 240px */
    width: auto !important;
    min-width: 200px !important;
    /* 250px * 0.8 = 200px */
    transform: scale(0.8) !important;
    transform-origin: top left !important;
  }

  .festival-item {
    padding: 11px 16px !important;
    /* 14px 20px * 0.8 = 11px 16px */
    font-size: 14px !important;
    /* 17px * 0.8 = 14px */
  }
}

/* Maintain consistent spacing between search bar and profile from 320px to 400px */
@media (max-width: 400px) and (min-width: 320px) {
  .controls-container {
    gap: 20px !important;
    /* Increased gap to prevent overlap */
    justify-content: space-between !important;
    /* Ensure proper distribution */
    align-items: center !important;
    /* Center align items */
  }

  .search-container {
    margin-right: 0 !important;
    /* Remove right margin to prevent overlap */
    flex-shrink: 0 !important;
    /* Prevent search from shrinking */
  }

  .profile-container {
    margin-left: 0 !important;
    /* Remove left margin to prevent overlap */
    flex-shrink: 0 !important;
    /* Prevent profile from shrinking */
    position: relative !important;
    /* Use relative positioning instead of fixed */
    right: auto !important;
    /* Remove fixed right positioning */
  }

  /* Old mobile profile elements removed - using modern profile system */
}





/* Force horizontal layout for larger screens - 481px+ */
@media (min-width: 481px) {

  /* Maintain festivals dropdown size for larger screens */
  .festivals-dropdown {
    max-height: 300px !important;
    width: auto !important;
    min-width: 250px !important;
  }

  .festival-item {
    padding: 14px 20px !important;
    font-size: 17px !important;
  }
}

/* ========================================= */
/* SAMSUNG GALAXY S24 ULTRA & HIGH-DPI DEVICES */
/* ========================================= */

/* Samsung Galaxy S24 Ultra specific adjustments - RESPECT 320-360px LOGIC */
@media screen and (max-width: 882px) and (min-width: 320px) and (-webkit-min-device-pixel-ratio: 3) {

  /* Samsung devices should follow the same 320-360px logic */
  .profile-container {
    flex-direction: column !important;
    align-items: center !important;
    top: 10px !important;
    right: 10px !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  /* Samsung search and festival containers - follow 320-360px scale */
  .search-container {
    width: 30% !important;
    max-width: 96px !important;
  }

  .festivals-container {
    width: 50% !important;
    max-width: 160px !important;
  }

  .search-bar {
    padding: 6px !important;
    min-height: 40px !important;
  }

  .search-input {
    font-size: 13px !important;
    min-height: 28px !important;
  }

  .search-button {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-height: 28px !important;
    min-width: 28px !important;
  }

  .clear-button {
    padding: 4px !important;
    font-size: 10px !important;
    min-height: 20px !important;
    min-width: 20px !important;
  }

  .festivals-button {
    padding: 8px 16px !important;
    font-size: 14px !important;
    min-height: 44px !important;
  }

  .festivals-text {
    font-size: 14px !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6), 1px 1px 2px rgba(0, 0, 0, 0.4) !important;
  }

  .dropdown-icon {
    font-size: 12px !important;
  }
}

/* High-DPI devices general fix */
@media screen and (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 1000px) {
  .profile-container {
    flex-direction: column !important;
    align-items: center !important;
  }

  .search-container,
  .festivals-container {
    transform: scale(0.95) !important;
    transform-origin: left center !important;
  }
}

/* Samsung device detection via user agent */
@media screen and (max-width: 900px) {
  .profile-container {
    /* Force vertical layout for Samsung devices */
    flex-direction: column !important;
    align-items: center !important;
  }
}

/* ========================================= */
/* EMPTY STATE STYLING */
/* ========================================= */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 8px;
  margin: 20px;
  border: 2px dashed #d1d5db;
}

.empty-state p {
  font-size: 16px;
  margin: 0;
  font-style: italic;
  color: #9ca3af;
}

/* ========================================= */
/* AUTHENTICATION MODAL STYLING */
/* ========================================= */

.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.auth-modal.show {
  opacity: 1;
  visibility: visible;
}

.auth-modal-content {
  background: transparent;
  border-radius: 12px;
  padding: 0;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

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

.auth-modal-header {
  padding: 24px 24px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-modal-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: 24px;
  font-weight: 600;
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

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

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

.auth-form-group label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
}

.auth-form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-submit-btn {
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 16px;
}

.auth-submit-btn:hover {
  background: #2563eb;
}

.auth-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.auth-secondary-btn {
  width: 100%;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-secondary-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.auth-modal-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.auth-modal-footer p {
  margin: 8px 0;
  color: #6b7280;
  font-size: 14px;
}

.auth-modal-footer a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.auth-modal-footer a:hover {
  text-decoration: underline;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .auth-modal-content {
    width: 95%;
    margin: 20px;
  }

  .auth-modal-header,
  .auth-modal-body {
    padding: 20px;
  }

  .auth-modal-header h2 {
    font-size: 20px;
  }
}

/* Specific positioning for 401px to 479px range */
@media (min-width: 401px) and (max-width: 479px) {
  .profile-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1000 !important;
  }

  .profile-system {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .profile-guest {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .profile-signin-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    margin: 0 auto !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 120px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
  }

  /* Ensure controls container doesn't interfere */
  .controls-container {
    justify-content: space-between !important;
    align-items: center !important;
    gap: 15px !important;
  }

  /* Ensure search and festivals don't overlap */
  .search-container {
    flex-shrink: 0 !important;
    margin-right: 10px !important;
  }

  .festivals-container {
    flex-shrink: 0 !important;
    margin-left: 10px !important;
  }
}

/* Mobile touch optimization for all mobile devices */
@media (max-width: 768px) {
  .profile-signin-btn {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
  }

  .profile-container {
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .profile-system {
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .profile-guest {
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}