body {
    background-color: var(--ff-white);
    color: var(--ff-black);
}

.profile-header {
    width: 100%;
    height: 350px;
    background-color: var(--ff-gray-6);
    position: relative;
    z-index: 1;
    box-shadow: 0 85px 0 0 var(--ff-white);
}

.profile-header .profile-banner {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.profile-header .profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.profile-identity {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    position: relative;
    z-index: 11;
    max-width: 1400px;
    margin: -85px auto 0 auto;
    padding: 0 5% 20px 5%;
    box-sizing: border-box;
}

.profile-avatar {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: 4px solid var(--ff-white);
    background-color: var(--ff-gray-1);
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h1 {
    font-family: var(--ff-font-display);
    font-size: 2.8em;
    margin: 0 0 0 5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ff-black);
    font-weight: bold;
    word-spacing: normal;
}

.user-info p {
    margin: -10px 0 0 5px;
    font-family: var(--ff-font-body);
    font-size: 0.9em;
    color: var(--ff-gray-5);
    letter-spacing: 0.5px;
}

.profile-nav-container {
    background-color: var(--ff-white);
    border-bottom: 1px solid var(--ff-gray-2);
    position: sticky;
    top: 60px;  
    z-index: 10;
    box-shadow: 0 2px 4px var(--ff-black-a10);
}

.profile-nav-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--ff-black);
    width: 0;
    z-index: 20;
}

.profile-nav-progress.loading {
    animation: nav-progress 1.2s ease-in-out infinite;
}

@keyframes nav-progress {
    0% { width: 0; left: 0; }
    50% { width: 60%; left: 20%; }
    100% { width: 0; left: 100%; }
}

.profile-nav-progress.done {
    width: 100%;
    left: 0;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.3s ease 0.2s;
}

.profile-nav-tabs {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    list-style: none;
    overflow-x: auto;
}

.profile-nav-tabs li {
    flex-shrink: 0;
}

.profile-nav-tabs a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--ff-gray-5);
    font-weight: 500;
    font-size: 0.95em;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-nav-tabs a:hover {
    color: var(--ff-black);
}

.profile-nav-tabs li.active a {
    color: var(--ff-black);
    font-weight: bold;
    border-bottom-color: var(--ff-black);
}

.profile-content-area {
    background-color: var(--ff-gray-1);
    padding: 40px 0;
    box-sizing: border-box;
}

#profile-tab-content {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 500px;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    padding: 0 5%;
}

.profile-content-area:has(.settings-container) {
    padding: 0 !important;
}

#profile-tab-content:has(.settings-container) {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#profile-tab-content.loading {
    opacity: 0;
    transform: translateY(15px);
}

.profile-content-area .tab-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.profile-content-area .tab-section-header h2 {
    font-family: var(--ff-font-display);
    font-size: 1.5em;
    margin: 0;
    text-transform: uppercase;
    color: var(--ff-black);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .profile-header {
        height: 200px;
        box-shadow: 0 120px 0 0 var(--ff-white); 
    }

    .profile-identity {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -100px; 
        gap: 10px;
        padding-bottom: 20px;
    }

    .profile-avatar {
        width: 140px;
        height: 140px;
    }

    .user-info h1 {
        font-size: 2.2em;
        margin-left: 0;
    }
    
    .user-info p {
        margin-left: 0;
    }

    .profile-nav-container {
        top: 50px;
    }
    .profile-nav-tabs a {
        padding: 12px 15px;
        font-size: 0.9em;
    }
    .profile-content-area {
        padding: 20px 0;
    }
    #profile-tab-content {
        padding: 0 20px;
    }
   
     #profile-tab-content:has(.settings-container) {
        padding: 0 !important;
    }

    .tab-section-header h2 {
        font-size: 1.3em;
        padding: 0;
    }
}

.public-profile-avatar {
    position: relative;
    overflow: visible;
}

.public-profile-avatar img {
    border-radius: 50%;
}

.profile-online-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ff-gray-4);
    border: 4px solid var(--ff-white);
}

.profile-online-indicator.online {
    background: var(--ff-success);
}

.user-online-status {
    font-size: inherit;
    font-family: var(--ff-font-body);
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    vertical-align: middle;
}

.user-online-status::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--ff-gray-4);
}

.user-online-status.status-online {
    color: var(--ff-success);
    font-weight: 600;
}

.user-online-status.status-offline {
    color: var(--ff-gray-4);
}

.public-profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    position: relative;
    overflow: visible;
}

.public-profile-actions .btn {
    font-size: 1em;
}

.public-more-btn {
    width: 42px;
    height: 42px;
    padding: 0 !important;
}

.public-profile-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--ff-black);
    border: 1px solid var(--ff-white-a20);
    border-radius: 8px;
    box-shadow: 0 8px 24px var(--ff-black-a50);
    z-index: 9000;
    min-width: 170px;
    overflow: hidden;
}

.public-profile-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--ff-gray-2);
    font-family: var(--ff-font-body);
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.public-profile-dropdown button:hover {
    background: var(--ff-white-a10);
}

.public-profile-dropdown button[data-action="report"],
.public-profile-dropdown button[data-action="block"] {
    color: var(--ff-danger);
}

.profile-private-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--ff-gray-5);
}

.profile-private-notice i {
    font-size: 3em;
    margin-bottom: 16px;
    color: var(--ff-gray-3);
}

.profile-private-notice p {
    font-family: var(--ff-font-body);
    font-size: 1.1em;
    margin: 0;
}

.about-section {
    max-width: 600px;
}

.about-row {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--ff-gray-2);
}

.about-row:last-child {
    border-bottom: none;
}

.about-label {
    flex: 0 0 200px;
    font-size: 0.9em;
    color: var(--ff-gray-5);
    font-family: var(--ff-font-body);
    font-weight: 500;
}

.about-label i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    color: var(--ff-gray-4);
}

.about-value {
    flex: 1;
    font-size: 0.95em;
    color: var(--ff-black);
    font-family: var(--ff-font-body);
}

@media (max-width: 768px) {
    .public-profile-actions {
        margin-left: 0;
        margin-top: 10px;
        justify-content: center;
    }
}


.profile-banner-editable,
.profile-avatar-editable {
    cursor: pointer;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}
.profile-edit-overlay {
    position: absolute;
    inset: 0;
    background: var(--ff-black-a50);
    color: var(--ff-white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95em;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.18s;
    border-radius: inherit;
    pointer-events: none;   
}
.profile-edit-overlay i { font-size: 1.4em; }
.profile-banner-editable:hover .profile-edit-overlay,
.profile-banner-editable:focus-visible .profile-edit-overlay,
.profile-avatar-editable:hover .profile-edit-overlay,
.profile-avatar-editable:focus-visible .profile-edit-overlay {
    opacity: 1;
}
.profile-edit-overlay-avatar span { display: none; }
.profile-banner-editable:focus-visible,
.profile-avatar-editable:focus-visible {
    outline: 2px solid var(--ff-white);
    outline-offset: 2px;
}

.profile-private-section { padding: 8px 0; }
.profile-private-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 64px 24px;
    color: var(--ff-gray-4);
}
.profile-private-notice i {
    font-size: 2em;
    color: var(--ff-gray-3);
}
.profile-private-notice p {
    margin: 0;
    font-size: 0.98em;
}
