* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

h1 {
  text-align: center;
  padding: 1rem;
  background-color: #f2f2f2;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
}

#map {
  height: 100%;
  width: 100%;
}

.nav {
  border: none;
  position: absolute;
  top: 5px;
  left: 30px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-bar {
  position: relative;
  width: 400px;
  display: flex;
  align-items: center; 
}

.login-btn {
  background-color: #1e90ff; 
  color: white;
  border: none;
  padding: 0px 14px;
  margin-right: 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  height: 35px;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}

.login-btn:hover {
  background-color: #2980b9;
}

.search-bar input {
  width: 100%;
  padding: 10px 40px 10px 20px;
  border-radius: 20px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.search-bar input:focus {
  outline: none;  
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.search-bar #search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
}

.search-bar #search-btn:hover {
  color: #ccc;
}

.filter-button {
  display: flex;
  align-items: center;
  text-align: center;
  max-width: 450px;
  overflow: hidden;
  margin: 1rem auto;
}

.filter-scroll {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; 
}

.filter-scroll::-webkit-scrollbar {
  display: none; /* ẩn scrollbar trên Chrome/Safari */
}

.filter-button button {
  margin: 10px;
  padding: 8px 10px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 20px;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.arrow {
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.filter-button button:hover {
  background-color: #ccc;
}

/* Xử lý User logo */
.user-menu {
  position: relative;
  display: inline-block;
}

.user-logo {
  margin-right: 10px;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1e90ff;
  font-size: 38px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.user-logo:hover {
  color: #0c6cd4;
}

.dropdown-content {
  margin-top: 8px;
  display: none;
  position: absolute;
  top: 100%;
  background-color: #fff;
  min-width: 180px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  border-radius: 8px;
  z-index: 999;
}

.user-menu.active .dropdown-content {
  display: block;
}

.dropdown-details-container {
  padding: 3px;
}

.dropdown-details {
  display: flex;
  align-items: center;
  gap: 5px; 
  text-decoration: none;
  white-space: nowrap;

  
}

.dropdown-content .name {
  font-size: 15px;
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: #333;
  border-radius: 8px;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.dropdown-details i {
  width: 20px;
  text-align: center;
}

.dropdown-content .user-name {
    font-weight: bold;
    font-size: 20px;
    color: #333;
}

.dropdown-content .user-email {
    font-size: 12px;
    color: #aaa;
}

.dropdown-content a {
  font-size: 15px;
  display: block;
  padding: 6px 12px;
  text-decoration: none;
  color: #333;
  border-radius: 8px;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #ccc;
  border-radius: 8px;
}


/* Responsive */
@media (max-width: 768px) {
  .nav {
    flex-direction: column; /* đổi layout từ ngang sang dọc */
    align-items: flex-start; 
    gap: 10px;
  }

  .search-bar {
    width: 550px;
    max-width: none;
  }

  .filter-button {
    order: 2; 
    max-width: 550px; 
    margin: 0;
    overflow-x: auto; 
    padding: 5px 0;
  }

  .filter-button button {
    font-size: 12px;
    padding: 6px 8px;
    margin: 5px;
  }
}

@media (max-width: 580px) {
  .nav {
    flex-direction: column; /* đổi layout từ ngang sang dọc */
    align-items: flex-start;
    gap: 10px;
  }

  .search-bar {
    width: 400px;
    max-width: none;
  }

  .filter-button {
    order: 2; /* Đảm bảo filter nằm dưới search bar */
    max-width: 400px;
    margin: 0;
    overflow-x: auto; 
    padding: 5px 0;
  }

  .filter-button button {
    font-size: 12px;
    padding: 6px 8px;
    margin: 5px;
  }
}