body {
  margin: 0;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  font-size: 16px;
  box-sizing: border-box;
}

#app-content {
  display: none; /* Will be shown after splash */
}

#map {
  width: 100vw;
  height: 100vh; 
  cursor: pointer;
  position: fixed;
  transition: opacity 0.5s;
}

#search-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 600px;
  min-width: 280px;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  background: white;
  border-radius: 4px;
  transition: all 0.3s ease;
  overflow: hidden;
}

#search-bar.expanded {
  height: auto;
}

#search-input-container {
  display: flex;
  position: relative;
}

#search-input {
  flex-grow: 1;
  min-width: 150px;
  padding: 10px;
  border: none;
  font-size: 16px;
  border-radius: 4px 0 0 4px;
}

#search-type-indicator {
  position: absolute;
  right: 88px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
}

#search-button {
  background-color: #4285F4;
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 0 4px 0 0;
  height: 50px;
}

#location-controls {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-top: 1px solid #eee;
}

#location-controls.hidden {
  display: none;
}

#set-location-btn,
#clear-location-btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  color: white;
  cursor: pointer;
}

#set-location-btn {
  background-color: #34a853;
}

#clear-location-btn {
  background-color: #f44336;
  margin-left: 10px;
}

#coordinates-display {
  display: flex;
  gap: 10px;
}

#coordinates-display span {
  font-size: 14px;
  color: #555;
}

/* Radius Search Controls - Updated Position */
#radius-search-controls {
  position: absolute;
  top: 107px;
  right: 10px;
  width: 220px;
  background-color: white;
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1000;
  display: none; /* Start hidden */
  flex-direction: column;
  gap: 8px;
}

#radius-search-controls.visible {
  display: flex;
}

#radius-search-controls input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 92%;
}

#radius-search-btn, #clear-radius-btn {
  padding: 8px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

#radius-search-btn {
  background-color: #4285F4;
}

#clear-radius-btn {
  background-color: #f44336;
}

#circle-radius-display {
  font-size: 14px;
  color: #555;
  text-align: center;
}

.radius-icon {
  position: absolute;
  top: 60px;
  right: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1001;
  border-radius: 10%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

/* Rest of your existing CSS remains the same */
#sidebar-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1001;
  border-radius: 10%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.search-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1001;
  border-radius: 10%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#sidebar {
  position: absolute;
  top: 60px;
  left: -320px;
  width: 200px;
  max-height: 80vh;
  background-color: white;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1000;
  overflow-y: auto;
  transition: left 0.3s ease-in-out;
}

#sidebar.active {
  left: 10px;
}

#sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#sidebar-content button {
  padding: 10px;
  font-size: 16px;
  background-color: #4285F4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#sidebar-content button:hover {
  background-color: #3367D6;
}

#bottom-sidebar {
  display: none;
  position: absolute;
  background: rgba(183, 197, 203, 0.67);
  border-top: 2px solid #ccc;
  overflow-y: auto;
  padding: 10px;
  z-index: 999;
  transition: all 0.3s ease;
}

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

.close-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.close-icon:hover {
  opacity: 1;
}

#bottom-sidebar h3 {
  margin: 0;
  font-size: 16px;
}

#resultsList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#resultsList li {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.ui-autocomplete {
  background-color: white;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10000 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border-radius: 0 0 4px 4px;
}

.ui-autocomplete li {
  padding: 8px 12px;
  list-style-type: none;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.ui-autocomplete li.ui-state-focus {
  background-color: #f5f5f5;
}

.pac-container {
  z-index: 10001 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border-radius: 0 0 4px 4px;
}

.circle-info-window {
  padding: 10px;
  font-family: Arial, sans-serif;
}

.circle-info-window h4 {
  margin: 0 0 5px 0;
  color: #4285F4;
}

.circle-info-window p {
  margin: 5px 0;
  font-size: 14px;
}

#mobile-nav-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: white;
  z-index: 1002;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.nav-icon {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.nav-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  padding: 4px;
  box-sizing: border-box;
  transition: transform 0.2s ease;
}

.nav-icon img:active {
  transform: scale(0.9);
}


.nav-icon img:active {
  transform: scale(0.9);
}

.hidden {
  display: none;
}

.desktop-only {
  display: block;
}

body.splash-complete #map {
  opacity: 1;
}


.party-info-window {
  padding: 10px;
  font-family: Arial, sans-serif;
  max-width: 250px;
}

.party-info-window h4 {
  margin: 0 0 8px 0;
  color: #4285F4;
  font-size: 16px;
}

.party-info-window p {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #555;
}

.live-location-icon {
  position: absolute;
  top: 110px;
  right: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1001;
  border-radius: 10%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

@media (max-width: 768px) {
  .live-location-icon {
    top: 110px;
    right: 10px;
    width: 35px;
    height: 35px;
  }

    /* #radius-search-btn {
    display: none; 
   } */
}





@media (max-width: 768px) {

  body.splash-complete #map {
    opacity: 1;
}


  .desktop-only {
    display: none;
  }

  #search-bar {
    top: 5px;
  }

  #mobile-nav-bar {
    display: flex;
  }

  #map {
    height: calc(100vh - 60px);
    margin-bottom: 60px;
  }

  #bottom-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40vh;
    transform: translateY(100%);
    border-radius: 10px 10px 0 0;
    z-index: 1003;
  }

  #search-input-container {
    display: flex;
    position: relative;
    height: 36px;
}

#search-button {
  background-color: #4285F4;
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 0 4px 0 0;
  height: 36px;
}

  #bottom-sidebar.visible {
    transform: translateY(0);
  }

  #search-type-indicator {
    right: 88px ;
    top:25px;
    background: none;
    height: 6px;
  }

  #radius-search-controls {
    position: absolute;
    top: 60px;
    right: 10px;
    width: 137px;
    background-color: white;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 8px;}

    #radius-search-controls input {
      padding: 8px;
      border: 1px solid #ddd;
      border-radius: 4px;
      width: 92%;
    }


    #location-controls {
      display: flex;
      justify-content: space-between;
      padding: 4px;
      border-top: 1px solid #eee;
      height: 27px;
  }

  #set-location-btn, #clear-location-btn {
    padding:2px;
    border-radius: 4px;
    border: none;
    color: white;
    cursor: pointer;
}

#coordinates-display {
  display: flex
;
gap: 0px;
  /* gap: 10px; */
  flex-direction: column;
}

#search-input{
  height: 16px;
}

}




@media (min-width: 769px) {
  #mobile-nav-bar {
    display: none !important;
  }

  #bottom-sidebar {
    top: 60px;
    left: 10px;
    width: 220px;
    height: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-radius: 6px;
  }
}

@media (max-width: 1024px) {
  #sidebar {
    width: 220px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  #search-bar {
    width: 94%;
    top: 16px;
    height: 36px;
  }

  #resultsList li {
    padding: 10px 0;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  #bottom-sidebar {
    height: 70vh;
  }

  #search-bar {
    max-width: 80%;
  }

  #mobile-nav-bar {
    height: 50px;
  }

  .nav-icon img {
    width: 20px;
    height: 20px;
  }
}

@supports (-webkit-touch-callout: none) {
  input, button {
    font-size: 16px;
  }
}