/* ==============================
   NAVBAR
============================== */
nav {
  width: 100%;
  height: 72px;
  background: var(--color-bg);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
}

/* Light theme overrides for main navigation bar */
body.theme-light nav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.theme-light .nav-links a,
body.theme-light .nav-links .dropbtn {
  color: #000000 !important;
  background: transparent !important;
  border: none !important;
}

body.theme-light .nav-links a:hover,
body.theme-light .nav-links .dropbtn:hover {
  background: #f8f9fa !important;
  color: #ff69b4 !important;
  box-shadow: 0 0 10px rgba(255,105,180,0.3) !important;
}

body.theme-light .nav-links .dropdown-content {
  background: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

body.theme-light .nav-links .dropdown-content a {
  color: #000000 !important;
  background: transparent !important;
}

body.theme-light .nav-links .dropdown-content a:hover {
  background: #f8f9fa !important;
  color: #ff69b4 !important;
}

/* Additional overrides for any hardcoded black backgrounds in main CSS */
body.theme-light .nav-links {
  background: transparent !important;
}

body.theme-light .nav-links > * {
  background: transparent !important;
}

body.theme-light .dropdown {
  background: transparent !important;
}

body.theme-light .dropbtn {
  background: transparent !important;
}



/* ==============================
   TOP CHARTS
============================== */
.chart-toggle {
  background: #1a1a1a;
  color: #fff;
}
.chart-toggle.is-active {
  background: #ff69b4;
  color: #000;
}


.nav-links {
  display: flex;
  gap: clamp(10px, 1.2vw, 18px);
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: space-evenly;
}

/* Give the last nav item (Settings) breathing room from search */
.nav-links > *:last-child {
  margin-right: 10px;
}

nav a,
nav .dropbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  color: #ff69b4;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  white-space: nowrap;
}

nav a i,
nav .dropbtn i {
  font-size: 1.05rem;
  color: #ffb6c1;
  transition: all 0.3s ease-in-out;
}

nav a:hover,
nav .dropbtn:hover {
  background-color: rgba(255,20,147,0.2);
  box-shadow: 0 0 12px rgba(255,105,180,0.7);
  color: #fff;
}

nav a:hover i,
nav .dropbtn:hover i {
  color: #fff;
  text-shadow: 0 0 10px #ff69b4;
}


/* Dropdown */
/* Dropdown */
.dropdown {
  position: relative;
  display: inline-flex;    /* keeps hover area tight */
  align-items: center;
  border-radius: 8px;
  transition: 0.3s;
}

/* Remove background change on whole dropdown hover */
.dropdown:hover {
  background-color: transparent;
  box-shadow: none;
}

/* Button hover ONLY when the button itself is hovered */
.dropbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 8px;
  color: #ff69b4;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  appearance: none;
  /* Match <a> typography exactly (buttons differ by browser) */
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  margin: 0;
}

/* Correct hover behavior */
.dropbtn:hover,
.dropbtn:focus {
  background-color: rgba(255,20,147,0.2);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,105,180,0.7);
}

/* Keep the trigger glowing while the dropdown menu is hovered/open */
.dropdown:hover .dropbtn {
  background-color: rgba(255,20,147,0.2);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,105,180,0.7);
}

/* Icon hover fix */
.dropbtn:hover i,
.dropbtn:focus i {
  color: #fff;
  text-shadow: 0 0 10px #ff69b4;
}

/* Keep icon glowing while dropdown menu is hovered/open */
.dropdown:hover .dropbtn i {
  color: #fff;
  text-shadow: 0 0 10px #ff69b4;
}


/* Dropdown menu */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: black;
  min-width: 160px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
  border-radius: 8px;
  z-index: 10;
  padding: 0;
  margin-top: 12px;
}

/* For the LAST dropdown in the navbar (Settings), open the menu leftward
   so it doesn't overlap the search bar */
.nav-links .dropdown:last-of-type .dropdown-content {
  right: 0;
  left: auto;
  transform: translateX(-14px);
  min-width: 150px;
}

.dropdown-content a {
  color: lightpink;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  font-size: 1rem;
  transition: 0.2s;
}

.dropdown-content a:hover {
  background-color: darkorchid;
}

/* Show menu ONLY when hovering the button or content */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Neon underline */
nav a::after,
nav .dropbtn::after {
  content: '';
  display: block;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg,#ff69b4,#ff00ff);
  transition: width 0.3s ease-in-out;
  margin-top: 3px;
  border-radius: 10px;
}
nav a:hover::after,
nav .dropbtn:hover::after { width: 100%; }
