/* --- START: CSS جديد لتصميم شاشة الملف الشخصي المميزة --- */
.profile-page-header {
    position: relative;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 30px;
    color: white;
    text-align: center;
}

.profile-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    opacity: 0.9;
    z-index: 1;
}

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

.profile-page-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    background-color: var(--light-gray);
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    position: relative; 
    z-index: 5;
    margin-top: -30px;
    margin-bottom: 10px;
}

.profile-page-name {
    font-size: 1.6rem;
    font-weight: 700;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.profile-page-status {
    font-size: 0.9rem;
    z-index: 2;
    background-color: rgba(0,0,0,0.2);
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 5px;
}

.profile-page-content {
    padding: 15px;
    background-color: var(--light-gray);
}

.profile-actions-bar {
    display: flex;
    justify-content: space-around;
    background-color: var(--white);
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--dark-gray);
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
    border: none;
    background: none;
    width: 80px;
}

.action-button:hover:not(:disabled) {
    background-color: var(--light-gray);
}

.action-button i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.action-button:disabled {
    color: var(--gray);
    cursor: not-allowed;
}
.action-button:disabled i {
    color: var(--gray);
}

.profile-tabs {
    display: flex;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    overflow: hidden;
}

.profile-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.profile-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}
/* --- END: CSS جديد --- */

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-email {
    color: var(--gray);
    margin-bottom: 15px;
}

.profile-main-info {
    width: 100%;
    margin-bottom: 30px;
}

.profile-actions {
    width: 100%;
}

.edit-profile-container {
    padding: 20px;
}

.avatar-upload {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #f5f5f5;
    background-size: cover;
    background-position: center;
}

.profile-info-item {
    margin-bottom: 15px;
}

.profile-info-label {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.profile-stats-bar {
    display: flex;
    justify-content: space-around;
    text-align: center;
    background-color: var(--white);
    padding: 10px 0;
    margin-top: -20px; /* <-- هذا هو التعديل الأهم، غيّرناه من -35px */
    position: relative;
    z-index: 3;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.profile-stat-item {
    cursor: pointer;
}
.stat-count {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
}
#profileActionFollow.following i {
    color: var(--accent-color);
}