/* css/style_part_4.css */
.profile-stats-container { margin-bottom: 12px !important; gap: 8px !important; }
.profile-stat-box { padding: 10px 4px !important; border-radius: 12px !important; }
.profile-desc-box { padding: 12px 16px !important; border-radius: 12px !important; margin-bottom: 12px !important; font-size: 14px !important; }
.profile-pill-tabs { border-radius: 12px !important; padding: 4px !important; margin-bottom: 12px !important; border: none !important; }
.profile-pill-tab { border-radius: 8px !important; padding: 8px !important; }

div.profile-background-overlay[style*="url"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: var(--locked-vh, 100lvh) !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: scroll !important;
    pointer-events: none !important;
    transition: none !important;
}
div.profile-background-overlay[style*="url"]::after { background: transparent !important; }

.profile-stat-box, .profile-desc-box, .profile-pill-tabs, .web-stats-container { background-color: rgba(36, 36, 36, 0.65) !important; }
html[data-theme="light"] .profile-stat-box, html[data-theme="light"] .profile-desc-box, html[data-theme="light"] .profile-pill-tabs, html[data-theme="light"] .web-stats-container { background-color: rgba(255, 255, 255, 0.65) !important; }
.profile-name-large { margin-bottom: 2px !important; }
.profile-desc-box { margin-bottom: 4px !important; }
.profile-edit-fab { right: 0px !important; }

html[data-theme="light"] .profile-stat-box, html[data-theme="light"] .profile-desc-box, html[data-theme="light"] .profile-pill-tabs, html[data-theme="light"] .web-stats-container, html[data-theme="light"] .profile-stat-box *, html[data-theme="light"] .profile-desc-box *, html[data-theme="light"] .profile-pill-tabs *, html[data-theme="light"] .web-stats-container * { color: #0f0f0f !important; }
html[data-theme="light"] .profile-name-large { color: #0f0f0f !important; text-shadow: none !important; }
html[data-theme="light"] .profile-pill-tab.active { color: var(--brand-color) !important; }
html[data-theme="light"] .punish-type-tab.active { color: var(--brand-color) !important; border-bottom-color: var(--brand-color) !important; }
html[data-theme="light"] .punish-type-tab.active[data-val="ban"] { color: #ff5252 !important; border-bottom-color: #ff5252 !important; }
html[data-theme="light"] .profile-edit-fab:not(.mod-delete-user-btn) .material-symbols-outlined { color: var(--text-primary) !important; }
html[data-theme="light"] .mod-delete-user-btn .material-symbols-outlined { color: white !important; }
html[data-theme="light"] #modalDeleteAccount .modal-text { color: var(--text-secondary) !important; }
html[data-theme="light"] .edit-photo-btn { background-color: var(--bg-color) !important; border: 1px solid var(--border-color) !important; color: var(--brand-color) !important; }
html[data-theme="light"] .edit-field textarea { background-color: rgba(255, 255, 255, 0.65) !important; color: #0f0f0f !important; }

.yt-facade { width: 100%; max-width: 500px; aspect-ratio: 16 / 9; border-radius: 12px; margin: 12px 0; background-color: #000; background-size: cover; background-position: center; cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.yt-play-btn { width: 56px; height: 56px; background: rgba(0, 0, 0, 0.7); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.yt-play-btn::before { content: ''; display: block; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; margin-left: 6px; }
.yt-facade:hover .yt-play-btn { background: #ff0000; }

.profile-content { animation: slideDown 0.3s ease !important; }
.save-profile-btn { background: linear-gradient(90deg, #FF6B4A, #E91E63) !important; }
@keyframes slideUpAnim { from { opacity: 0; top: 15px; } to { opacity: 1; top: 0px; } }
.main-content.edit-content { animation: slideUpAnim 0.3s ease !important; }
.edit-field textarea { -webkit-backface-visibility: hidden; backface-visibility: hidden; }

.user-list-card { padding: 6px 16px !important; border-radius: 18px !important; min-height: 52px !important; border: none !important; }
.user-list-card .profile-avatar { width: 40px !important; height: 40px !important; min-width: 40px !important; min-height: 40px !important; margin-right: 12px !important; font-size: 18px !important; }
.user-list-name { font-size: 16px !important; font-weight: 800 !important; letter-spacing: -0.3px !important; }

.profile-skeleton { display: flex; flex-direction: column; align-items: center; width: 100%; animation: fadeIn 0.2s ease; margin-top: 10px; }
.skeleton-el { background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%); background-size: 400% 100%; animation: skeletonShimmer 1.5s infinite linear; border-radius: 12px; }
html[data-theme="light"] .skeleton-el { background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%); }
@keyframes skeletonShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.skeleton-avatar { width: 100px; height: 100px; border-radius: 50%; margin-bottom: 12px; }
.skeleton-name { width: 180px; height: 26px; margin-bottom: 24px; border-radius: 13px; }
.skeleton-stats { display: flex; gap: 8px; width: 100%; margin-bottom: 12px; }
.skeleton-stats .skeleton-box { flex: 1; height: 74px; }
.skeleton-desc { width: 100%; height: 80px; margin-bottom: 12px; }
.skeleton-tabs { display: flex; width: 100%; gap: 8px; margin-bottom: 24px; padding: 4px; background: rgba(36,36,36,0.65); border-radius: 24px; }
html[data-theme="light"] .skeleton-tabs { background: rgba(255,255,255,0.65); }
.skeleton-tabs .skeleton-tab { flex: 1; height: 38px; border-radius: 20px; }

.profile-edit-fab.hidden { display: none !important; }
.profile-action-btn { height: 40px !important; padding: 0 16px !important; font-size: 14px !important; display: flex; align-items: center !important; justify-content: center !important; border-radius: 12px !important; font-weight: bold !important; border: none !important; color: white; }
.profile-action-btn.hidden { display: none !important; }
#btnFollow { color: white !important; }
#btnNotifyPosts { width: 44px !important; height: 40px !important; padding: 0 !important; background-color: var(--sidebar-bg) !important; border: 1px solid var(--border-color) !important; }
#btnNotifyPosts.hidden { display: none !important; }
.hidden-hard { display: none !important; }

.profile-tab { font-weight: bold !important; color: var(--text-secondary) !important; border-bottom: 2px solid transparent !important; }
.profile-tab.active { color: var(--brand-color) !important; border-bottom-color: var(--brand-color) !important; }
.tab-badge { background-color: var(--border-color) !important; color: var(--text-secondary) !important; border-radius: 12px; padding: 2px 6px; font-size: 11px; margin-left: 6px; font-weight: bold; }
.profile-tab.active .tab-badge { background-color: var(--brand-color) !important; color: white !important; }
.notification-card { padding: 10px 14px !important; margin-bottom: 6px !important; border-radius: 16px !important; gap: 12px !important; align-items: center !important; min-height: auto !important; }
.notif-left-icon { padding-top: 0 !important; }
.notif-left-icon .material-symbols-outlined { font-size: 24px !important; }
.notif-content { gap: 6px !important; }
.notif-user-box { padding: 6px 12px !important; border-radius: 12px !important; gap: 10px !important; }
.notif-user-box .profile-avatar { width: 28px !important; height: 28px !important; min-width: 28px !important; min-height: 28px !important; font-size: 14px !important; margin-right: 0 !important; }
.notif-user-box .user-list-name { font-size: 14px !important; font-weight: 700 !important; }
.notif-go-btn { font-size: 10px !important; }
.notif-message { font-size: 13px !important; }
.notif-date { font-size: 11px !important; }

@media (min-width: 900px) {
    .desktop-header { position: relative !important; z-index: 10 !important; }
    #realProfileData, #profileSkeleton, #profileTopContainer, #profileFeedContainer, .edit-profile-box {
        max-width: 600px !important;
        width: 100% !important;
        margin: 0 auto !important;
        position: relative !important;
        z-index: 2 !important;
    }
    .profile-bg-container {
        position: relative !important;
        background-color: var(--bg-color) !important;
    }
    #view-profile .profile-background-overlay,
    #view-edit-profile .profile-background-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 0 !important;
        background-size: cover !important;
        background-position: center !important;
        background-attachment: fixed !important;
        mask-image: none !important;
        -webkit-mask-image: none !important;
    }
    #view-profile .profile-background-overlay::after,
    #view-edit-profile .profile-background-overlay::after {
        display: none !important;
    }
    .profile-stat-box, .profile-desc-box, .profile-pill-tabs, .web-stats-container {
        background-color: rgba(36, 36, 36, 0.75) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    html[data-theme="light"] .profile-stat-box, 
    html[data-theme="light"] .profile-desc-box, 
    html[data-theme="light"] .profile-pill-tabs, 
    html[data-theme="light"] .web-stats-container {
        background-color: rgba(255, 255, 255, 0.75) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
    }
    .profile-name-large {
        color: #fff !important;
        text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
    }
    .stat-value, .profile-desc-box {
        color: #fff !important;
    }
    html[data-theme="light"] .profile-name-large,
    html[data-theme="light"] .stat-value,
    html[data-theme="light"] .profile-desc-box {
        color: #000 !important;
        text-shadow: none !important;
    }
    .main-content {
        overflow-y: scroll !important;
    }
    #view-connections .connections-wrapper { max-width: 900px !important; }
    #view-connections .conn-tabs {
        max-width: 900px !important;
        margin: 0 auto !important;
        border-bottom: 1px solid var(--border-color) !important;
    }
    #view-connections .user-list-container {
        max-width: 450px !important;
        width: 450px !important;
        padding-left: 0 !important; 
        padding-right: 0 !important;
        margin: 0 !important;
        align-self: center !important;
        transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    #view-connections .connections-wrapper:has(#tabConnFollowers.active) .user-list-container {
        transform: translateX(-225px);
    }
    #view-connections .connections-wrapper:has(#tabConnFollowing.active) .user-list-container {
        transform: translateX(225px);
    }
    #view-connections .user-list-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 250px;
    }
}