/* ============================================
   SHARED HEADER STYLES
   Used by every page via partials/header.php, which itself pulls in
   this stylesheet — so the header looks and behaves identically
   everywhere from one file. Mirrors the self-contained approach in
   footer.css (own font-family, own box-sizing) for the same reason:
   pages differ in their own global resets, so the header can't rely
   on inheriting anything from whichever page includes it.
============================================ */

#navbar, #navbar * { box-sizing: border-box; }

#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 0 2.5rem; height: 68px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(10,10,15,0.75);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(108,99,255,0.12);
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
#navbar.scrolled { background: rgba(10,10,15,0.97); }
.nav-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.nav-logo-text {
    font-size: 1.35rem; font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #8b85ff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links {
    /* Absolutely centered on the navbar itself, independent of how
       wide the logo or nav-actions (Shop Now, and especially the
       Discord auth widget, which starts empty and then grows once
       login-status is confirmed) happen to be. With this in normal
       flex flow instead, growing/shrinking siblings would shove the
       links visibly left/right as the page loads — this keeps them
       pinned dead center the whole time. */
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: flex; align-items: center; gap: 0.3rem; list-style: none; margin: 0; padding: 0;
}
.nav-links a {
    text-decoration: none; color: #9898b8; font-weight: 500; font-size: 0.88rem;
    padding: 7px 14px; border-radius: 8px; transition: all 0.3s ease;
}
.nav-links a:hover { color: #ffffff; background: rgba(108,99,255,0.08); }
.nav-links a.active { color: #ffffff; background: rgba(108,99,255,0.12); }
.nav-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 22px; border-radius: 8px; font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 0.88rem; cursor: pointer; transition: all 0.3s ease;
    text-decoration: none; border: none; white-space: nowrap;
    background: linear-gradient(135deg, #6c63ff, #5a52d5); color: white;
    box-shadow: 0 4px 15px rgba(108,99,255,0.35); min-height: 44px;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(108,99,255,0.5); }
.nav-cta:active { transform: scale(0.96); }
.mobile-menu-btn {
    display: none; background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.2);
    color: #fff; width: 44px; height: 44px; border-radius: 8px;
    align-items: center; justify-content: center; cursor: pointer; font-size: 1.2rem;
    transition: all 0.3s ease; flex-shrink: 0; -webkit-tap-highlight-color: transparent; padding: 0;
}
.mobile-menu-btn:hover { background: rgba(108,99,255,0.2); }
.mobile-menu-btn:active { transform: scale(0.92); }
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 999; display: none; opacity: 0; transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active { display: block; opacity: 1; }
.mobile-menu-content {
    position: fixed; top: 0; right: 0; width: min(280px, 85vw); height: 100%;
    background: #0d0d18; padding: 2rem 1.5rem; z-index: 1000;
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    border-left: 1px solid rgba(108,99,255,0.1); overflow-y: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;
}
.mobile-menu-content * { box-sizing: border-box; }
.mobile-menu-content.open { transform: translateX(0); }
.mobile-menu-content .close-btn {
    position: absolute; top: 1.2rem; right: 1.2rem;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(108,99,255,0.12);
    color: #9898b8; width: 44px; height: 44px; border-radius: 8px; cursor: pointer;
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.mobile-menu-content .close-btn:hover { background: rgba(255,255,255,0.1); }
.mobile-menu-content ul { list-style: none; margin-top: 3.5rem; display: flex; flex-direction: column; gap: 0.3rem; padding: 0; }
.mobile-menu-content ul li a {
    display: block; padding: 12px 16px; color: #fff; text-decoration: none;
    font-weight: 500; border-radius: 8px; transition: all 0.3s ease; font-size: 1rem;
}
.mobile-menu-content ul li a:hover, .mobile-menu-content ul li a.active {
    background: rgba(108,99,255,0.1); color: #6c63ff;
}
.mobile-menu-content .mobile-cta {
    margin-top: 1rem; display: block; text-align: center; padding: 14px;
    background: linear-gradient(135deg, #6c63ff, #5a52d5); border-radius: 8px;
    color: #fff; text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: all 0.3s ease;
}
.mobile-menu-content .mobile-cta:active { transform: scale(0.96); }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    /* "Shop Now" is homepage-only to begin with (see header.php);
       on top of that it's dropped from the header on mobile widths
       everywhere, so the logo/auth-widget/hamburger row doesn't get
       cramped. It's still reachable via the mobile slide-out menu. */
    .nav-cta { display: none; }
}

/* Nav gets cramped on phones: logo + auth widget + Shop Now +
   hamburger all fighting for room, so tighten spacing and shrink the
   Shop Now button instead of letting it wrap/overflow. */
@media (max-width: 640px) {
    #navbar { padding: 0 1rem; height: 60px; }
    .nav-logo-text { font-size: 1.1rem; }
    #navbar .nav-actions { gap: 0.5rem !important; }
}
@media (max-width: 400px) {
    #navbar { padding: 0 0.75rem; }
    .nav-logo-text { font-size: 1rem; }
}
