/* --- ШАПКА: ГЕОМЕТРИЧЕСКАЯ ТОЧНОСТЬ --- */
header {
    width: 100%;
    padding: 0 5%;
    height: 160px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.5px;
}

/* Центральный логотип с абсолютным позиционированием */
.logo-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    background: var(--bg-color);
    padding: 10px 40px;
}

.logo-center img { 
    height: 110px; 
    width: auto; 
    display: block; 
}

/* Декоративные линии по бокам */
header::before, header::after {
    content: '';
    position: absolute;
    top: 75%;
    height: 1px;
    background: var(--border-color);
    width: calc(50% - 200px);
    z-index: 1;
}
header::before { left: 0; }
header::after { right: 0; }

.nav-links, .header-right {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

.nav-links a, .header-right a {
    text-decoration: none;
    color: var(--text-dark);
    margin: 0 30px;
    transition: 0.3s;
}

.nav-links a:hover, .header-right a:hover {
    color: var(--accent-gold);
}

/* --- ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ --- */
/* Стили для ссылки профиля */
.user-profile-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    color: inherit !important;
    gap: 15px;
    transition: opacity 0.3s;
}

.user-profile-link:hover {
    opacity: 0.8;
}

/* Корректировка для корректного отображения иконки выхода */
.user-profile-header {
    display: flex;
    align-items: center;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    text-transform: none;
    letter-spacing: normal;
    margin-top: -10px; 
}

.user-avatar {
    width: 48px;
    height: 48px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-family: var(--header-font);
}

.user-greeting {
    font-family: var(--header-font);
    font-size: 24px;
    color: var(--text-dark);
    line-height: 1;
}

.balance-line { 
    width: 1px; 
    height: 35px; 
    background: rgba(0,0,0,0.08); 
    margin: 0 10px; 
}

.balance-value { 
    font-size: 22px; 
    font-weight: 400; 
}

.logout-mini {
    text-decoration: none !important;
    color: #ddd !important;
    font-size: 14px !important;
    margin-left: 10px !important;
    transition: 0.3s;
}
.logout-mini:hover { 
    color: var(--accent-gold) !important; 
}

/* --- АДАПТИВ ПОД ШАПКУ (ОРИГИНАЛЬНАЯ ВЕРСИЯ) --- */
@media (max-width: 768px) {
    header::before, header::after { 
        display: none; 
    }
    header { 
        height: auto; 
        flex-direction: column; 
        padding: 40px 0; 
        gap: 20px; 
    }
    .logo-center { 
        position: relative; 
        left: 0; 
        top: 0; 
        transform: none; 
        padding: 0; 
    }
    .user-profile-header { 
        flex-direction: column; 
        text-align: center; 
    }
    .balance-line { 
        display: none; 
    }
    .nav-links a, .header-right a {
        margin: 10px 0;
    }
}