/* Global Navigation & Explore Modal Styles */

/* Nav height token — used by pages with fixed/absolute elements that must clear the nav */
:root {
    --nav-height: 53px;
}

/* Push all page content below the fixed nav */
body {
    padding-top: var(--nav-height, 53px);
}

/* ==================== NAVIGATION BAR ==================== */
.global-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(51, 255, 51, 0.3);
    position: fixed;
    top: 0;
    box-sizing: border-box;

    /*
     * Bulletproofing: force full viewport width regardless of what the parent
     * element (body) does with flex, padding, max-width, etc.
     *   - width: 100vw always fills the viewport
     *   - margin-left: calc(50% - 50vw) cancels any centering/padding offset
     *     (works for both normal-flow body padding and flex-column body)
     */
    width: 100vw;
    margin-left: calc(50% - 50vw);

    /* Stay above all page-specific fixed/absolute content.
     * 9000 = --z-modal-backdrop, which sits below modals (9998-9999) but
     * above any page element that should never obscure the nav. */
    z-index: 9000;
}

.nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Roboto Mono', monospace;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #33ff33;
    text-decoration: none;
    text-transform: none;
}

.nav-brand:hover {
    text-shadow: 0 0 10px #33ff33;
}

.nav-separator {
    color: rgba(51, 255, 51, 0.5);
    font-weight: 300;
}

.nav-explore-link {
    font-size: 0.9rem;
    color: #e622c5;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.nav-explore-link:hover {
    text-shadow: 0 0 10px #e622c5;
}

.nav-current {
    font-size: 0.9rem;
    font-weight: 600;
    color: #33ff33;
    letter-spacing: 0.05em;
}

/* Profile Button */
.nav-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #33ff33;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}

.nav-profile-btn:hover {
    background: rgba(51, 255, 51, 0.2);
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.4);
}

.nav-profile-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(88%) sepia(15%) saturate(5735%) hue-rotate(68deg) brightness(104%) contrast(115%);
}

/* ==================== EXPLORE MODAL ==================== */
.explore-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

.explore-modal.active {
    display: block;
}

.explore-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.explore-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: #0a0a0a;
    border: 2px solid #33ff33;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(51, 255, 51, 0.2);
}

.explore-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(51, 255, 51, 0.3);
}

.explore-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #33ff33;
    letter-spacing: 0.1em;
}

.explore-modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid #e622c5;
    background: transparent;
    color: #e622c5;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.explore-modal-close:hover {
    background: rgba(230, 34, 197, 0.2);
    box-shadow: 0 0 10px rgba(230, 34, 197, 0.4);
}

.explore-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Categories */
.explore-category {
    margin-bottom: 1.5rem;
}

.explore-category:last-child {
    margin-bottom: 0;
}

.explore-category-title {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e622c5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(230, 34, 197, 0.3);
}

/* Links */
.explore-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.explore-link {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(51, 255, 51, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    text-decoration: none;
    transition: all 0.2s ease;
}

.explore-link:hover {
    border-color: #33ff33;
    background: rgba(51, 255, 51, 0.1);
    transform: translateY(-2px);
}

.explore-link-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #33ff33;
    margin-bottom: 0.25rem;
}

.explore-link-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.explore-link-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #e622c5;
    border: 1px solid #e622c5;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.explore-link--requires-login {
    border-color: rgba(230, 34, 197, 0.3);
}

.explore-link--requires-login:hover {
    border-color: #e622c5;
    background: rgba(230, 34, 197, 0.1);
}

.explore-link--requires-login .explore-link-name {
    color: #e622c5;
}

/* Scrollbar */
.explore-modal-body::-webkit-scrollbar {
    width: 8px;
}

.explore-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.explore-modal-body::-webkit-scrollbar-thumb {
    background: #33ff33;
    border-radius: 4px;
}

.explore-modal-body::-webkit-scrollbar-thumb:hover {
    background: #e622c5;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .global-nav {
        padding: 0.4rem 0.75rem;
    }

    .nav-brand {
        font-size: 0.95rem;
    }

    .nav-explore-link,
    .nav-current {
        font-size: 0.8rem;
    }

    .nav-profile-btn {
        width: 32px;
        height: 32px;
    }

    .nav-profile-icon {
        width: 20px;
        height: 20px;
    }

    .explore-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .explore-links {
        grid-template-columns: 1fr;
    }
}

/* ==================== HIDE OLD ELEMENTS ==================== */
/* Hide the old top-nav since we're using global-nav now */
.top-nav {
    display: none !important;
}

/* Hide old page titles since breadcrumb now shows page name */
/* Pages can remove this if they want to keep their title */
