/* ===== Shared Navigation Override — Cloodit Rebrand ===== */
/* Include this AFTER the page-specific CSS to override old nav styles */

.top-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: none;
    /* Needed so absolute-positioned mobile dropdown anchors under the nav bar */
    isolation: isolate;
}

.top-nav .nav-inner {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-link img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 14px;
    transition: all 0.2s;
    color: #555;
}

.nav-link:hover {
    color: #6C5CE7;
    background: rgba(108, 92, 231, 0.08);
}

.nav-link.active {
    color: #6C5CE7;
    font-weight: 700;
    background: rgba(108, 92, 231, 0.10);
}

/* Join Game button in nav */
.nav-link-join {
    background: #FF7043;
    color: #fff !important;
    border-radius: 14px;
    font-weight: 700;
    padding: 8px 18px;
    font-size: 13px;
    box-shadow: 0 3px 0 #D84315;
    transition: all 0.15s;
}

.nav-link-join:hover {
    background: #F05A2A;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #D84315;
}

.nav-link-join:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #D84315;
}

/* Auth button in nav */
.nav-link-auth {
    background: #6C5CE7;
    color: #fff !important;
    border-radius: 14px;
    font-weight: 700;
    padding: 8px 18px;
    font-size: 13px;
    margin-left: 4px;
    border: none;
    box-shadow: 0 3px 0 #4A3CB5;
}

.nav-link-auth:hover {
    background: #5B4BD5;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 0 #4A3CB5;
}

.nav-link-auth:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #4A3CB5;
}

/* Sound button */
.nav-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-icons .nav-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.nav-icons .nav-btn:hover {
    background: rgba(108, 92, 231, 0.08);
    color: #6C5CE7;
}

/* Hamburger menu button — hidden on desktop, shown in mobile media query below */

/* Badge pulse animation (keep existing) */
.nav-link.badge-pulse {
    animation: badgePulse 1.5s ease-in-out infinite;
    color: #FFD700;
    font-weight: 700;
}

@keyframes badgePulse {
    0%, 100% { background-color: rgba(255, 215, 0, 0.1); box-shadow: none; }
    50% { background-color: rgba(255, 215, 0, 0.25); box-shadow: 0 0 12px rgba(255, 215, 0, 0.4); }
}

/* ===== Responsive ===== */
@media (min-width: 769px) {
    #menu-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 16px;
        height: 56px;
    }

    .nav-logo-link img {
        height: 32px;
    }

    /* Show hamburger button */
    #menu-btn {
        display: flex;
    }

    /* Hide nav links by default — JS toggles .open to show as dropdown */
    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        padding: 8px 0;
        z-index: 99;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        padding: 14px 24px;
        border-radius: 0;
        min-height: 44px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-link-auth {
        padding: 14px 24px;
        border-radius: 0;
        font-size: 14px;
        margin-left: 0;
    }

    .nav-icons {
        display: flex;
    }

    #sound-btn {
        display: none;
    }
}
