/* CSS стили для верхней навигации  */
/* Общие стили для обеих навигаций */
.desktop-navbar {
    z-index: 1050;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.desktop-navbar.scrolled {
    background: rgba(10, 10, 10, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Горизонтальные элементы навигации */
.nav-item-horizontal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: #e9ecef;
    background: transparent;
}

.nav-item-horizontal:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateY(-1px);
}

.nav-item-horizontal.active {
    background: rgba(0, 217, 255, 0.12);
    color: #00d9ff;
    box-shadow: 0 2px 10px rgba(0, 217, 255, 0.15);
}

.nav-icon {
    font-size: 1.3rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item-horizontal:hover .nav-icon {
    transform: scale(1.1);
}

.nav-item-horizontal.active .nav-icon {
    color: #00d9ff;
}

.nav-text {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff0080 0%, #cc0066 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 18px;
    text-align: center;
    z-index: 1;
}

.nav-badge.pulse {
    animation: pulse 2s infinite;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.25rem;
}

/* Компактная кнопка создания */
.btn-create-compact {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00d9ff 0%, #0099cc 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-create-compact:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

/* Компактные уведомления */
.btn-notification-compact {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: #adb5bd;
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 0;
    position: relative;
}

.btn-notification-compact:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.notification-badge-compact {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ff0080 0%, #cc0066 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Компактный профиль */
.btn-profile-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: white;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 36px;
}

.btn-profile-compact:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.profile-avatar-compact {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #00d9ff 0%, #0099cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-compact {
    display: flex;
    flex-direction: column;
    max-width: 120px;
    overflow: hidden;
}

.profile-name-compact {
    font-weight: 500;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-level-compact {
    font-size: 0.65rem;
    color: #00ff88;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-chevron-compact {
    font-size: 0.7rem;
    color: #6c757d;
    flex-shrink: 0;
}

/* Общие стили дропдаунов */
.create-dropdown,
.notification-dropdown,
.profile-dropdown {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.notification-dropdown {
    width: 320px;
}

.profile-dropdown {
    min-width: 240px;
}

.dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
}

.notification-icon-small {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.notification-time {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 2px;
}

.profile-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00d9ff 0%, #0099cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

/* Анимации */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.logo-pulse {
    animation: pulse 2s infinite;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .nav-text {
        font-size: 0.8rem;
    }
    
    .nav-item-horizontal {
        padding: 0.4rem 0.6rem;
        gap: 0.4rem;
    }
    
    .profile-name-compact {
        display: none;
    }
    
    .profile-level-compact {
        display: none;
    }
    
    .btn-profile-compact {
        padding: 0.25rem;
    }
}

/* Стилизация скроллбара */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.3);
    border-radius: 3px;
}

/* Активное состояние для логотипа */
.navbar-brand.active {
    position: relative;
}

.navbar-brand.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00d9ff;
    border-radius: 2px;
}

/*CSS стили для мобильной навигации*/

.mobile-navbar {
    z-index: 1050;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* Основные элементы навигации */
.nav-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 56px;
    padding: 0.4rem 0.25rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item-mobile:hover,
.nav-item-mobile.active {
    background: rgba(255, 255, 255, 0.05);
}

.nav-icon-mobile {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item-mobile:hover .nav-icon-mobile {
    color: white;
    transform: translateY(-2px);
}

.nav-item-mobile.active .nav-icon-mobile {
    color: #00d9ff;
}

.nav-label-mobile {
    font-size: 0.65rem;
    font-weight: 500;
    color: #adb5bd;
    margin-top: 0.25rem;
    transition: all 0.2s ease;
}

.nav-item-mobile:hover .nav-label-mobile,
.nav-item-mobile.active .nav-label-mobile {
    color: white;
}

/* Главная кнопка тренировок */
.nav-main-wrapper, .nav-main-wrapper-mobile {
    position: relative;
}

.nav-main-wrapper-mobile {
    margin-top: -20px;
}

.nav-main-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 70px;
    padding: 0.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #00d9ff 0%, #0099cc 100%);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-main-mobile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.nav-main-mobile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.4);
}

.nav-main-mobile:active {
    transform: translateY(-2px);
}

.nav-main-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    position: relative;
    z-index: 2;
}

.live-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ff0080;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
    z-index: 3;
    box-shadow: 0 0 0 rgba(255, 0, 128, 0.4);
}

.nav-main-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    margin-top: 0.25rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Бейджи */
.nav-badge-mobile {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff0080 0%, #cc0066 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(10, 10, 10, 0.95);
    animation: pulse 2s infinite;
}

/* Индикатор активного состояния */
.nav-item-mobile.active::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #00d9ff;
    border-radius: 50%;
}

.nav-main-mobile.active {
    background: linear-gradient(135deg, #00b8e6 0%, #0088b3 100%);
}

/* Анимации */
@keyframes pulse-live {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 128, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 0, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 128, 0);
    }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Микроинтеракции при нажатии */
.nav-item-mobile:active .nav-icon-mobile {
    transform: scale(0.95);
}

.nav-main-mobile:active .nav-main-icon {
    transform: scale(0.95);
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 380px) {
    .nav-item-mobile {
        width: 52px;
        padding: 0.35rem 0.2rem;
    }
    
    .nav-main-mobile {
        width: 64px;
        padding: 0.4rem;
    }
    
    .nav-label-mobile {
        font-size: 0.6rem;
    }
}

/* Защита от области "безопасности" iPhone */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-navbar {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
}

/* Эффект при скролле */
.mobile-navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(25px);
}

/* Подсказки при долгом нажатии (для мобильных) */
.nav-item-mobile,
.nav-main-mobile {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Состояние загрузки */
.nav-item-mobile.loading .nav-icon-mobile {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}