/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(31, 37, 48, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.6s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 20px;
  font-weight: 700;
  transition: var(--transition);
  background: linear-gradient(135deg, #ffffff 0%, #4a9eff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navbar-logo:hover {
  filter: brightness(1.2);
}

.navbar-logo img {
  height: 40px;
  width: 40px;
  border-radius: 8px;
}

/* Nav Links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar-nav a {
  position: relative;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav a:hover {
  color: #ffffff;
  background: rgba(74, 158, 255, 0.1);
}

.navbar-nav a.active {
  color: #ffffff;
  background: rgba(74, 158, 255, 0.15);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.2);
}

/* Auth Section */
.navbar-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-auth .btn {
  padding: 8px 16px;
  font-size: 14px;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(74, 158, 255, 0.3);
  transform: translateY(-2px);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(31, 37, 48, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-menu-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-menu-username {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.user-menu-email {
  font-size: 13px;
  color: var(--color-text-dim);
}

.user-menu-items {
  padding: 8px;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.user-menu-item:hover {
  background: rgba(74, 158, 255, 0.1);
}

.user-menu-item.danger {
  color: var(--color-danger);
}

.user-menu-item.danger:hover {
  background: rgba(255, 59, 59, 0.1);
}

/* Mobile Menu Toggle */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-nav {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    gap: 8px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .navbar-nav.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .navbar-nav a.active::after {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-auth {
    gap: 8px;
  }

  .navbar-auth .btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .user-name {
    display: none;
  }
}
