/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
   position: sticky;
   top: 0;
   left: 0;
   width: 100%;
   height: 60px;
   background: rgba(6, 8, 20, 0.88);
   display: flex;
   justify-content: center;
   align-items: center;
   backdrop-filter: blur(20px);
   -webkit-backdrop-filter: blur(20px);
   z-index: 1000;
   border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar .navbar-container {
   width: 90%;
   max-width: 1200px;
   height: 100%;
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 0px 30px;
   position: relative;
}

.navbar .logo {
   display: flex;
   align-items: center;
}

.navbar .logo a {
   display: flex;
   align-items: center;
   gap: 10px;
   font-family: 'Anta';
   font-size: 1.4rem;
   color: #fff;
}

.navbar .logo a svg {
   width: 26px;
   height: 26px;
   fill: var(--mark-span-color1);
   filter: drop-shadow(0px 2px 4px rgba(99, 102, 241, 0.25));
}

.navbar .logo a span {
   background: linear-gradient(135deg, var(--mark-span-color1), var(--mark-span-color2));
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
}


/* ── Nav Links ───────────────────────────────────────────── */
.nav-links {
   list-style: none;
   display: flex;
   gap: 4px;
   margin: 0;
   padding: 0;
   align-items: center;
   font-family: 'Saira';
   font-weight: 600;
   font-size: 0.90rem;
}

.nav-links li a {
   padding: 8px 14px;
   border-radius: 8px;
   transition: all 0.3s ease-in-out;
   color: rgb(237, 237, 237);
   white-space: nowrap;
   letter-spacing: 0.5px;
}

.nav-links li a:hover {
   background: rgba(137, 139, 246, 0.1);
   color: #fff;
}


.nav-links .btn-logout {
   color: #f87171;
   background: rgba(239, 68, 68, 0.08);
}

.nav-links .btn-logout:hover {
   background: rgba(239, 68, 68, 0.18);
   color: #ef4444;
}


.nav-links .btn-login {
   background: rgba(96, 97, 239);
   color: #fff !important;
   box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
   padding: 9px 20px;
   border-radius: 10px;
   transition: all 0.3s ease-in-out;
}

.nav-links .btn-login:hover {
   background: #776cf4;
   box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
   transform: translateY(-1px);
   color: #fff !important;
}


/* ── Hamburger ───────────────────────────────────────────── */
.hamburger {
   display: none;
   flex-direction: column;
   justify-content: center;
   gap: 5px;
   background: none;
   border: none;
   cursor: pointer;
   padding: 8px;
   z-index: 1100;
   border-radius: 8px;
   transition: background 0.2s;
}

.hamburger:hover {
   background: rgba(137, 139, 246, 0.1);
}

.hamburger span {
   display: block;
   width: 24px;
   height: 2.5px;
   background-color: var(--text-main);
   border-radius: 4px;
   transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
   transform: translateY(7.5px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
   transform: translateY(-7.5px) rotate(-45deg);
}


/* ── Mobile Dropdown ─────────────────────────────────────── */
@media (max-width: 991px) {
   .navbar .navbar-container {
      width: 100%;
      padding: 0px 20px;
   }

   .hamburger {
      display: flex;
   }

   .nav-links {
      position: absolute;
      top: 62px;
      right: 15px;
      left: auto;
      width: 270px;
      max-width: calc(100vw - 30px);
      background: rgba(6, 8, 20, 0.96);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      flex-direction: column;
      gap: 0;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                  opacity 0.3s ease,
                  transform 0.3s ease;
      opacity: 0;
      transform: translateY(-8px);
      border: 1px solid var(--card-border);
      border-radius: 14px;
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
      padding: 6px 0;
   }

   .nav-links::after {
      display: none;
   }

   .nav-links.active {
      max-height: 600px;
      opacity: 1;
      transform: translateY(0);
   }

   .nav-links li {
      width: 100%;
   }

   .nav-links li a {
      display: flex;
      align-items: center;
      padding: 12px 20px;
      border-radius: 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      font-size: 14px;
      color: var(--text-main);
   }

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

   .nav-links .theme-toggle-btn {
      margin: 8px 16px;
      width: calc(100% - 32px);
      height: 38px;
      border-radius: 8px;
   }

   .nav-links .btn-login {
      margin: 10px 16px;
      border-radius: 8px;
      text-align: center;
      width: calc(100% - 32px);
   }
}


/* ── Theme Toggle Button ──────────────────────────────────── */
.theme-toggle-btn {
   background: rgba(255, 255, 255, 0.08);
   border: 1px solid var(--card-border);
   color: var(--text-main);
   width: 38px;
   height: 38px;
   border-radius: 10px;
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   transition: all 0.3s ease;
   margin-left: 8px;
}

.theme-toggle-btn:hover {
   background: rgba(137, 139, 246, 0.2);
   border-color: var(--card-border-glow);
   transform: scale(1.06);
}

.theme-toggle-btn svg {
   width: 18px;
   height: 18px;
   fill: currentColor;
   transition: transform 0.4s ease;
}

.theme-toggle-btn:hover svg {
   transform: rotate(20deg);
}

/* Light Mode Overrides for Navbar */
[data-theme="light"] .navbar {
   background: rgba(255, 255, 255, 0.88);
   border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .navbar .logo a {
   color: #0f172a;
}

[data-theme="light"] .nav-links li a {
   color: #334155;
}

[data-theme="light"] .nav-links li a:hover {
   background: rgba(79, 70, 229, 0.1);
   color: #4f46e5;
}

[data-theme="light"] .theme-toggle-btn {
   background: rgba(0, 0, 0, 0.05);
   border: 1px solid rgba(0, 0, 0, 0.1);
   color: #0f172a;
}

[data-theme="light"] .theme-toggle-btn:hover {
   background: rgba(79, 70, 229, 0.12);
   border-color: rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .nav-links {
   background: rgba(255, 255, 255, 0.98);
}

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


/* ── Nav Link SVG Icons ───────────────────────────────────── */
.nav-links li a svg {
   vertical-align: -2px;
   margin-right: 4px;
   fill: currentColor;
}

.nav-links li a.btn-login svg {
   margin-right: 6px;
}

/* ── Theme Icon Sun (hidden by default, shown in light mode) */
#theme-icon-sun {
   display: none;
}
