/* Base styles with solid background */
.navbar {
  background: #1a1a2e; /* Dark blue background */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  height: 5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  padding: 0 5%; /* Added side padding */
}

.navbar.scrolled {
  height: 4rem;
  background: #16213e; /* Slightly darker when scrolled */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Container with max-width and padding */
.navbar-container {
  max-width: 1400px; /* Increased max-width */
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Left side - Logo */
.navbar-left {
  display: flex;
  align-items: center;
  margin-left: 1rem; /* Added left margin */
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.navbar-icon {
  height: 1.8rem;
  width: 1.8rem;
  color: #e94560; /* Vibrant pink/red for icon */
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  transform: rotate(15deg) scale(1.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Right side - Navigation items */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.5s ease;
  margin-right: 1rem; /* Added right margin */
}

/* Navigation items */
.navbar-item {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.hover-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #e94560; /* Vibrant underline */
  transition: width 0.3s ease;
}

.hover-underline:hover::after {
  width: 100%;
}

.navbar-item:hover {
  color: white;
  transform: translateY(-2px);
}

/* Fixed Logout button */
.navbar-button {
  background-color: #e94560;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
  position: relative; /* Add this */
  overflow: visible; /* Change from hidden to visible */
  z-index: 1; /* Ensure button stays above other elements */
}
.navbar-button:hover {
  opacity: 1 !important;
  visibility: visible !important;
  color: white !important;
}
.pulse-on-hover:hover {
  transform: translateY(-3px);
  background-color: #ff3e6e;
  animation: pulse 1.5s ease 1;
  z-index: 10;
  will-change: transform;
}


@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 62, 110, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 62, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 62, 110, 0);
  }
}

/* Add this to ensure parent containers don't clip the button */
.navbar-right, .navbar-container {
  overflow: visible;
}



/* Mobile menu styles */
.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  position: relative;
}

.menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: white;
  transition: all 0.3s ease;
}

.menu-icon.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-icon.open span:nth-child(2) {
  opacity: 0;
}

.menu-icon.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1.5rem;
  }
  
  .mobile-menu-button {
    display: flex;
  }
  
  .navbar-right {
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    background: #1a1a2e;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
  }
  
  .navbar-right.open {
    height: calc(100vh - 5rem);
    opacity: 1;
  }
  
  .navbar.scrolled .navbar-right {
    top: 4rem;
  }
  
  .navbar-item, .navbar-button {
    width: 80%;
    text-align: center;
    padding: 1rem 0;
  }
  
  .hover-underline::after {
    display: none;
  }
}

/* Additional animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.navbar-right > * {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.navbar-right > *:nth-child(1) { animation-delay: 0.1s; }
.navbar-right > *:nth-child(2) { animation-delay: 0.2s; }
.navbar-right > *:nth-child(3) { animation-delay: 0.3s; }