/* ============================================
   ПРОФИЛЬ И НИЖНЯЯ ПАНЕЛЬ
   ============================================ */

/* Нижняя панель профиля */
.profile-footer {
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    width: 100%;
}
.profile-footer:hover { background: rgba(255, 255, 255, 0.08); }
.profile-footer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.profile-footer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}
.profile-footer-details { flex: 1; min-width: 0; }
.profile-footer-name {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-footer-username {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-footer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.profile-footer-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.profile-footer-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: scale(1.05);
}

/* Единое модальное окно для профиля и групп */
.profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 26, 0.18);
    backdrop-filter: blur(14px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.profile-modal-card {
    width: 100%;
    max-width: 440px;
    margin: 20px;
    padding: 0;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.profile-modal-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(135deg, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-modal-close {
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    flex-shrink: 0;
}
.profile-modal-close:hover { background: rgba(255,255,255,0.15); color: white; }

.profile-modal-body {
    padding: 20px 24px 24px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.profile-avatar-center {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.profile-avatar-big {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    color: white;
}
.profile-avatar-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.profile-avatar-big svg {
    width: 40px;
    height: 40px;
    stroke: white;
}

.profile-label {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
    margin-top: 14px;
}
.profile-label:first-of-type { margin-top: 0; }

.profile-view-item {
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    margin-bottom: 10px;
}
.profile-view-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.profile-view-value {
    font-size: 15px;
    color: var(--text-main);
    word-break: break-word;
}
.profile-bio-view {
    line-height: 1.45;
    white-space: pre-wrap;
}
/* Единое размытие для всех модальных окон */
.profile-modal-overlay,
.custom-modal,
#group-profile-modal,
#create-group-modal,
#add-members-modal,
#edit-group-modal {
    background: rgba(3, 8, 26, 0.18);
    backdrop-filter: blur(14px);
}

.profile-modal-card,
.custom-modal-container,
#group-profile-modal .profile-modal-card,
#create-group-modal .custom-modal-container,
#add-members-modal .custom-modal-container,
#edit-group-modal .custom-modal-container {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
}
/* Убеждаемся что профиль имеет такое же размытие */
.profile-modal-overlay {
    background: rgba(3, 8, 26, 0.18);
    backdrop-filter: blur(14px);
}

.profile-modal-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
}
