body {
      margin: 0;
      padding: 0;
      font-family: "Poppins", sans-serif;
      background: #f9f9f9;
      overflow: hidden;
    }

    .topbar {
      position: fixed;
      top: 10px;
      left: 50%;
      transform: translateX(-50%);
      background: white;
      border-radius: 40px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      padding: 8px 20px;
      width: calc(100% - 30px);
      max-width: 800px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      z-index: 1000;
      transition: all 0.3s ease;
      box-sizing: border-box; /* ✅ prevents padding from adding to width */
      overflow: visible;       /* ✅ hides any overflow */
    }

    .logo img {
      width: 1600px;
      height: auto;
    }

    .menu-buttons {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .menu-buttons button {
      border: none;
      border-radius: 10px;
      padding: 8px 14px;
      cursor: pointer;
      font-weight: bold;
      transition: 0.3s;
      background-color: #ffffffff;
      font-size: 14px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    .menu-buttonsred button {
      border: none;
      color: white;
      border-radius: 10px;
      padding: 8px 14px;
      cursor: pointer;
      font-weight: bold;
      transition: 0.3s;
      background-color: #12b100ff;
      font-size: 14px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    .menu-buttons button:hover {
      background-color: #039d3bff;
      color: white;
    }
    .menu-buttons-container {
      position: fixed;
      top: 80px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex-wrap: nowrap; /* prevent wrapping */
      z-index: 999;
    }
    .menu-buttons, .menu-buttonsred {
      display: flex;
      gap: 8px;
    }

    /* Make the Leaflet Routing Machine panel responsive */
    .leaflet-routing-container {
      position: fixed !important;
      top: 95px; /* below your header */
      right: 15px;
      max-width: 350px;
      max-height: 70vh;
      overflow-y: auto;
      z-index: 1000;
      background: #fff;
      border-radius: 14px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
      font-family: "Poppins", sans-serif;
      font-size: 14px;
    }

    /* Scrollbar for route steps */
    .leaflet-routing-container::-webkit-scrollbar {
      width: 6px;
    }
    .leaflet-routing-container::-webkit-scrollbar-thumb {
      background: #ccc;
      border-radius: 6px;
    }

/* Responsive adjustments for phone view */
@media (max-width: 768px) {
  .leaflet-routing-container {
    top: auto;
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    width: auto;
    height: 45vh;
    font-size: 13px;
    padding: 6px;
  }
}


    #map {
      position: absolute;
      top: 0;
      left: 0;
      height: 100vh;
      width: 100%;
      transition: width 0.4s ease;
      z-index: 1;
    }

    #map.with-panel {
      width: calc(100% - 400px);
    }

    #infoPanel {
      position: fixed;
      top: 0;
      right: 0;
      width: 400px;
      height: 100vh;
      background: #ffffff;
      box-shadow: -4px 0 15px rgba(0, 0, 0, 0.25);
      z-index: 1002;
      overflow-y: auto;
      border-radius: 0;
      transform: translateX(100%);
      transition: transform 0.4s ease;
    }

    #infoPanel.active {
      transform: translateX(0);
    }

    #infoHeader {
      background: #ff8000ff;
      color: white;
      padding: 15px;
      font-size: 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    #closePanel {
      cursor: pointer;
      font-weight: bold;
      font-size: 22px;
    }

    #infoContent {
      padding: 15px;
    }

    #infoContent img {
      width: 100%;
      margin-bottom: 10px;
    }

    .rating {
      color: #f1c40f;
      font-size: 18px;
      margin-bottom: 5px;
    }

    .tabs-container {
      display: flex;
      border-bottom: 2px solid #ddd;
      margin-bottom: 10px;
    }

    .tab {
      position: relative;
      padding: 10px 16px;
      margin-right: 20px;
      cursor: pointer;
      font-weight: 500;
      color: #555;
      transition: color 0.3s;
    }

    .tab.active {
      color: #000;
    }

    .tab::after {
      content: "";
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 0%;
      height: 2px;
      background-color: #ffa500; /* Google Maps orange accent */
      transition: width 0.3s ease;
    }

    .tab.active::after {
      width: 100%;
    }
    .tab-content {
      display: none;
    }

    .tab-content.active {
      display: block;
    }

    .showRouteBtn {
      background: #e74c3c;
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 16px;
      cursor: pointer;
      width: 100%;
      margin-top: 10px;
    }

    @media (max-width: 768px) {
      #map.with-panel {
        width: 100%;
      }

      #infoPanel {
        width: 100%;
        height: auto;
        max-height: 80vh;
        bottom: -100%;
        top: auto;
        transform: none;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.25);
        transition: bottom 0.4s ease;
      }

      #infoPanel.active {
        bottom: 0;
      }
    }

    /* Splash Screen */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-content {
  text-align: center;
  max-width: 90%; /* Ensure it doesn't overflow on small screens */
}

.splash-logo {
  width: 80%; /* Default scale */
  max-width: 400px; /* Keep original size on bigger screens */
  height: auto;
  animation: fadeIn 1.5s ease-in-out;
}

.loader {
  margin: 20px auto 0;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0015ffff;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 768px) {
  .splash-logo {
    width: 80%;  /* Smaller logo for phones */
  }

  .loader {
    width: 25px;
    height: 25px;
    border-width: 3px;
    border-top-width: 3px;
  }
}


    header {
      position: fixed;
      top: 0;
      width: 100%;
      background: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: nowrap;
      padding: 10px 15px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      z-index: 1000;
      gap: 8px;
    }

    /* ===== NORMAL MENU BUTTONS ===== */
    .menu-buttons {
      display: flex;
      flex-wrap: nowrap;
      justify-content: center;
      align-items: center;
      gap: 8px;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .menu-buttons::-webkit-scrollbar {
      display: none;
    }

    .menu-buttons button {
      flex: 0 0 auto;
      background: #fff;
      border: 2px solid #ccc;
      border-radius: 12px;
      padding: 8px 15px;
      font-size: 15px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
      white-space: nowrap;
      box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    }

    .menu-buttons button:hover,
    .menu-buttons button.active {
      background: #c5c5c5ff;
      color: black;
    }

    /* ===== CANCEL ROUTE BUTTON (SEPARATE GROUP) ===== */
    .menu-buttonsred {
      display: flex;
      flex-wrap: nowrap;
      justify-content: center;
      align-items: center;
      gap: 8px;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .menu-buttonsred::-webkit-scrollbar {
      display: none;
    }

    .menu-buttonsred button {
      flex: 0 0 auto;
      background: #02a302ff;
      color: #fff;
      border: none;
      border-radius: 12px;
      padding: 8px 18px;
      font-size: 15px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
      white-space: nowrap;
      box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    }

    .menu-buttonsred1 button {
      flex: 0 0 auto;
      background: #a10202ff;
      color: #fff;
      border: none;
      border-radius: 12px;
      padding: 8px 18px;
      font-size: 15px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
      white-space: nowrap;
      box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    }

    /* 🔹 Mobile version — move button to bottom center */
    @media (max-width: 768px) {
      .menu-buttonsred1 {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        text-align: center;
        z-index: 3000; /* ensures it stays above the map and UI */
      }

      .menu-buttonsred1 button {
        background: #a10202ff;
        color: #fff;
        border: none;
        border-radius: 50px;
        padding: 14px 28px;
        font-size: 16px;
        font-weight: bold;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
      }

      .menu-buttonsred1 button:active {
        transform: scale(0.95);
      }
    }



    .menu-buttonsred button:hover {
      background: #1bb100ff;
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 768px) {
      header {
        flex-wrap: wrap;
        justify-content: center;
      }

      .menu-buttons,
      .menu-buttonsred {
        display: flex;
        gap: 8px;
      }

      .menu-buttons button,
      .menu-buttonsred button {
        font-size: 14px;
        padding: 7px 12px;
        flex-shrink: 0;
      }
    }
    #commentInput:focus {
    border-color: #ff8000;
    outline: none;
    box-shadow: 0 0 4px rgba(255,128,0,0.4);
    }
    #submitCommentBtn:hover {
      background: #e76f00;
    }
   /* Responsive fix for mobile */
    @media (max-width: 768px) {
      .menu-buttons-container {
        flex-wrap: nowrap;
        overflow-x: auto; /* allows horizontal scroll if needed */
        justify-content: flex-start;
        padding: 0 10px;
      }

      .menu-buttons button,
      .menu-buttonsred button {
        font-size: 14px;
        padding: 7px 12px;
      }
    }
    /* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .topbar {
    top: 5px;
    width: 95%;               /* ✅ keeps bar inside the screen */
    padding: 6px 12px;
    border-radius: 25px;
    justify-content: space-between;
    gap: 10px;
  }

  .logo img {
    width: 200px;             /* ✅ smaller logo */
    height: auto;
  }

}

/* Optional: for very small screens (≤ 400px) */
@media (max-width: 400px) {
  .topbar {
    flex-direction: row;
    padding: 6px 10px;
    width: 94%;
    max-width: none;
  }

  .logo img {
    width: 200px;
  }
}

/* Profile dropdown styles */
.profile-container {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.profile-icon {
  background: #146cfaff;
  color: white;
  border-radius: 50%;
  padding: 4px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background 0.3s;
}

.profile-icon:hover {
  background: #003cffff;
}

/* Dropdown menu */
.profile-dropdown {
  position: absolute;
  top: 45px;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 13px 10px;
  display: none;
  flex-direction: column;
  min-width: 140px;
  text-align: left;
  z-index: 2000;
}

.profile-dropdown p {
  margin: 0 0 8px 0;
  font-weight: bold;
  color: #333;
  font-size: 17px;
}

.profile-dropdown a {
  text-decoration: none;
  color: #026efcff;
  font-weight: 500;
  transition: color 0.3s;
}

/* Show dropdown when active */
.profile-container.active .profile-dropdown {
  display: flex;
}

/* Mobile friendly adjustments */
@media (max-width: 768px) {
  .profile-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .profile-dropdown {
    top: 40px;
    right: -10px;
  }
}

/* Profile Container */
.profile-container {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.profile-icon {
  background: #146cfaff;
  color: white;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background 0.3s;
}

.profile-icon:hover {
  background: #003cffff;
}

/* Profile Card (Dropdown) */
.profile-card {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  width: 280px;
  padding: 18px;
  z-index: 999;
  animation: fadeIn 0.25s ease;
}

.profile-container.active .profile-card {
  display: block;
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

.profile-email {
  font-size: 13px;
  color: #666;
  margin: 2px 0 0;
}

/* Buttons */
.profile-card-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-btn {
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.logout-btn {
  background: #e74c3c;
  color: white;
}

.logout-btn:hover {
  background: #c0392b;
}

.login-btn {
  background: #007bff;
  color: white;
}

.login-btn:hover {
  background: #005ce6;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}