/* navigation.css — верхняя панель, ссылки, переключатель языка, меню профиля */

.nav-bar {
    background: var(--glass-bg);
    border-radius: var(--radius-pill);
    padding: 6px 20px;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: var(--shadow), 0 0 30px rgba(61, 158, 179, 0.02);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.nav-link {
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 16px;
    transition:
        background var(--duration-base) var(--ease-out),
        color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.nav-link:hover {
    background: rgba(61, 158, 179, 0.12);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent);
    color: white;
    box-shadow: var(--neon-glow);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: white;
    border-radius: 2px;
    filter: blur(1px);
}

/* ---------- Переключатель языка ---------- */

.lang-switcher {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--duration-base) var(--ease-out);
    white-space: nowrap;
    font-family: var(--font-family);
    position: relative;
    overflow: hidden;
}

.lang-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(61, 158, 179, 0.3);
}

.lang-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: var(--neon-glow);
}

/* ---------- Профиль в навигации ---------- */

.nav-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition:
        border-color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out);
    position: relative;
}

.nav-profile:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(61, 158, 179, 0.15);
}

.nav-profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px rgba(61, 158, 179, 0.3);
}

.nav-profile-login {
    font-size: 14px;
    color: var(--text-primary);
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-profile-login.placeholder {
    color: var(--text-secondary);
}

.nav-profile-chevron {
    color: var(--text-secondary);
    font-size: 12px;
    transition: transform 0.3s var(--ease-out);
}
.nav-profile:hover .nav-profile-chevron {
    transform: rotate(90deg);
}

/* ---------- Выпадающее меню профиля ---------- */

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 0;
    min-width: 220px;
    box-shadow: var(--shadow), 0 0 30px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.nav-profile.active .profile-dropdown {
    display: block;
    animation: slideDown 0.25s var(--ease-out);
    max-width: 90vw;
    left: auto;
    right: 0;
}

@keyframes slideDown {
    0% { opacity: 0; transform: translateY(-10px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-dropdown-item {
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--duration-base) var(--ease-out),
                color var(--duration-base) var(--ease-out);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-dropdown-item:hover {
    background: rgba(61, 158, 179, 0.12);
    color: var(--text-primary);
}
.profile-dropdown-item i {
    width: 16px;
    color: var(--accent);
}
.profile-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}