/* ========================================
   ХЕДЕР - СОВРЕМЕННЫЙ ДИЗАЙН
   ======================================== */

.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 1000;
    padding: 0 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

.logo-icon i {
    font-size: 20px;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.logo-text span {
    color: #f97316;
}

/* Навигация */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 40px;
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-link i {
    font-size: 16px;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #f97316;
}

.nav-link.active {
    background: #fff7ed;
    color: #f97316;
}

/* Баланс */
.nav-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fef3c7 0%, #ffedd5 100%);
    padding: 6px 14px;
    border-radius: 40px;
    color: #f97316;
    font-weight: 700;
    font-size: 14px;
}

.nav-balance i {
    font-size: 16px;
}

/* Профиль */
.nav-profile {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: #f8fafc;
    border-radius: 40px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.profile-trigger:hover {
    background: #f1f5f9;
    border-color: #f97316;
}

.profile-avatar {
    width: 32px;
    height: 32px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.profile-trigger i {
    font-size: 12px;
    color: #94a3b8;
}

/* Выпадающее меню */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
}

.nav-profile:hover .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
}

.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.dropdown-name {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.dropdown-email {
    font-size: 12px;
    color: #94a3b8;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #f97316;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
}

.dropdown-item .badge {
    margin-left: auto;
    background: #f97316;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Кнопка загрузки модели */
.btn-primary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.btn-primary-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(249, 115, 22, 0.3);
}

/* Мобильная версия */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #1e293b;
}

@media (max-width: 992px) {
    .nav-link span,
    .btn-primary-header span,
    .profile-name {
        display: none;
    }

    .nav-link i {
        font-size: 20px;
    }

    .btn-primary-header i {
        font-size: 18px;
        margin: 0;
    }

    .btn-primary-header {
        padding: 8px 12px;
    }

    .profile-name {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    }

    .nav.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-balance {
        width: fit-content;
    }

    .nav-profile {
        width: 100%;
    }

    .profile-trigger {
        width: fit-content;
    }

    .btn-primary-header {
        width: fit-content;
    }
}

/* ========================================
   КНОПКИ ВХОДА И РЕГИСТРАЦИИ В ШАПКЕ
   ======================================== */

/* Стили для кнопок входа и регистрации */
.auth-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.auth-nav-link i {
    font-size: 18px;
}

.auth-nav-link:hover {
    background: #f1f5f9;
    color: #f97316;
}

.auth-nav-link.active {
    background: #fff7ed;
    color: #f97316;
}

/* Кнопка "Вход" */
.btn-login {
    color: #475569;
}

.btn-login:hover {
    background: #f1f5f9;
    color: #f97316;
}

/* Кнопка "Регистрация" */
.btn-register-header {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.btn-register-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(249, 115, 22, 0.3);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

/* Мобильная версия */
@media (max-width: 992px) {
    .auth-nav-link span,
    .btn-register-header span {
        display: none;
    }

    .auth-nav-link i,
    .btn-register-header i {
        font-size: 20px;
        margin: 0;
    }

    .btn-register-header {
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .auth-nav-link,
    .btn-register-header {
        width: fit-content;
        justify-content: flex-start;
    }

    .auth-nav-link span,
    .btn-register-header span {
        display: inline;
    }
}
