﻿/* ════════════════════════════════════════════════════
   nav.css — PiratesGaming Navigation
   Place at: wwwroot/css/nav.css
════════════════════════════════════════════════════ */

/* ════════ TOP NAVBAR ════════ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    z-index: 900;
    background: transparent;
    transition: background 0.35s, box-shadow 0.35s;
}

    .main-nav.scrolled {
        background: rgba(8, 8, 8, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 1px 0 rgba(255,165,0,0.08);
    }

.nav-inner {
    height: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ── Logo ── */
.nav-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    text-decoration: none;
}

.nav-logo-name {
    font-family: var(--f-logo);
    font-size: 2rem;
    color: var(--orange);
    letter-spacing: 0.02em;
    line-height: 1;
    display: block;
    margin-top: 4px;
    transition: color 0.2s;
    text-shadow: 0 0 18px rgba(255,165,0,0.25);
}

.nav-logo:hover .nav-logo-name {
    color: var(--orange-light);
}

.nav-logo-tagline {
    font-family: var(--f-main);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* ── Center nav links ── */
.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
}

    .nav-center li a {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.45rem 0.9rem;
        font-family: var(--f-main);
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: #fff;
        border-radius: 7px;
        white-space: nowrap;
        text-decoration: none;
        position: relative;
        overflow: hidden;
        transition: color 0.22s ease;
    }

        /* slide-up fill */
        .nav-center li a::before {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--orange);
            border-radius: 7px;
            transform: translateY(102%);
            transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 0;
        }

        .nav-center li a i,
        .nav-center li a .nav-label {
            position: relative;
            z-index: 1;
        }

        .nav-center li a i {
            font-size: 0.82rem;
            opacity: 0.45;
            transition: opacity 0.22s;
        }

        .nav-center li a:hover {
            color: #0a0a0a;
        }

            .nav-center li a:hover::before {
                transform: translateY(0);
            }

            .nav-center li a:hover i,
            .nav-center li a.active i {
                opacity: 1;
            }

/* ── Right side (login / profile) ── */
.nav-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* login button */
.btn-nav-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    font-family: var(--f-main);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #fff;
    background: transparent;
    border: none;
    border-radius: 7px;
    position: relative;
    overflow: hidden;
    transition: color 0.22s ease;
    text-decoration: none;
    cursor: pointer;
}

    .btn-nav-login::before {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--orange);
        border-radius: 7px;
        transform: translateY(102%);
        transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 0;
    }

    .btn-nav-login i,
    .btn-nav-login .nav-label {
        position: relative;
        z-index: 1;
    }

    .btn-nav-login i {
        opacity: 0.55;
        transition: opacity 0.22s;
    }

    .btn-nav-login:hover {
        color: #0a0a0a;
    }

        .btn-nav-login:hover::before {
            transform: translateY(0);
        }

        .btn-nav-login:hover i {
            opacity: 1;
        }

/* ────────────────────────────────────
   PROFILE DROPDOWN
──────────────────────────────────── */
.profile-wrap {
    position: relative;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.8rem 0.42rem 1rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--f-main);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

    .profile-btn:hover {
        background: rgba(255,255,255,0.05);
    }

.profile-wrap.open .profile-btn {
    background: transparent;
}

.profile-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    letter-spacing: 0.02em;
}

.profile-chevron {
    font-size: 0.6rem;
    color: var(--text-3);
    transition: transform 0.25s ease, color 0.2s;
    flex-shrink: 0;
}

.profile-wrap.open .profile-chevron {
    transform: rotate(180deg);
    color: var(--orange);
}

/* ── Dropdown panel ── */
.profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    background: #0e0e12;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,165,0,0.06);
    overflow: hidden;
    z-index: 9999;
    animation: dropFade 0.18s cubic-bezier(0.22,1,0.36,1);
}

.profile-wrap.open .profile-menu {
    display: block;
}

@keyframes dropFade {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Header with avatar + name ── */
.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.profile-menu-avatar {
    width: 36px;
    height: 36px;
    background: var(--orange);
    color: #0a0a0a;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 800;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0;
    box-shadow: 0 0 14px rgba(255,165,0,0.25);
}

.profile-menu-info {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.profile-menu-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-role {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--orange);
}

/* ── Menu body ── */
.profile-menu-body {
    padding: 0.4rem;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 0.8rem;
    font-family: var(--f-main);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    background: none;
    border: none;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

    .profile-menu-item:hover {
        background: rgba(255,255,255,0.05);
        color: var(--text);
    }

    .profile-menu-item.logout:hover {
        background: rgba(239,68,68,0.08);
        color: #f87171;
    }

    .profile-menu-item i {
        font-size: 0.88rem;
        flex-shrink: 0;
    }

/* ════════ MOBILE BOTTOM NAV ════════ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--mob-nav-h);
    z-index: 950;
    background: rgba(6, 6, 6, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--b1);
    align-items: stretch;
    box-shadow: 0 -6px 30px rgba(0,0,0,0.7);
}

.mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: var(--f-main);
    font-size: 0.46rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
    position: relative;
    transition: color 0.2s;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

    .mob-nav-item i {
        font-size: 1.18rem;
        transition: transform 0.2s;
        display: block;
    }

    .mob-nav-item:hover,
    .mob-nav-item.active {
        color: var(--orange);
    }

        .mob-nav-item.active i {
            transform: translateY(-2px);
        }

        .mob-nav-item.active::before {
            content: '';
            position: absolute;
            top: 0;
            left: 16%;
            right: 16%;
            height: 2px;
            background: var(--orange);
            border-radius: 0 0 3px 3px;
            box-shadow: 0 0 8px rgba(255,165,0,0.4);
        }

/* ════════ RESPONSIVE BREAKPOINTS ════════ */

/* Tablet: hide center links, keep logo + profile */
@media (max-width: 1024px) {
    .nav-center {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

    :root {
        --nav-h: 56px;
    }

    .main-nav {
        height: 56px;
    }

    .nav-inner {
        padding: 0 1.25rem;
        justify-content: space-between;
        position: relative;
    }

    .page-content {
        padding-top: var(--nav-h);
        padding-bottom: calc(var(--mob-nav-h) + 0.5rem);
    }

    footer {
        padding-bottom: var(--mob-nav-h);
    }
}

/* Mobile: tighter logo */
@media (max-width: 480px) {
    .nav-logo-name {
        font-size: 1.65rem;
    }

    .nav-logo-tagline {
        display: none;
    }

    .nav-inner {
        padding: 0 1rem;
    }

    .profile-name {
        max-width: 80px;
        font-size: 0.75rem;
    }

    .profile-btn {
        padding: 0.38rem 0.6rem 0.38rem 0.75rem;
    }
}
