body{
  transition: background 0.3s ease, color 0.3s ease;
}

.custom-navbar{
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
  
    width: 95%;
  
    background: rgba(233, 227, 227, 0.5);
    backdrop-filter: blur(10px);
  
    border-radius: 40px;
    padding: 8px 20px;
  
    z-index: 1000;

  }
  
  /* center layout */
  
  .center-nav{
    position:absolute;
    left:50%;
    transform:translateX(-50%);
  
    display:flex;
    align-items:center;
    gap:20px;
  
    background:white;
    padding:6px 18px;
    border-radius:30px;
  
    box-shadow:0 4px 12px rgba(0,0,0,0.1);
  }

  /* explore */
  
  .explore-link{
    font-weight:500;
  }
  
  /* search */
  
  .search-form{
    display:flex;
    align-items:center;
  }
  
  .search-input{
    border:none;
    outline:none;
    padding:6px 10px;
  }
  
  .search-btn{
    background:#ff385c;
    color:white;
    border:none;
    border-radius:20px;
    padding:6px 12px;
  }
  
  /* add listing */
  
  .add-listing-btn{
    text-decoration:none;
    color:black;
    font-weight:500;
  }
  
  /* right side */
  
  .right-nav{
    display:flex;
    align-items:center;
    gap:15px;
  }

  .right-nav{
    margin-left:auto;
    display:flex;
    align-items:center;
  }

  .logout-btn{
    background:#ff385c;
    color:white;
    border:none;
    padding:6px 16px;
    border-radius:20px;
    font-weight:500;
    cursor:pointer;
  }

  .logout-btn:hover{
    opacity:0.85;
  }

  .brand-logo{
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
  
    text-decoration: none;
    color: white;
  
    font-family: 'Poppins', sans-serif;
  }

  .brand-logo:hover{
    opacity:0.8;
  }

  /* THEME TOGGLE SWITCH */

.theme-toggle-container{
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 65px;
  height: 32px;
}

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

.slider {
  position: absolute;
  inset: 0;
  background-color: #f4f4f4;
  border-radius: 40px;
  cursor: pointer;
  transition: 0.4s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.sun {
  color: #f39c12;
  font-size: 14px;
}

.moon {
  color: #555;
  font-size: 14px;
}

/* Circle inside switch */

.slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

/* When toggle checked */

input:checked + .slider {
  background-color: #2c2c2c;
}

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

.theme-switch:hover{
  transform: scale(1.05);
}

/* dark theme  */

.theme-dark .custom-navbar {
  background-color: #1c1c1c;
  opacity:0.95;
  border-bottom: 1px solid #2a2a2a !important;
}

.theme-dark .brand-logo {
  color: #ffffff;
}

.theme-dark .nav-link {
  color: #e0e0e0 !important;
}

.theme-dark .nav-link:hover {
  color: #ffffff !important;
}

.theme-dark .explore-link {
  color: #121212 !important;
}

.theme-dark .add-listing-btn {
  background-color: #242424;
  color: #ffffff;
}

.theme-dark .add-listing-btn:hover {
  background-color: #232323;
}

.theme-dark .search-input {
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #3a3a3a;
}

.theme-dark .search-input::placeholder {
  color: #b0b0b0;
}

.theme-dark .search-btn {
  background-color: #ffffff;
  color: #121212;
}

.theme-dark .search-btn:hover {
  background-color: #e6e6e6;
}

.theme-dark .right-nav .nav-link {
  color: #e0e0e0 !important;
}

.theme-dark .right-nav .nav-link:hover {
  color: #ffffff !important;
}

.theme-dark .logout-btn {
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #3a3a3a;
}

.theme-dark .logout-btn:hover {
  background-color: #3a3a3a;
}

.theme-dark .custom-navbar,
.theme-dark .nav-link,
.theme-dark .search-input,
.theme-dark .add-listing-btn,
.theme-dark .logout-btn {
    transition: all 0.3s ease;
}

.theme-dark .center-nav {
  background-color: #242424;
  padding: 6px 12px;
  border-radius: 40px;
}

.theme-dark .center-nav a {
  color: #ffffff !important;
}

.theme-dark .center-nav {
  border: 1px solid #2e2e2e;
}

.theme-dark .center-nav .search-input {
  background-color: transparent;
  border: none;
  color: #ffffff;
}

.theme-dark .center-nav:hover {
  background-color: #2a2a2a;
}

/* MOBILE RESPONSIVE */
@media (max-width: 576px) {

  .custom-navbar {
    top: 10px;
    width: 95%;
    padding: 10px 15px;
    border-radius: 20px;
    backdrop-filter: blur(12px);
  }

  .explore-link{
    display:flex;
    justify-content: center;
  }

  .theme-switch{
    display:flex;
    align-self: center;
  }

  .navbar-collapse {
    display: flex;
    flex-direction: column;
  }

  .center-nav {
    position: static;
    transform: none;

    flex-direction: column;
    align-items: stretch;

    gap: 10px;
    padding: 10px;
    border-radius: 20px;
    width: 100%;
    margin-top: 10px;
  }

  .search-form {
    display: flex;
    width: 100%;
    border-radius: 25px;
    padding: 5px;
  }

  .search-btn{
    background:#ff385c !important;
    color:white;
  }

  .search-input {
    flex: 1;
    background: transparent;
  }

  .search-btn {
    flex: 1;
    background: transparent;
  }

  .add-listing-btn {
    background: #f5f5f5;
    padding: 8px;
    border-radius: 20px;
    font-size: 14px;
    text-align: center;
  }

  .right-nav {
    width: 100%;
    background: white;
    padding: 10px;
    border-radius: 20px;
  }

  .logout-btn {
    background: transparent;
    color: inherit;
    border: none;
    font-weight: 500;
  }

  .theme-toggle-container {
    width: 100%;
    display: flex;
    justify-content: center; 
    margin-left: 0;
  }

  .navbar-toggler {
    border: none;
  }

  .theme-dark .right-nav {
    background: #242424;
    border: 1px solid #2e2e2e;
  }

  .right-nav a,
  .logout-btn {
    width: 100%;
    text-align: center;
  }
  
  .navbar-collapse {
    transition: all 0.3s ease;
  }
}