[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --nav-bg: #ffffff;
  --nav-border: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --hover-glow: rgba(102, 126, 234, 0.4);
  --about-btn: #efefef;
  --navbar-bg-light: rgba(255, 255, 255, 0.97);
  --cat-bottom-theme: linear-gradient(135deg, #621c9f, #2a0248, #621c9f);
  --text-color-nav: #141414;
  --text-color-dropdown: #1a1a1a;
  --navbar-bg: #fff;
  --primary-gradient: linear-gradient(135deg, #621c9f, #2a0248, #621c9f);
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-light: rgba(248, 243, 243, 0.95);
  --filter-dropdwon: #050208;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --dark-text: #120e17;
  --light-text: #232224;
  --text-color-mode: #070707;
  --home-header: #000000;
  --border-color: #e5e7eb;
  --input-bg-mode: #ffffff;
  --input-border: #d1d5db;
  --hover-bg: #f3f4f6;
  --navbar-text: #1a202c;
  --navbar-text-secondary: #4b5563;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.15);
  --card-header: #6b0fd4;
  --back-link: #6b0fd4;
  --navbar-height: 80px;
  --container-padding: clamp(10px, 3vw, 30px);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-color: #212121;
  --text-color: #ffffff;
  --nav-bg: #212121;
  --nav-border: rgba(255, 255, 255, 0.2);
  --card-bg: #212121;
  --hover-glow: rgba(102, 126, 234, 0.4);
  --about-btn: #5e575750;
  --navbar-bg-light: #212121;
  --cat-bottom-theme: linear-gradient(135deg, #621c9f, #2a0248, #621c9f);
  --text-color-nav: #f5f5f5;
  --text-color-dropdown: #f1f5f9;
  --navbar-bg: #212121;
  --primary-gradient: linear-gradient(135deg, #621c9f, #2a0248, #621c9f);
  --bg-primary: #212121;
  --bg-secondary: rgb(35, 42, 54);
  --bg-tertiary: #334155;
  --bg-light: #212121;
  --filter-dropdwon: #ffffff;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --dark-text: #f1f5f9;
  --light-text: #cbd5e1;
  --text-color-mode: #f1f5f9;
  --home-header: #f2f2f7;
  --border-color: #475569;
  --input-bg-mode: #2c2c2c;
  --input-border: #475569;
  --hover-bg: #121313;
  --navbar-text: #f1f5f9;
  --navbar-text-secondary: #cbd5e1;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.5);
  --card-header: #60ccec;
  --back-link: #821df0;
  --navbar-height: 80px;
  --container-padding: clamp(10px, 3vw, 30px);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .navbar-container,
[data-theme="dark"] .nav-menu {
  background: var(--bg-color) !important;
}

body {
  transition:
    background 0.25s ease,
    color 0.25s ease;
  position: relative;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--nav-border);
  transition:
    background 0.25s ease,
    border 0.25s ease,
    box-shadow 0.25s ease;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.navbar-right {
  display: flex;
  align-items: center;
  padding-right: 10px;
}

.navbar::-webkit-scrollbar {
  display: none;
}

.navbar.scrolled {
  background: rgba(255, 255, 255);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.navbar-container {
  display: flex;
  align-items: center;
  height: var(--navbar-height, 80px);
  padding-top: 0;
  padding-bottom: 0;
  padding-right: 0;
  max-width: 2000px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
  overflow: visible;
  gap: 0;
  justify-content: space-between;
}

.navbar-theme-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-left: 0;
  opacity: 0;
  transform: translateY(-20px);
  animation: navSlideDown 0.6s ease forwards;
  animation-delay: 0.5s;
}

.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: auto;
  max-width: 300px;
}

.logo-img,
.logo img {
  filter: brightness(1.15) saturate(1.1);
  transform: translateZ(0);
  backface-visibility: hidden;
  transition:
    transform 0.1s ease,
    opacity 0.1s ease;
}

.logo:hover .logo-img,
.logo:hover img {
  transform: scale(1.03) translateZ(0);
  opacity: 0.9;
  filter: brightness(1.15) saturate(1.1)
    drop-shadow(0 0 5px rgba(199, 125, 255, 0.4));
}

@media screen and (-webkit-min-device-pixel-ratio: 2),
  screen and (min-resolution: 192dpi),
  screen and (min-resolution: 2dppx) {
  .logo-img,
  .logo img {
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
  }
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--cat-bottom-theme);
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  z-index: 1100;
  border-radius: 8px;
  position: relative;
  transition: 0.25s ease;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
  margin-right: 13px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: 0.3s ease;
  transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  display: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(2px, 0.6vw, 8px);
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-height: var(--navbar-height, 80px);
}
.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-menu .nav-item {
  opacity: 0;
  transform: translateY(-20px);
  animation: navSlideDown 0.6s ease forwards;
}
.nav-menu .nav-item:nth-child(1) {
  animation-delay: 0.1s;
}
.nav-menu .nav-item:nth-child(2) {
  animation-delay: 0.15s;
}
.nav-menu .nav-item:nth-child(3) {
  animation-delay: 0.2s;
}
.nav-menu .nav-item:nth-child(4) {
  animation-delay: 0.25s;
}
.nav-menu .nav-item:nth-child(5) {
  animation-delay: 0.3s;
}
.nav-menu .nav-item:nth-child(6) {
  animation-delay: 0.35s;
}
.nav-menu .nav-item:nth-child(7) {
  animation-delay: 0.4s;
}
.nav-menu .nav-item:nth-child(8) {
  animation-delay: 0.45s;
}
.nav-menu .nav-item:last-child {
  animation-delay: 0.5s;
}

@keyframes navSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-item a {
  color: var(--text-color) !important;
  text-decoration: none !important;
  font-weight: 600;
  transition:
    color 0.25s ease,
    transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(13px, 1.3vw, 15px);
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 8px;
  position: relative;
}

.nav-item a::after {
  content: "";
  position: absolute;
  left: 15%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--back-link);
  transition: width 0.3s ease;
}
.nav-item a:hover::after,
.nav-item a.active::after {
  width: 70%;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--back-link) !important;
  transform: translateY(-2px);
}

.nav-divider {
  display: none;
}
.mobile-cats-item {
  display: none;
}

.user-avatar {
  width: 33px;
  height: 33px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 15px;
  margin-top: -5px;
  margin-bottom: -5px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  flex-shrink: 0;
  transition: 0.3s ease;
}
.user-avatar:hover {
  transform: scale(1.1);
}

.profile a {
  color: var(--navbar-text);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  padding: 8px 18px;
  border-radius: 10px;
  transition: 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(13px, 1.3vw, 15px);
  white-space: nowrap;
}
.nav-item.profile a:hover {
  background: var(--cat-bottom-theme);
  color: white !important;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

.theme-toggle-switch {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 110px;
  height: 43px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  padding: 4px;
  transition: background-color 0.4s ease;
  background-color: #f0f0f0;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.15);
  flex-shrink: 0 !important;
}

.theme-toggle-switch.dark {
  background-color: #1a1a2e;
}

.theme-toggle-switch:not([aria-pressed]) {
  visibility: hidden;
}

.toggle-thumb {
  position: absolute;
  left: 3px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: black;
}
.theme-toggle-switch.dark .toggle-thumb {
  transform: translateX(68px);
}

.toggle-label {
  position: absolute;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
  user-select: none;
}
.toggle-label.day {
  right: 14px;
  color: #242424;
  opacity: 1;
}
.toggle-label.night {
  left: 12px;
  color: #aaa;
  opacity: 0;
}
.theme-toggle-switch.dark .toggle-label.day {
  opacity: 0;
}
.theme-toggle-switch.dark .toggle-label.night {
  opacity: 1;
  color: #fff;
}

.mega-menu-wrapper {
  position: static !important;
}

.mega-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 600;
  color: var(--text-color);
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  position: relative;
  transition:
    color 0.25s ease,
    transform 0.2s ease;
}
.mega-trigger::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--back-link);
  transition: width 0.3s ease;
}
.mega-trigger:hover::after,
.mega-trigger.active::after {
  width: 90%;
}
.mega-trigger:hover,
.mega-trigger.active {
  color: #6b0fd4 !important;
  transform: translateY(-2px);
}

.mega-arrow {
  font-size: 11px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.mega-arrow.rotated {
  transform: rotate(180deg);
}

.mega-menu-panel {
  display: none;
  position: fixed;
  top: var(--navbar-height, 80px);
  left: 32vw;
  transform: translateX(-50%);
  width: min(96vw, 1199px);
  max-height: 72vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-primary);
  border-top: 3px solid #821df0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  padding: 28px 20px 20px;
  animation: megaFadeIn 0.2s ease forwards;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mega-menu-panel::-webkit-scrollbar {
  display: none;
}

@keyframes megaFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

[data-theme="dark"] .mega-menu-panel {
  background: var(--bg-secondary);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.mega-menu-grid {
  columns: 5 160px;
  column-gap: 20px;
  width: 100%;
}

.mega-menu-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 220px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 20px;
}

.mega-main-cat {
  background: none;
  border: none;
  border-bottom: 2px solid var(--border-color);
  cursor: pointer;
  text-align: left;
  padding: 0 0 10px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.2px;
  line-height: 1.4;
  width: 100%;
  transition: color 0.2s ease;
}
.mega-main-cat:hover {
  color: #6b0fd4;
}
[data-theme="dark"] .mega-main-cat:hover {
  color: #a78bfa;
}

.mega-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-sub-cat {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  border-radius: 6px;
  width: 100%;
  line-height: 1.4;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    padding-left 0.15s ease;
}
.mega-sub-cat:hover {
  background: var(--hover-bg);
  color: #6b0fd4;
  padding-left: 14px;
}
[data-theme="dark"] .mega-sub-cat:hover {
  color: #a78bfa !important;
}

.mega-see-more {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #6b0fd4;
  border-radius: 6px;
  width: 100%;
  line-height: 1.4;
  letter-spacing: 0.2px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    padding-left 0.15s ease;
  margin-top: 2px;
}
.mega-see-more:hover {
  background: rgba(107, 15, 212, 0.08);
  padding-left: 14px;
  color: #5a0ab3;
}
[data-theme="dark"] .mega-see-more {
  color: #a78bfa;
}
[data-theme="dark"] .mega-see-more:hover {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
}

.mega-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: transparent;
}

.nav-dd-wrapper {
  position: relative;
}

/* Prevent the mobile Current affairs / Educational Development /
   Competitive exams submenu from flashing open before navbar.js runs. */
.nav-dd-wrapper .mobile-sub-list {
  display: none;
}

.nav-dd-trigger {
  color: var(--text-color) !important;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(13px, 1.3vw, 15px);
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 8px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  transition:
    color 0.25s ease,
    transform 0.2s ease;
}
.nav-dd-trigger::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--back-link);
  transition: width 0.3s ease;
}
.nav-dd-trigger:hover::after,
.nav-dd-trigger.active::after {
  width: 90%;
}
.nav-dd-trigger:hover,
.nav-dd-trigger.active {
  color: #6b0fd4 !important;
  transform: translateY(-2px);
}

.nav-dd-arrow {
  font-size: 11px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.nav-dd-arrow.rotated {
  transform: rotate(180deg);
}

.nav-dd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  max-width: 270px;
  background: var(--bg-primary);
  border-top: 3px solid #821df0;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  padding: 10px 8px;
  animation: ddFadeIn 0.18s ease forwards;
}
@keyframes ddFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
[data-theme="dark"] .nav-dd-panel {
  background: var(--bg-secondary);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.nav-dd-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dd-item {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  border-radius: 8px;
  width: 100%;
  line-height: 1.4;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    padding-left 0.15s ease;
}
.nav-dd-item:hover {
  background: var(--hover-bg);
  color: #6b0fd4;
  padding-left: 18px;
}
[data-theme="dark"] .nav-dd-item:hover {
  color: #a78bfa;
}

.mobile-cats-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  padding: 4px 2px 8px;
}

.mobile-cat-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.mobile-cat-item {
  border-bottom: 1px solid var(--border-color);
}
.mobile-cat-item:last-child {
  border-bottom: none;
}
.mobile-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mobile-main-cat {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 11px 2px;
  flex: 1;
  transition: color 0.2s ease;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.mobile-main-cat:hover {
  color: #6b0fd4;
}

.mobile-cat-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 8px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.25s ease,
    color 0.2s ease;
  flex-shrink: 0;
  font-size: 12px;
}
.mobile-cat-toggle.open {
  transform: rotate(180deg);
  color: #6b0fd4;
}

.mobile-sub-list {
  list-style: none;
  margin: 0 0 10px 0;
  padding: 4px 0 4px 14px;
  border-left: 2px solid #821df0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mobile-sub-cat {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 7px 8px;
  border-radius: 6px;
  width: 100%;
  line-height: 1.4;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    padding-left 0.15s ease;
}
.mobile-sub-cat:hover {
  color: #6b0fd4;
  background: var(--hover-bg);
  padding-left: 14px;
}

.special-nav-item {
  list-style: none !important;
}

@media screen and (min-width: 1400px) {
  .nav-menu {
    gap: 2px;
  }
  .nav-item a,
  .nav-dd-trigger,
  .mega-trigger {
    padding: 12px 8px;
    font-size: 16px;
  }
  .special-nav-item {
    display: list-item !important;
  }
}

@media screen and (min-width: 1300px) and (max-width: 1399px) {
  .nav-item a,
  .nav-dd-trigger,
  .mega-trigger {
    padding: 10px 4px;
    font-size: 14.6px;
  }
  .theme-toggle-switch {
    width: 82px;
    height: 34px;
  }
  .toggle-thumb {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  .theme-toggle-switch.dark .toggle-thumb {
    transform: translateX(46px);
  }
  .toggle-label {
    font-size: 11px;
  }
  .toggle-label.day {
    right: 8px;
  }
  .toggle-label.night {
    left: 8px;
  }
  .navbar-theme-toggle {
    margin-left: 6px;
  }
}

@media screen and (min-width: 1250px) and (max-width: 1299px) {
  .nav-item a,
  .nav-dd-trigger,
  .mega-trigger {
    padding: 10px 4px;
    font-size: 13.5px;
  }
  /* ADD THESE: */
  .theme-toggle-switch {
    width: 78px;
    height: 32px;
  }
  .toggle-thumb {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .theme-toggle-switch.dark .toggle-thumb {
    transform: translateX(44px);
  }
  .toggle-label {
    font-size: 10px;
  }
  .toggle-label.day {
    right: 7px;
  }
  .toggle-label.night {
    left: 7px;
  }
  .navbar-theme-toggle {
    margin-left: 4px;
  }
  .user-avatar {
    width: 28px;
    height: 28px;
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s ease;
  }
}

@media screen and (min-width: 1200px) and (max-width: 1250px) {
  .nav-menu {
    gap: 0px;
  }
  .nav-item a,
  .nav-dd-trigger,
  .mega-trigger {
    padding: 10px 4px;
    font-size: 14px;
  }
  .special-nav-item {
    display: list-item !important;
  }
  .theme-toggle-switch {
    width: 92px;
    height: 34px;
  }
  .toggle-thumb {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  .theme-toggle-switch.dark .toggle-thumb {
    transform: translateX(56px);
  }
  .toggle-label {
    font-size: 11px;
  }
  .toggle-label.day {
    right: 10px;
  }
  .toggle-label.night {
    left: 10px;
  }
  .user-avatar {
    width: 26px;
    height: 26px;
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s ease;
  }
}

@media screen and (max-width: 1199px) {
  .mobile-toggle {
    display: flex !important;
    margin-right: 13px;
  }

  .navbar-theme-toggle {
    display: none;
  }

  .nav-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.52);
    animation: overlayIn 0.22s ease;
  }
  @keyframes overlayIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: min(300px, 82vw) !important;
    height: 100vh !important;
    background: var(--navbar-bg-light) !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: calc(var(--navbar-height, 80px) - 72px) 15px 40px 12px !important;
    gap: 0 !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    z-index: 1050 !important;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
    transition:
      right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0.3s ease,
      opacity 0.3s ease !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(130, 29, 240, 0.3) transparent;
    box-sizing: border-box;
  }

  .nav-menu.open {
    right: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .nav-menu .nav-item {
    animation: none !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item a {
    width: 100%;
    padding: 14px 16px;
    justify-content: flex-start;
    font-size: 15px;
    margin: 0;
    gap: 8px;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-item a::after {
    display: none;
  }
  .nav-item a:hover,
  .nav-item a.active {
    transform: translateX(5px);
  }

  .nav-divider {
    display: block !important;
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
    width: 100%;
  }

  .mobile-cats-item {
    display: block !important;
    width: 100%;
    padding: 18px 0 4px;
    border-bottom: 1px solid var(--border-color);
  }

  .mega-menu-wrapper {
    display: none !important;
  }
  .mega-backdrop {
    display: none !important;
  }
  .mega-menu-panel {
    display: none !important;
  }

  .nav-dd-wrapper {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-dd-trigger {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 0;
    justify-content: space-between;
  }
  .nav-dd-trigger::after {
    display: none;
  }
  .nav-dd-trigger:hover {
    transform: translateX(5px);
  }

  .special-nav-item {
    display: list-item !important;
  }

  .nav-item:has(.theme-toggle-switch) {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .theme-toggle-switch {
    width: 110px !important;
    height: 43px !important;
    flex-shrink: 0;
    margin: 0;
  }

  .toggle-thumb {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
  }

  .theme-toggle-switch.dark .toggle-thumb {
    transform: translateX(68px) !important;
  }

  .toggle-label {
    font-size: 13px !important;
  }
  .toggle-label.day {
    right: 14px !important;
  }
  .toggle-label.night {
    left: 12px !important;
  }

  .nav-menu .nav-item:last-child {
    flex-shrink: 0;
    padding-right: 0;
  }
}

@media screen and (min-width: 768px) and (max-width: 1091px) {
  .nav-menu {
    width: min(300px, 78vw) !important;
  }
  .nav-item a,
  .nav-dd-trigger {
    font-size: 15px;
    padding: 14px 18px;
  }
}

@media screen and (min-width: 600px) and (max-width: 767px) {
  .nav-menu {
    width: min(290px, 80vw) !important;
  }
  .nav-item a,
  .nav-dd-trigger {
    font-size: 14px;
    padding: 13px 16px;
  }
}

@media screen and (min-width: 480px) and (max-width: 599px) {
  .mobile-toggle {
    display: flex;
  }
  .nav-menu {
    width: min(280px, 82vw) !important;
  }
  .nav-item a,
  .nav-dd-trigger {
    padding: 12px 14px;
    font-size: 14px;
    gap: 8px;
  }
}

@media screen and (min-width: 380px) and (max-width: 479px) {
  .mobile-toggle {
    display: flex;
    width: 36px;
    height: 36px;
    padding: 4px;
  }
  .nav-menu {
    width: min(280px, 82vw) !important;
  }
  .nav-item a,
  .nav-dd-trigger {
    padding: 11px 12px;
    font-size: 13px;
    gap: 7px;
  }
  .nav-item a i,
  .nav-dd-trigger i {
    font-size: 15px;
  }
}

@media screen and (max-width: 379px) {
  .mobile-toggle {
    display: flex;
    width: 36px;
    height: 36px;
    padding: 4px;
  }

  .nav-menu {
    width: min(280px, 88vw) !important;
  }
  .nav-item a,
  .nav-dd-trigger {
    padding: 10px 10px;
    font-size: 12px;
    gap: 6px;
  }
  .nav-item a i,
  .nav-dd-trigger i {
    font-size: 14px;
  }
  .theme-toggle-switch {
    width: 96px !important;
    height: 38px !important;
  }
  .toggle-thumb {
    width: 30px !important;
    height: 30px !important;
    font-size: 14px !important;
  }
  .theme-toggle-switch.dark .toggle-thumb {
    transform: translateX(58px) !important;
  }
  .toggle-label {
    font-size: 11px !important;
  }
  .toggle-label.day {
    right: 10px !important;
  }
  .toggle-label.night {
    left: 10px !important;
  }
}

@media screen and (max-height: 500px) and (orientation: landscape) {
  .nav-menu {
    top: var(--navbar-height, 80px) !important;
    height: calc(100vh - var(--navbar-height, 80px)) !important;
    gap: 2px !important;
  }
  .nav-item a,
  .nav-dd-trigger {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
  .theme-toggle-switch {
    height: 34px !important;
    width: 90px !important;
  }
  .toggle-thumb {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }
  .theme-toggle-switch.dark .toggle-thumb {
    transform: translateX(54px) !important;
  }
}

html.menu-open,
html.menu-open body {
  overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  .logo-img,
  .logo img,
  .nav-menu,
  .nav-overlay,
  .toggle-thumb {
    transition: none !important;
    animation: none !important;
  }
  .nav-menu .nav-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.nav-item a .user-avatar + span {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}