* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  background-color: #f5f5f5;
}

.container {
  display: flex;
  height: 100vh;
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.header h1 {
  color: #333;
  font-size: 24px;
  margin: 0;
}

.search-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 500px;
  background: white;
  padding: 12px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  z-index: 100;
}

@media (max-width: 768px) {
  .search-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: none;
    border-radius: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
    padding: 12px 20px;
  }

  #map {
    margin-bottom: 70px;
  }
}

#map {
  width: 100%;
  height: 100%;
  margin-top: 60px;
}

.info-panel {
  position: absolute;
  bottom: 80px;
  right: 20px;
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  max-width: 300px;
  z-index: 101;
  display: none;
}

.info-panel.active {
  display: block;
}

.info-panel h3 {
  color: #333;
  margin-bottom: 8px;
  font-size: 16px;
}

.info-panel p {
  color: #666;
  font-size: 13px;
  margin-bottom: 8px;
}

.info-panel a {
  color: #4a90e2;
  text-decoration: none;
  font-size: 13px;
  margin-top: 10px;
  display: inline-block;
}

.info-panel a:hover {
  text-decoration: underline;
}

.location-count {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 50;
  color: #666;
  font-size: 14px;
  display: none;
}

.location-count.active {
  display: block;
}

#searchInput {
  padding: 12px 14px;
  font-size: 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

#searchInput::placeholder {
  color: #999;
}

#searchInput:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.location-btn {
  position: fixed;
  top: 80px;
  right: 20px;
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1.5px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 100;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.location-btn:hover {
  background: #f9f9f9;
  border-color: #4a90e2;
}

.location-btn.active {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.nearby-list {
  position: fixed;
  top: 130px;
  right: 20px;
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  max-width: 300px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.nearby-list.active {
  display: block;
}

.nearby-list h3 {
  margin-bottom: 10px;
  font-size: 14px;
  color: #333;
}

.nearby-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  cursor: pointer;
  color: #666;
}

.nearby-item:last-child {
  border-bottom: none;
}

.nearby-item:hover {
  color: #4a90e2;
}

.nearby-distance {
  font-size: 12px;
  color: #999;
  margin-left: 5px;
}

.loader {
  position: fixed;
  top: 130px;
  right: 20px;
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: none;
}

.loader.active {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loader-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e0e0e0;
  border-top-color: #4a90e2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loader-text {
  font-size: 13px;
  color: #666;
}

@media (max-width: 768px) {
  .location-btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .nearby-list {
    max-width: calc(100vw - 40px);
  }
}
