/* --- NEW HEADER STYLES --- */
:root {
    --header-height: 70px;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-accent: #4ade80;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1001;
    /* Higher than mobile menu backdrop (1000) */
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

/* Logo */
.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    transition: transform 0.2s;
}

.brand-link:hover {
    transform: scale(1.02);
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
}

/* Desktop Nav */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-pill {
    padding: 8px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 99px;
    transition: all 0.2s ease;
}

.nav-pill:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-pill.active {
    color: black;
    background: var(--neon-accent);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

/* Right Side */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu-desktop {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    text-decoration: none;
    color: white;
    transition: all 0.2s;
}

.user-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.user-chip-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--neon-accent);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.user-chip-name {
    font-size: 13px;
    font-weight: 600;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
}

.icon-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

/* Auth Buttons */
.auth-buttons-desktop {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-text {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
}

.btn-primary-sm {
    background: var(--neon-accent);
    color: black;
    padding: 8px 20px;
    border-radius: 99px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-primary-sm:hover {
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
    transform: scale(1.05);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Toggle Active State */
.mobile-toggle.active .top {
    transform: translateY(4px) rotate(45deg);
}

.mobile-toggle.active .bottom {
    transform: translateY(-4px) rotate(-45deg);
}

/* --- MOBILE MENU --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 90px 24px 40px;
    /* Header height offset */
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-height: 100vh;
    overflow-y: auto;
    pointer-events: auto;
}

/* Open State */
.mobile-menu.open {
    pointer-events: auto;
}

.mobile-menu.open .mobile-menu-backdrop {
    opacity: 1;
}

.mobile-menu.open .mobile-menu-content {
    transform: translateY(0);
}

/* Mobile Links */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-link {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.mobile-link.special {
    color: var(--neon-accent);
}

/* Staggered Animation */
.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

/* Delays for staggering */
.mobile-menu.open .mobile-link:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.open .mobile-link:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-menu.open .mobile-link:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-menu.open .mobile-link:nth-child(4) {
    transition-delay: 0.25s;
}

.mobile-menu.open .mobile-link:nth-child(5) {
    transition-delay: 0.3s;
}

.mobile-menu.open .mobile-link:nth-child(6) {
    transition-delay: 0.35s;
}

/* Mobile Auth/User */
.mobile-auth {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.4s;
}

.mobile-menu.open .mobile-auth {
    opacity: 1;
    transform: translateY(0);
}

.mobile-user-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    background: var(--neon-accent);
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.mobile-username {
    font-weight: 700;
    color: white;
}

.mobile-profile-link {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
}

.mobile-logout-btn {
    font-size: 12px;
    color: #f87171;
    text-decoration: none;
    font-weight: 600;
}

.mobile-auth-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mobile-btn {
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

    .user-menu-desktop,
    .auth-buttons-desktop {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }
}

/* Fix main wrapper padding override */
.page-content,
.main-wrapper {
    padding-top: 90px;
}

/* Toast Container */
#toast-container {
    position: fixed;
    right: 16px;
    top: 90px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}

.toast {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(12, 16, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.toast--success {
    border-color: rgba(0, 200, 120, 0.9);
}

.toast--error {
    border-color: rgba(255, 80, 80, 0.9);
}

.toast--warning {
    border-color: rgba(255, 190, 80, 0.9);
}

.toast-icon {
    font-size: 16px;
    line-height: 1;
    margin-top: 1px;
}

.toast-message {
    flex: 1;
}

.toast-close {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-size: 16px;
    line-height: 1;
}

/* Image lightbox */
.img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
}

.img-lightbox.is-open {
    display: block;
}

.img-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .75);
}

.img-lightbox__dialog {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    margin: 6vh auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-lightbox__img {
    max-width: 92vw;
    max-height: 82vh;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}

.img-lightbox__close {
    position: absolute;
    right: -8px;
    top: -48px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(17, 24, 39, .85);
    color: #fff;
    font-size: 22px;
    line-height: 38px;
    cursor: pointer;
}

/* Fix volume slider thumb alignment */
.yplayer__vol {
    margin: 0 !important;
}

/* Default volume slider (e.g. on track page) */
.yplayer__vol::-webkit-slider-thumb {
    margin-top: -3px !important;
}

.yplayer__vol::-moz-range-thumb {
    margin-top: -3px !important;
}

/* Global dock player with "frog" icon - needs higher alignment */
#yplayer-dock .yplayer__vol::-webkit-slider-thumb {
    margin-top: -8px !important;
}

#yplayer-dock .yplayer__vol::-moz-range-thumb {
    margin-top: -8px !important;
}