:root {
  --bg: #070709;
  --panel: #121318;
  --text: #f7f7f7;
  --muted: #a0a0aa;
  --accent: #d7263d;
  --accent-light: #ff455e;
  --accent-glow: rgba(215, 38, 61, 0.35);
  --border-color: rgba(255, 255, 255, 0.08);
}

.navbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 9, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  position: relative;
}

.navbar .brand {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: transform 0.2s ease;
  user-select: none;
}

.navbar .brand:hover {
  transform: scale(1.02);
}

.brand-accent {
  color: var(--accent-light);
  background: linear-gradient(135deg, #ff455e, #d7263d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 16px rgba(215, 38, 61, 0.4);
}

/* Desktop Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: #d1d1d6;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.4rem 0.2rem;
  position: relative;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link:hover i {
  color: #25d366;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  background: linear-gradient(135deg, #d7263d, #ff455e);
  color: white !important;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(215, 38, 61, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(215, 38, 61, 0.5);
}

/* Profile Component */
.profile {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.profile-circle {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1d1f27, #101115);
  border: 2px solid rgba(215, 38, 61, 0.5);
  box-shadow: 0 0 12px rgba(215, 38, 61, 0.25), inset 0 0 8px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.profile-circle:hover,
.profile-circle.active {
  border-color: var(--accent-light);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(215, 38, 61, 0.6), inset 0 0 12px rgba(215, 38, 61, 0.3);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1f1f5;
  font-size: 1.1rem;
  background: radial-gradient(circle, rgba(215, 38, 61, 0.22) 0%, transparent 70%);
  transition: color 0.2s ease;
}

.profile-circle:hover .profile-avatar,
.profile-circle.active .profile-avatar {
  color: #ffffff;
}

/* Status Indicator Dot */
.online-indicator {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 11px;
  height: 11px;
  background-color: #22c55e;
  border: 2px solid #070709;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2.2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 270px;
  background: rgba(16, 17, 22, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(215, 38, 61, 0.18);
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
  z-index: 120;
}

.profile-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Dropdown Header */
.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.5rem 0.6rem;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(215, 38, 61, 0.3), rgba(255, 69, 94, 0.15));
  border: 1px solid rgba(215, 38, 61, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  font-size: 1rem;
}

.header-details {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.profile-tag {
  font-size: 0.74rem;
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.profile-tag i {
  font-size: 0.45rem;
}

.dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  margin: 0.4rem 0;
}

.dropdown-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  text-decoration: none;
  color: #d1d1d6;
  background: transparent;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(4px);
}

.dropdown-item .item-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #a0a0aa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover .item-icon {
  background: rgba(215, 38, 61, 0.2);
  color: var(--accent-light);
  box-shadow: 0 0 10px rgba(215, 38, 61, 0.3);
}

.dropdown-item .item-info {
  display: flex;
  flex-direction: column;
}

.dropdown-item .item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f1f5;
}

.dropdown-item .item-desc {
  font-size: 0.72rem;
  color: var(--muted);
}

/* Logout Item */
.dropdown-footer {
  margin-top: 0.1rem;
}

.logout-btn:hover {
  background: rgba(215, 38, 61, 0.14);
  border-color: rgba(215, 38, 61, 0.35);
  color: var(--accent-light);
}

.logout-btn .logout-icon {
  color: #e06c75;
}

.logout-btn:hover .logout-icon {
  background: rgba(215, 38, 61, 0.35);
  color: #ff455e;
  box-shadow: 0 0 10px rgba(215, 38, 61, 0.4);
}

.logout-btn:hover .item-title {
  color: var(--accent-light);
}

/* Hamburger Toggle Button */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  justify-content: space-around;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  transition: background 0.2s ease;
  z-index: 101;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.nav-toggle .bar {
  width: 22px;
  height: 2.5px;
  background-color: #ffffff;
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto;
}

/* Hamburger Animation when Active */
.nav-toggle.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--accent-light);
}

.nav-toggle.active .bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}

.nav-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--accent-light);
}

/* Mobile & Tablet Responsive */
@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
  }

  .navbar {
    padding: 0.8rem 1rem;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(12, 13, 17, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.25s ease, 
                visibility 0.25s ease,
                padding 0.35s ease;
  }

  .nav-menu.active {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
    padding: 1rem 1.25rem 1.4rem;
    overflow: visible;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
    align-items: stretch;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    color: #e2e2e8;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
  }

  .nav-link:hover,
  .nav-link:active {
    background: rgba(215, 38, 61, 0.12);
    border-color: rgba(215, 38, 61, 0.25);
    color: #ffffff;
  }

  .nav-actions {
    margin-top: 0;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
  }

  .nav-btn {
    width: auto;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .profile {
    width: auto;
    position: relative;
  }

  .profile-circle {
    width: 40px;
    height: 40px;
  }

  .profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    transform: translateY(-8px) scale(0.96);
    width: 240px;
    max-width: 90vw;
    margin-top: 0;
  }

  .profile-dropdown-menu.active {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 380px) {
  .navbar .brand {
    font-size: 1.15rem;
  }
}
