/* ==========================================================================
   WaveSubs PRO — Navbar (Desktop + Mobile Responsive)
   Adapted from base responsive nav — collapses at 768px
   ========================================================================== */

nav {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(10,10,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background-color .3s ease;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 60px;
}

/* ── Logo ── */
.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.avatar {
  vertical-align: middle;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.nav-logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.nav-badge {
  font-size: 10px;
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

/* ── Nav Links (Desktop) ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}

.nav-link:hover {
  color: var(--text);
}

/* Buy button stays inline on desktop */
.nav-links .btn {
  margin-left: 0;
}

/* ── Hamburger Toggle (hidden on desktop) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1010;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all .3s ease-in-out;
}

/* Hamburger → X animation */
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================================================================
   Responsive — collapses at 768px
   ========================================================================== */

@media (max-width: 768px) {

  .nav-inner {
    padding: 0 20px;
  }

  /* Off-canvas mobile menu */
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: 78%;
    max-width: 300px;
    /* height: 100%; */
    background: var(--nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 28px 32px;
    gap: 0;
    transform: translateX(100%);
    transition: transform .3s ease-in-out;
    box-shadow: -8px 0 32px rgba(0,0,0,.4);
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }

  /* Buy button inside mobile menu */
  .nav-links .btn {
    width: 100%;
    margin-top: 20px;
    text-align: center;
    justify-content: center;
  }

  /* Show hamburger */
  .nav-toggle {
    display: flex;
  }
}

/* Backdrop overlay when mobile menu is open */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity .3s ease;
}

.nav-overlay.open {
  display: block;
  opacity: 1;
}

@media (min-width: 769px) {
  .nav-overlay { display: none !important; }
}