.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(20, 20, 20, 0.85);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Inner container */
.nav-container {
    display: flex;
    align-items: center;
    height: 70px;
    padding: 0 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.logo-img-small {
    height: 45px;
    width: auto;
    filter: grayscale(100%) brightness(10) contrast(1);
    display: block;
}

.logo-text {
    font-weight: 600;
    font-size: 20px;
    color: #f0f0f0;
    line-height: 1;
    white-space: nowrap;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Navigation Links */
.nav-list {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0 40px 0 40px;
}

.nav-list li a {
    color: #f0f0f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;

    display: inline-block;
    padding: 15px 10px;
    margin: -15px -10px;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: #FF8C00;
}

/* Spacer pushes right-aligned items */
.nav-spacer {
    flex: 1;
}

/* Premium Button */
.premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #1e1e2f;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid #FFC107;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(255, 179, 0, 0.5);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    margin-right: 25px;
    position: relative;
    z-index: 1001;
}

.promo-pill {
    padding: 2px 8px;
    border-radius: 999px;
    background: #57d39b;
    color: #062b1c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
}

.premium-btn .promo-pill {
    margin-left: 2px;
    padding: 2px 7px;
    background: #1e1e2f;
    color: #57d39b;
    font-size: 10px;
}

@media (max-width: 1060px) {
    .premium-btn .promo-pill {
        display: block;
        position: absolute;
        top: -3px;
        right: -3px;
        width: 13px;
        height: 13px;
        padding: 0;
        margin: 0;
        background: #57d39b;
        font-size: 0;
        box-shadow: 0 0 0 2px #141414, 0 2px 6px rgba(87, 211, 155, 0.5);
    }
}

.sidebar-item .promo-pill {
    margin-left: auto;
}

.sidebar-item[data-section="billing"] .promo-pill {
    display: none;
}

.sidebar-item[data-section="billing"][data-plan="none"] .promo-pill {
    display: block;
}

.premium-btn:hover {
    background: linear-gradient(135deg, #FFE259, #FFB347);
    box-shadow: 0 6px 12px rgba(255, 179, 0, 0.7);
    transform: translateY(-1px);
}

.premium-btn:active {
    background: linear-gradient(135deg, #FFC107, #FF8C00);
    box-shadow: 0 3px 6px rgba(255, 179, 0, 0.5);
    transform: translateY(1px);
}

.premium-btn img,
.premium-btn .premium-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    filter: brightness(10) grayscale(1) drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}


/* Login Button */
.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background-color: transparent;
    border: 2px solid #9b59b6;
    border-radius: 30px;
    color: #f0f0f0;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.login-btn:hover {
    background-color: rgba(155, 89, 182, 0.2);
}

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  cursor: pointer;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  background-color: transparent;
  border-radius: 30px;
  color: #f0f0f0;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.18s,
    box-shadow 0.2s,
    transform 0.1s;
  box-sizing: border-box;
}

.user-menu:hover,
.user-menu.active {
  border-color: #a97fd8;
  background-color: rgba(155, 89, 182, 0.10);
  box-shadow: 0 6px 16px #a97fd855, 0 2px 8px #a97fd822;
  transform: translateY(-1px);
}

/* User avatar */
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #23283a;
  box-shadow: 0 2px 8px #a97fd833;
  transition: box-shadow 0.18s, border-color 0.18s;
}

/* Dropdown menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #23283a;
  border-radius: 14px;
  box-shadow: 0 6px 24px #000a;
  min-width: 150px;
  max-width: 200px;
  width: 100%;
  padding: 0 0 10px 0;
  z-index: 100;
  animation: dropdown-fade-in 0.28s cubic-bezier(.4,0,.2,1);
  border: 1.5px solid #393e4a;
  text-align: center;
  pointer-events: auto;
}

.user-menu.active .dropdown-menu {
  display: block;
}

/* Profile block */
.dropdown-user-info {
  width: 100%;
  border-radius: 14px 14px 7px 7px;
  margin: 0 0 14px 0;
  box-shadow: 0 1px 6px #0002;
  padding: 18px 0 8px 0;
  background: linear-gradient(135deg, #23283a 80%, #262b38 100%);
  border-bottom: 1px solid #393e4a;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.18s;
  cursor: pointer;
  pointer-events: auto;
}

.dropdown-user-info:hover {
  background: linear-gradient(135deg, #2e2b38 80%, #23283a 100%);
}

/* Avatar */
.user-avatar-dropdown {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  background: #23283a;
  border: 2.5px solid #393e4a;
  box-shadow: 0 1px 4px #2226;
  margin-bottom: 10px;
  transition: box-shadow 0.18s;
}

/* Name */
.user-display-name {
  font-weight: 700;
  color: #fff;
  font-size: 1em;
  margin-bottom: 2px;
  text-align: center;
}

.user-username {
  color: #bfc7d5;
  font-size: 0.92em;
  font-style: italic;
  opacity: 0.85;
  margin-bottom: 0;
  text-align: center;
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.95em;
  cursor: pointer;
  transition: background 0.18s;
  text-align: center;
  border-radius: 8px;
  margin: 0 10px 4px 10px;
  background: none;
  pointer-events: auto;
}

.dropdown-item:hover {
  background: #262b38;
  color: #e0e0e0;
}

/*  Dividers  */
.dropdown-divider {
  border: none;
  border-top: 1px solid #393e4a;
  margin: 12px 24px;
  width: calc(100% - 48px);
}

.dropdown-user-info {
  margin-bottom: 14px;
}

.dropdown-menu {
  pointer-events: none;
}
.dropdown-user-info,
.dropdown-item {
  pointer-events: auto;
}

/* Dropdown menu entrance animation */
@keyframes dropdown-fade-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98);}
  to   { opacity: 1; transform: translateY(0) scale(1);}
}

.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    z-index: 10002;
    margin-left: 15px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    position: absolute;
    left: 50%;
    margin-left: -10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger::before {
    content: '';
    top: -6px;
}

.hamburger::after {
    content: '';
    top: 6px;
}

.menu-toggle.open .hamburger {
    background: transparent;
}

.menu-toggle.open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

@media (max-width: 1250px) and (min-width: 901px) {
    .nav-list {
        gap: 22px;
        margin: 0 28px;
    }

    .user-menu .user-name {
        display: none;
    }

    .user-menu {
        padding: 0;
    }

    .user-menu .user-avatar {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 1060px) and (min-width: 901px) {
    .nav-list {
        gap: 16px;
        margin: 0 18px;
    }

    .nav-list li a {
        font-size: 15px;
    }

    .logo-text {
        font-size: 18px;
    }

    .premium-btn span {
        display: none;
    }

    .premium-btn {
        padding: 8px !important;
        width: 40px;
        min-width: 40px;
        height: 40px;
        box-sizing: border-box;
        justify-content: center;
    }

    .user-menu {
        padding: 0;
        height: 40px;
    }

    .user-menu .user-avatar {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 900px) {
    .user-menu .user-name {
        display: none;
    }

    .user-menu {
        padding: 0;
        height: 40px;
    }

    .user-menu .user-avatar {
        width: 40px;
        height: 40px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 10px;
    }

    nav#main-nav, .nav-spacer {
        display: none;
    }

    .premium-btn {
        margin-left: auto !important;
        margin-right: 10px;
        padding: 8px !important;
        width: 40px;
        min-width: 40px;
        height: 40px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .premium-btn span {
        display: none;
    }

    #login-btn {
        margin-right: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #login-btn span,
    #login-btn .user-name,
    #login-btn p {
        display: none !important;
    }

    #login-btn img {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        margin: 0 !important;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        background: rgba(10, 10, 10, 0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 10001;
    }

    .nav-list.active {
        display: flex;
    }
}