
    /* Header Section */
    .profile-header {
        position: relative;
        background: linear-gradient(to bottom, rgba(0,0,0,0.3), var(--bg-body)), url('<?= $bgImage ?>');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        padding-top: 40px;
        padding-bottom: 30px;
        margin-bottom: 40px;
        border-bottom: 2px solid var(--border);
    }

    .profile-container {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 20px;
        position: relative;
        z-index: 2;
    }

    /* כרטיס המידע הראשי */
    .profile-card {
        display: flex;
        align-items: flex-end;
        gap: 30px;
    }

    .avatar-container {
        width: 160px;
        height: 160px;
        flex-shrink: 0;
        border-radius: 50%;
        border: 5px solid var(--bg-body);
        background: #000;
        overflow: hidden;
        box-shadow: 0 0 20px rgba(0,0,0,0.2), 0 0 0 2px var(--profile-accent);
        position: relative;
    }

    .avatar-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .user-details {
        flex-grow: 1;
        padding-bottom: 10px;
    }

    .username {
        font-size: 2.8rem;
        font-weight: 800;
        color: #fff;
        margin: 0;
        line-height: 1.1;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    }

    .user-badges-row {
        display: flex;
        gap: 10px;
        margin-top: 10px;
        align-items: center;
        flex-wrap: wrap; /* כדי שלא ישבור שורה בצורה מכוערת */
    }

    .role-badge {
        background: var(--profile-accent);
        color: #000;
        font-weight: bold;
        padding: 4px 12px;
        border-radius: 4px;
        font-size: 0.9rem;
        text-transform: uppercase;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    }

    .btn-message {
        background: rgba(255,255,255,0.1);
        color: #fff;
        text-decoration: none;
        padding: 4px 12px;
        border-radius: 4px;
        font-size: 0.9rem;
        border: 1px solid rgba(255,255,255,0.2);
        transition: 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .btn-message:hover {
        background: var(--profile-accent);
        color: #000;
        border-color: var(--profile-accent);
    }

    .hub-indicator {
        background: rgba(0,0,0,0.6);
        border: 1px solid var(--profile-accent);
        color: #fff;
        padding: 4px 12px;
        border-radius: 4px;
        font-size: 0.85rem;
    }

    /* שורת סטטיסטיקה */
    .stats-bar {
        display: flex;
        gap: 25px;
        margin-top: 20px;
        background: rgba(20, 20, 20, 0.8);
        backdrop-filter: blur(10px);
        padding: 15px 25px;
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.1);
        width: fit-content;
    }

    .stat-item {
        text-align: center;
        min-width: 60px;
    }

    .stat-value {
        font-size: 1.4rem;
        font-weight: 700;
        color: #fff;
        display: block;
    }

    .stat-label {
        font-size: 0.8rem;
        color: #aaa;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Grid Layout for Body */
    .profile-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 30px;
        margin-top: 20px;
        align-items: start;
    }

    .content-card {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 25px;
        margin-bottom: 25px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .card-header {
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--profile-accent);
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Recent Activity Styles */
    .activity-item {
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        transition: 0.2s;
    }
    .activity-item:last-child { border-bottom: none; }
    
    .activity-link {
        color: #e0e0e0;
        text-decoration: none;
        font-weight: 600;
        font-size: 1.05rem;
        display: block;
        margin-bottom: 5px;
        transition: color 0.2s;
    }
    .activity-link:hover { color: var(--profile-accent); }
    .activity-snippet { font-size: 0.9rem; color: #888; line-height: 1.4; }
    .activity-meta { font-size: 0.8rem; color: #666; margin-top: 5px; }

    /* Social & Clan Styles (New) */
    .social-links { display: flex; flex-direction: column; gap: 10px; }
    .social-link {
        display: flex; align-items: center; gap: 10px;
        color: #ccc; text-decoration: none; padding: 8px 12px;
        background: rgba(255,255,255,0.03); border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.05); transition: 0.2s;
        font-size: 0.95rem;
    }
    .social-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
    
    .clan-header {
        display: flex; align-items: center; gap: 15px; margin-bottom: 15px;
    }
    .clan-header img { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; border: 1px solid var(--profile-accent); }
    .clan-title { font-weight: bold; color: #fff; font-size: 1.1rem; }
    .clan-tag { font-size: 0.85rem; color: #aaa; background: rgba(0,0,0,0.5); padding: 2px 6px; border-radius: 4px; }
    
    .clan-members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 10px; }
    .clan-member-avatar {
        width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
        border: 2px solid transparent; transition: 0.2s; cursor: pointer;
    }
    .clan-member-avatar:hover { border-color: var(--profile-accent); transform: scale(1.1); }

    /* Sidebar Styles */
    .badges-grid { display: flex; flex-wrap: wrap; gap: 8px; }
    .user-badge {
        display: inline-flex; align-items: center; gap: 6px;
        background: #252525; border: 1px solid #333; padding: 6px 10px;
        border-radius: 4px; font-size: 0.85rem; color: #ccc;
    }
    .signature-content { max-height: 150px; overflow-y: auto; font-size: 0.9rem; color: #999; font-style: italic; }
    
    .profile-actions {
        position: absolute;
        top: 20px; right: 20px;
        display: flex; gap: 10px;
    }

    /* --- Mobile Responsive Fixes --- */
    @media (max-width: 900px) {
        .profile-container { padding: 0 15px; }
        
        .profile-header {
            padding-top: 60px; /* מקום לכפתורי עריכה אם יש */
            text-align: center;
        }

        .profile-card {
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }

        .avatar-container {
            width: 120px; height: 120px; /* הקטנה במובייל */
            margin: 0 auto;
        }

        .user-details {
            width: 100%;
            padding-bottom: 0;
        }

        .username { font-size: 2rem; }

        .user-badges-row {
            justify-content: center;
            margin-bottom: 15px;
        }

        /* עיצוב הסטטיסטיקה למובייל */
        .stats-bar {
            width: 100%;
            margin: 15px 0 0 0;
            display: grid;
            grid-template-columns: repeat(3, 1fr); /* 3 עמודות שוות */
            gap: 10px;
            box-sizing: border-box;
            padding: 15px 10px;
        }
        
        .stat-item {
            min-width: auto;
            border-right: none !important; /* ביטול הקו המפריד במובייל למראה נקי */
        }

        /* שינוי הגריד הראשי לטור אחד */
        .profile-grid {
            grid-template-columns: 1fr;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        /* סדר הצגה: קודם תוכן (ביו/פעילות) ואז סרגל צד */
        .right-col { order: 1; }
        .left-col { order: 2; }

        /* כפתורי פעולה (עריכה/התנתקות) */
        .profile-actions {
            position: absolute;
            top: 10px; right: 10px;
            flex-direction: row;
        }
    }