/* ========== Shared Navbar ========== */
.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid #1a1a1a;
    z-index: 9999;
    display: flex;
    align-items: center;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 100;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    margin-right: 16px;
}

/* Nav links */
.nav-menu .nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 21px;
    border-radius: 8px;
    white-space: nowrap;
    position: relative;
}

.nav-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-menu .nav-link.active {
    color: #a2ff00;
    background: rgba(162, 255, 0, 0.1);
}

.nav-msg-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ff4444;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
    pointer-events: none;
}

.nav-msg-badge.show {
    display: flex;
}

.nav-review-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #a2ff00;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 0 8px rgba(162, 255, 0, 0.5);
    pointer-events: none;
}

.nav-review-badge.show {
    display: flex;
}

/* Nav buttons */
.btn-nav-accent {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
    cursor: pointer;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-nav-accent:hover {
    background: #8cdf00;
}

.btn-nav-exit {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-nav-exit:hover {
    background: #ff4444;
    color: #fff;
}

/* User display in navbar */
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 6px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nav-user:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.nav-user.dancer .nav-user-avatar {
    background: #a2ff00;
    color: #000;
}

.nav-user.choreographer .nav-user-avatar {
    background: #8A2BE2;
    color: #fff;
}

.nav-user.dancer:hover {
    border-color: #a2ff00;
    box-shadow: 0 0 10px rgba(162, 255, 0, 0.15);
}

.nav-user.choreographer:hover {
    border-color: #8A2BE2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.15);
}

.nav-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.nav-user-name {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Navbar spacer */
.navbar-spacer {
    height: 80px;
}

/* ========== Nav right group (gear + hamburger) ========== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nav-gear-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-gear-wrap-row {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 60;
}

.nav-gear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.4s var(--ease-out, cubic-bezier(.16,1,.3,1)), color 0.2s ease;
}

.nav-gear:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #a2ff00;
}

.nav-gear.active {
    transform: rotate(90deg);
    color: #a2ff00;
}

.nav-gear svg {
    display: block;
}

.nav-gear-menu {
    position: absolute;
    top: 54px;
    right: 0;
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
    background: #0e0e0e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.nav-gear-menu.open {
    display: flex;
}

.nav-gear-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #eee;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.nav-gear-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #a2ff00;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .main-navbar {
        height: 72px;
    }

    .navbar-spacer {
        height: 72px;
    }

    .nav-container {
        padding: 0 6px;
    }

    .nav-logo img {
        height: 64px;
    }

    .nav-right {
        margin-left: auto;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-menu {
        margin-left: 0 !important;
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        padding: 16px 20px;
        gap: 10px;
        border-bottom: 1px solid #1a1a1a;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        align-items: stretch;
    }

    .nav-menu.open {
        display: flex;
        animation: slideMenuIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .nav-menu .nav-link,
    .btn-nav-accent,
    .btn-nav-exit {
        width: 100%;
        text-align: center;
        padding: 18px 21px;
        font-size: 21px;
    }

    .nav-user {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        padding: 8px 12px;
    }

    .nav-user-name {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .nav-menu .nav-link {
        font-size: 20px;
        padding: 15px 18px;
    }
}
