body {
  margin-top: -60px;
}

/* Navbar Container */
.navbar {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 70px;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
  margin: 0 auto;
  height: 100%;
  position: relative;
}

/* Logo */
.nav-logo {
  flex-shrink: 0;
  z-index: 1002;
}

.nav-logo img {
  max-height: 45px;
  width: auto;
  display: block;
}

/* Menu (desktop) */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
  margin: 0 2rem;
}

.nav-menu li {
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: #64748b;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.9rem;
  display: block;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #2563eb;
  background: #f1f5f9;
}

/* Auth Section (Desktop) */
.nav-auth {
  flex-shrink: 0;
  z-index: 1002;
}

/* Login Button */
.login-btn {
  background: #2563eb;
  color: #fff !important;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  font-size: 0.9rem;
  text-decoration: none;
}

.login-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  color: #fff;
}

/* User Dropdown */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-dropdown-btn {
  background: #2563eb;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  outline: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.user-dropdown-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.user-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  z-index: 1001;
  margin-top: 0;
}

.user-dropdown-content a {
  color: #374151;
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.user-dropdown-content a:hover {
  background: #f8fafc;
  color: #2563eb;
}

.user-dropdown-content a:first-child {
  border-bottom: 1px solid #f1f5f9;
}

/* Hide mobile auth in desktop */
.nav-auth-mobile {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  z-index: 1002;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #374151;
  margin: 2px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .nav-menu {
    gap: 0.3rem;
    margin: 0 1.5rem;
  }

  .nav-menu a {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 1024px) {
  .nav-container {
    padding: 0 15px;
  }

  .nav-menu {
    gap: 0.2rem;
    margin: 0 1rem;
  }

  .nav-menu a {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    padding-top: 70px; /* Account for fixed navbar */
  }

  .nav-container {
    padding: 0 15px;
  }

  .nav-logo img {
    max-height: 40px;
  }

  /* Hide desktop auth */
  .nav-auth {
    display: none;
  }

  /* Show mobile auth */
  .nav-auth-mobile {
    display: block !important;
    width: 100%;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: #fff;
    width: 100%;
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 999;
    margin: 0;
    gap: 0;
    justify-content: flex-start;
    align-items: stretch;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    border-bottom: 1px solid #f1f5f9;
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-menu a {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 0;
    display: block;
    width: 100%;
  }

  /* Mobile User Dropdown */
  .nav-menu .user-dropdown {
    width: 100%;
    margin-top: 1rem;
  }

  .nav-menu .user-dropdown-btn {
    justify-content: center;
    width: calc(100% - 4rem);
    margin: 0 2rem;
    padding: 1rem 2rem;
    border-radius: 6px;
  }

  .nav-menu .user-dropdown-content {
    position: static !important;
    margin: 0.5rem 2rem 0;
    width: calc(100% - 4rem);
    display: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: none;
  }

  .nav-menu .user-dropdown-content a {
    justify-content: flex-start;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
  }

  .nav-menu .user-dropdown-content a:last-child {
    border-bottom: none;
  }

  /* Mobile Login Button */
  .nav-menu .login-btn {
    margin: 1rem 2rem 0;
    width: calc(100% - 4rem);
    display: block;
    text-align: center;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 10px;
  }

  .nav-logo img {
    max-height: 35px;
  }

  .nav-menu .user-dropdown-btn,
  .nav-menu .login-btn {
    margin: 0.5rem 1rem;
    width: calc(100% - 2rem);
  }

  .nav-menu .user-dropdown-content {
    margin: 0.5rem 1rem 0;
    width: calc(100% - 2rem);
  }
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
  }
}

/* Active dropdown animation */
.user-dropdown.active .user-dropdown-content {
  display: block !important;
  animation: slideDown 0.3s ease;
}
