/* ==========================================================================
   Profile Page Redesign - New Facebook-style layout
   ========================================================================== */

/* Main wrapper */
.profile-new-wrapper {
    max-width: 1423px;
    margin: 6px auto 40px auto;
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 50%, #fff8e1 100%);
    border: 2px solid #7e57c2;
    border-radius: 18px;
    padding: 0 20px 30px 20px;
    position: relative;
}

/* Action buttons row (JOIN/LOGIN or SEND MESSAGE/ADD FRIEND) */
.profile-action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 9;
    width: calc(100% - 2px);
}
.profile-action-buttons .btn-profile-action {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: filter 0.15s, transform 0.15s;
}
.profile-action-buttons .btn-profile-action:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}
.profile-action-buttons .btn-profile-join,
.profile-action-buttons .btn-profile-login {
    background: linear-gradient(135deg, #e91e90, #c2185b, #e040a0);
}
.profile-action-buttons .btn-profile-message {
    background: linear-gradient(135deg, #e91e90, #c2185b, #e040a0);
}
.profile-action-buttons .btn-profile-addfriend {
    background: linear-gradient(135deg, #00bcd4, #0097a7, #4dd0e1);
}

/* Cover photo section */
.profile-cover-section {
    position: relative;
    width: 100%;
    margin-bottom: 120px;
    padding-top: 130px;
}
.profile-cover-wrapper {
    position: relative;
    max-width: 1205px;
    height: 322px;
    margin: 0 auto;
    border-radius: 40px;
    overflow: hidden;
    border: 3px solid rgba(126, 87, 194, 0.3);
    background: linear-gradient(135deg, #5c6bc0 0%, #7e57c2 50%, #ab47bc 100%);
}
.profile-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-cover-default {
    background: linear-gradient(135deg, #5c6bc0 0%, #7e57c2 30%, #ab47bc 60%, #e1bee7 100%);
}
.profile-cover-edit-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    z-index: 5;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}
.profile-cover-edit-btn:hover {
    background: #fff;
}
.profile-cover-edit-btn i {
    font-size: 14px;
}
.cover-edit-menu {
    display: none;
    position: absolute;
    top: 47px;
    left: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 20;
    min-width: 200px;
    overflow: hidden;
}
.cover-edit-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cover-edit-menu-item:hover {
    background: #f5f5f5;
}

/* Avatar section */
.profile-avatar-section {
    position: absolute;
    bottom: -112px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 225px;
    height: 225px;
}
.profile-avatar-wrapper {
    position: relative;
    width: 225px;
    height: 225px;
}
.profile-avatar-img {
    width: 225px;
    height: 225px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    background: #e0e0e0;
}
.profile-avatar-edit-btn {
    position: absolute;
    bottom: 27px;
    right: 2px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid #ddd;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    z-index: 11;
    transition: background 0.2s;
}
.profile-avatar-edit-btn:hover {
    background: #fff;
}
.profile-avatar-edit-btn i {
    font-size: 16px;
    color: #555;
}

/* Hidden file inputs */
.profile-cover-upload-input,
.profile-avatar-upload-input {
    display: none;
}

/* Navigation tabs */
.profile-nav-tabs {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 30px;
    margin: -164px 0 16px 0;
    flex-wrap: nowrap;
    max-width: 1205px;
    margin-left: auto;
    margin-right: auto;
}
.profile-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 215px;
    height: 270px;
    background: #dde6ec;
    border-radius: 35px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    user-select: none;
}
.profile-nav-tab:hover {
    background: #dde6ec;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 0 20px 6px #14a4da;
}
.profile-nav-tab.active {
    background: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 20px 6px #4c14da;
}
.profile-nav-tab.active .profile-nav-tab-icon svg {
    fill: #333;
}
.profile-nav-tab.active .profile-nav-tab-label {
    color: #333;
}
.profile-nav-tab-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-nav-tab-icon svg {
    width: 70px;
    height: 70px;
    fill: #555;
}
.profile-nav-tab-label {
    font-size: 22px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ABOUT ME tab extends up behind the avatar */
#ptab-aboutme {
    width: 225px;
    height: 382px;
    padding-top: 75px;
    z-index: 5;
    position: relative;
}

/* Stats row */
.profile-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 16px;
    border-bottom: 1px solid rgba(126, 87, 194, 0.15);
    margin: 0 auto 16px auto;
    max-width: 1205px;
}

.profile-badges-inline {
    display: flex;
    align-items: center;
    gap: 4px;
}
.profile-badges-inline img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.profile-badge-rank-wrapper {
    position: relative;
    display: inline-block;
}
.profile-badge-rank-img {
    width: 38px !important;
    height: 38px !important;
}
.profile-badge-rank-number {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 800;
    color: #1a8a5c;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}
.profile-stat-number {
    font-size: 16px;
    font-weight: 800;
    color: #333;
    line-height: 1.2;
}
.profile-stat-label {
    font-size: 10px;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-country {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}
.profile-country img {
    width: 28px;
    height: auto;
    margin-bottom: 2px;
}
.profile-country-name {
    font-size: 10px;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
}

.profile-social-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 8px;
}
.profile-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: transform 0.15s;
    text-decoration: none;
}
.profile-social-icons a:hover {
    transform: scale(1.1);
}
.profile-social-icons a svg {
    width: 28px;
    height: 28px;
}
.profile-social-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 6px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    transition: background 0.2s;
}
.profile-social-edit:hover {
    background: #e0e0e0;
}
.profile-social-edit i {
    font-size: 14px;
    color: #555;
}

/* Cover reposition mode */
.profile-cover-wrapper.reposition-mode {
    cursor: grab;
}
.profile-cover-wrapper.reposition-mode:active {
    cursor: grabbing;
}
.profile-cover-wrapper.reposition-mode .profile-cover-edit-btn,
.profile-cover-wrapper.reposition-mode .cover-edit-menu {
    display: none !important;
}
.profile-cover-reposition-bar {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 10px 16px;
    z-index: 15;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    border-radius: 0 0 14px 14px;
}
.profile-cover-reposition-bar.active {
    display: flex;
}
.profile-cover-reposition-bar span {
    font-weight: 500;
}
.profile-cover-reposition-bar .reposition-btns {
    display: flex;
    gap: 8px;
}
.profile-cover-reposition-bar .reposition-btns button {
    padding: 5px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.profile-cover-reposition-bar .btn-reposition-cancel {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.profile-cover-reposition-bar .btn-reposition-cancel:hover {
    background: rgba(255,255,255,0.35);
}
.profile-cover-reposition-bar .btn-reposition-save {
    background: #7e57c2;
    color: #fff;
}
.profile-cover-reposition-bar .btn-reposition-save:hover {
    background: #6a3fb5;
}

/* Content area */
.profile-content-area {
    position: relative;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #d5c8e8;
    min-height: 400px;
    padding: 10px;
    margin: 0 auto;
    max-width: 1205px;
}
.profile-content-area #column_main {
    padding: 0;
    position: relative;
    border: none;
    overflow: hidden;
}
.profile-content-area #column_main > div {
    padding: 20px;
}
.profile-content-area #column_main img {
    max-width: 100% !important;
    height: auto !important;
}

/* Bio edit button */
.profile-bio-edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 6px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    transition: background 0.2s;
    z-index: 5;
}
.profile-bio-edit-btn:hover {
    background: #e0e0e0;
}
.profile-bio-edit-btn i {
    font-size: 14px;
    color: #555;
}
.profile-bio-edit-btn.active {
    background: #7e57c2;
    border-color: #7e57c2;
}
.profile-bio-edit-btn.active i {
    color: #fff;
}

/* Bio editor wrapper */
#profile-bio-editor-wrap {
    padding: 10px 20px 20px;
}
.profile-bio-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.profile-bio-editor-save {
    background: #7e57c2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.profile-bio-editor-save:hover {
    background: #6a3fb5;
}
.profile-bio-editor-cancel {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.profile-bio-editor-cancel:hover {
    background: #e0e0e0;
}
#profile-bio-editor-status {
    font-size: 13px;
    color: #4caf50;
    font-weight: 500;
}

/* Blog/Group editor wrapper on profile */
#profile-blog-editor-wrap,
#profile-group-editor-wrap,
#profile-configure-wrap {
    padding: 10px 20px 20px;
}
#profile-configure-wrap {
    background: #fff;
}
#profile-blog-editor-wrap .body_text_title_dark_large,
#profile-group-editor-wrap .body_text_title_dark_large {
    font-size: 16px;
    font-weight: 600;
}

/* Write Blog Post button in toolbar */
.profile-blog-write-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 6px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    transition: background 0.2s;
    flex-shrink: 0;
}
.profile-blog-write-btn:hover {
    background: #e0e0e0;
}
.profile-blog-write-btn i {
    font-size: 14px;
    color: #555;
}

/* ====== Blog list redesign ====== */
.profile-content-area #column_main > .profile-blog-list,
.profile-content-area #column_main > .profile-blog-empty {
    padding: 0;
}
.profile-content-area #column_main > .profile-blog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
}
.profile-blog-sort {
    position: relative;
    flex-shrink: 0;
}
.profile-blog-search {
    flex: 1;
    max-width: 340px;
    min-width: 160px;
}
.profile-blog-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.profile-blog-search-wrap input {
    width: 100%;
    padding: 7px 34px 7px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s;
}
.profile-blog-search-wrap input:focus {
    border-color: #7e57c2;
    background: #fff;
}
.profile-blog-search-icon {
    position: absolute;
    right: 10px;
    color: #999;
    font-size: 13px;
    pointer-events: none;
}
.profile-blog-list {
    padding: 0 !important;
}
.profile-blog-empty {
    padding: 30px 20px;
    color: #888;
    font-size: 14px;
    text-align: center;
}

/* Individual blog post item */
.profile-blog-item {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word;
    transition: background 0.15s;
}
.profile-blog-item:hover {
    background: #faf8fd;
}
.profile-blog-item:last-child {
    border-bottom: none;
}
.profile-blog-item--pending {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(255,200,0,0.06) 10px,
        rgba(255,200,0,0.06) 20px
    );
}
.profile-blog-item-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}
.profile-blog-item-avatar a {
    display: block;
}
.profile-blog-item-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.profile-blog-item-content {
    flex: 1;
    min-width: 0;
}
.profile-blog-item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 2px;
}
.profile-blog-item-title a {
    color: #1a0dab;
    text-decoration: none;
}
.profile-blog-item-title a:hover {
    text-decoration: underline;
}
.profile-blog-item-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 1px;
}
.profile-blog-item-author {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-blog-item-author a {
    color: #555;
    font-weight: 500;
}
.profile-blog-item-excerpt {
    font-size: 13px;
    color: #444;
    line-height: 1.45;
}

/* Friend badges row inside profile-blog-item */
.profile-friend-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.profile-friend-badges img {
    vertical-align: middle;
}

/* Style existing friend button within profile context */
.profile-action-buttons #profile-friend-btn-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
}

/* member_friend_button wrapper - keep as positioned container for dropdown */
.profile-action-buttons #profile-friend-btn-wrapper div[class^="member_friend_button_"] {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset all inner divs - zero out margins/padding, flatten wrappers */
.profile-action-buttons #profile-friend-btn-wrapper div[class^="dropdown_button_"] {
    display: contents !important;
}
.profile-action-buttons #profile-friend-btn-wrapper div[id="blockedmember1"],
.profile-action-buttons #profile-friend-btn-wrapper div[id="blockedmember2"],
.profile-action-buttons #profile-friend-btn-wrapper div[id="unblockmember"],
.profile-action-buttons #profile-friend-btn-wrapper div[class*="member_button_friend_unblock_"],
.profile-action-buttons #profile-friend-btn-wrapper div[class*="member_button_friend_cancel_"],
.profile-action-buttons #profile-friend-btn-wrapper div[class*="member_button_friend_accept_"],
.profile-action-buttons #profile-friend-btn-wrapper div[class*="member_button_friend_decline_"],
.profile-action-buttons #profile-friend-btn-wrapper div[class*="member_button_friend_add_"] {
    margin: 0 !important;
    padding: 0 !important;
}

/* Shared glossy pill style - single class for ALL profile action buttons */
.profile-action-buttons .btn-profile-pill {
    display: inline-block !important;
    padding: 10px 28px !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #00bcd4, #0097a7, #4dd0e1) !important;
    color: #fff !important;
    border: none !important;
    box-sizing: border-box !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    transition: filter 0.15s, transform 0.15s !important;
}
.profile-action-buttons .btn-profile-pill:hover {
    filter: brightness(1.08) !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
    color: #fff !important;
}

/* SEND MESSAGE pink/magenta style */
.profile-action-buttons .btn-profile-message.btn-profile-pill {
    background: linear-gradient(135deg, #e91e90, #c2185b, #e040a0) !important;
}

/* Friends button (already-friends state) - green glossy pill */
.profile-action-buttons .dropdown_check_button.btn-profile-pill {
    background: linear-gradient(135deg, #66bb6a, #43a047, #81c784) !important;
}

/* Friends dropdown - position relative to the button wrapper */
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content_holder {
    position: absolute !important;
    top: 100% !important;
    margin-top: 4px !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    z-index: 200 !important;
}
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content {
    position: relative !important;
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    width: 200px !important;
    list-style: none !important;
}
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content li {
    list-style: none !important;
    margin: 0 !important;
    border: none !important;
}
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content li a {
    display: block !important;
    padding: 8px 16px !important;
    color: #333 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content li:hover {
    background: #f0f0f0 !important;
    border: none !important;
}
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content li:hover a,
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content li a:hover {
    color: #333 !important;
    background: none !important;
}
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content ol {
    padding: 0 !important;
    margin: 0 !important;
}
.profile-action-buttons #profile-friend-btn-wrapper .dropdown_content ol hr {
    border: none !important;
    border-top: 1px solid #e6e6e6 !important;
    margin: 4px 0 !important;
}

/* Content area scroll fix - prevent scroll to top on tab switch */
.profile-content-area #column_main {
    min-height: 200px;
}

/* Override old layout styles when new profile is active */
.profile-new-wrapper .profile_layout,
.profile-new-wrapper .container-fluid {
    padding: 0;
    margin: 0;
}
.profile-new-wrapper #column_left,
.profile-new-wrapper #column_right,
.profile-new-wrapper #column_double {
    display: none !important;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablets */
@media (max-width: 992px) {
    .profile-new-wrapper {
        margin: 6px 4px;
        padding: 12px 12px 20px;
        border-radius: 12px;
    }

    .profile-cover-section {
        padding-top: 57px;
    }

    .profile-nav-tab-label {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .profile-new-wrapper {
        margin: 6px 4px;
        padding: 12px 12px 20px;
        border-radius: 12px;
    }
    .profile-cover-wrapper {
        height: 200px;
        border-radius: 20px;
    }
    .profile-avatar-section {
        width: 110px;
        height: 110px;
        bottom: -55px;
    }
    .profile-avatar-wrapper {
        width: 110px;
        height: 110px;
    }
    .profile-avatar-img {
        width: 110px;
        height: 110px;
    }
    .profile-cover-section {
        margin-bottom: 65px;
    }
    .profile-nav-tabs {
        gap: 8px;
        flex-wrap: wrap;
        margin: -60px auto 16px 0;
    }
    .profile-nav-tab {
        width: 110px;
        height: 115px;
        border-radius: 18px;
    }
    #ptab-aboutme {
        width: 110px;
        height: 145px;
        padding-top: 38px;
    }
    .profile-nav-tab-icon {
        width: 38px;
        height: 38px;
    }
    .profile-nav-tab-icon svg {
        width: 34px;
        height: 34px;
    }
    .profile-nav-tab-label {
        font-size: 16px;
    }
    .profile-stats-row {
        gap: 6px;
    }
    .profile-stat {
        padding: 0 6px;
    }
    .profile-stat-number {
        font-size: 14px;
    }
    .profile-social-icons a {
        width: 28px;
        height: 28px;
    }
    .profile-social-icons a svg {
        width: 24px;
        height: 24px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .profile-new-wrapper {
        margin: 6px 4px;
        padding: 8px 8px 16px;
        border-radius: 10px;
    }
    .profile-cover-wrapper {
        height: 150px;
        border-radius: 8px;
    }
    .profile-avatar-section {
        width: 80px;
        height: 80px;
        bottom: -40px;
    }
    .profile-avatar-wrapper {
        width: 80px;
        height: 80px;
    }
    .profile-avatar-img {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }
    .profile-cover-section {
        margin-bottom: 50px;
    }
    .profile-avatar-edit-btn {
        width: 24px;
        height: 24px;
        bottom: 2px;
    }
    .profile-avatar-edit-btn i {
        font-size: 11px;
    }
    .profile-cover-edit-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
    .profile-nav-tabs {
        gap: 6px;
        flex-wrap: wrap;
        margin: -33px auto 12px auto;
    }
    .profile-nav-tab {
        width: 62px;
        height: 78px;
        border-radius: 12px;
    }
    #ptab-aboutme {
        width: 62px;
        height: 98px;
        padding-top: 26px;
    }
    .profile-nav-tab-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
    }
    .profile-nav-tab-icon svg {
        width: 24px;
        height: 24px;
    }
    .profile-nav-tab-label {
        font-size: 8px;
        letter-spacing: 0;
    }
    .profile-stats-row {
        gap: 4px;
        padding: 6px 0 12px;
    }
    .profile-badges-inline img {
        width: 24px;
        height: 24px;
    }
    .profile-stat {
        padding: 0 4px;
    }
    .profile-stat-number {
        font-size: 12px;
    }
    .profile-stat-label {
        font-size: 8px;
    }
    .profile-social-icons {
        gap: 4px;
    }
    .profile-social-icons a {
        width: 24px;
        height: 24px;
    }
    .profile-social-icons a svg {
        width: 20px;
        height: 20px;
    }
    .profile-action-buttons .btn-profile-pill,
    .profile-action-buttons .btn-profile-action {
        padding: 8px 18px !important;
        font-size: 11px !important;
        border-radius: 20px !important;
        letter-spacing: 0.3px !important;
    }
    .profile-content-area #column_main > div {
        padding: 12px;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .profile-nav-tab {
        width: 55px;
        height: 65px;
        border-radius: 10px;
    }
    #ptab-aboutme {
        width: 55px;
        height: 81px;
        padding-top: 20px;
    }
    .profile-nav-tab-icon {
        width: 24px;
        height: 24px;
    }
    .profile-nav-tab-icon svg {
        width: 20px;
        height: 20px;
    }
    .profile-nav-tab-label {
        font-size: 7px;
    }
    .profile-cover-wrapper {
        height: 120px;
    }
    .profile-avatar-section {
        width: 70px;
        height: 70px;
        bottom: -35px;
    }
    .profile-avatar-wrapper {
        width: 70px;
        height: 70px;
    }
    .profile-avatar-img {
        width: 70px;
        height: 70px;
    }
    .profile-cover-section {
        margin-bottom: 45px;
    }
}

/* ==========================================================================
   Social Networks Edit Popup
   ========================================================================== */
.social-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
}
.social-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    width: 480px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.social-popup-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
}
.social-popup-header span:first-child {
    flex: 1;
}
.social-popup-header span:nth-child(2) {
    width: 150px;
    text-align: center;
}
.social-popup-header span:nth-child(3) {
    width: 70px;
    text-align: center;
    line-height: 1.2;
}
.social-popup-body {
    overflow-y: auto;
    flex: 1;
}
.social-popup-row {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.social-popup-row:hover {
    background: #fafafa;
}
.social-popup-network {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.social-popup-icon {
    display: flex;
    align-items: center;
}
.social-popup-icon svg {
    width: 26px;
    height: 26px;
}
.social-popup-label {
    font-size: 13px;
    color: #333;
}
.social-popup-input {
    width: 150px;
}
.social-popup-input input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
}
.social-popup-input input:focus {
    border-color: #7e57c2;
}
.social-popup-check {
    width: 70px;
    text-align: center;
}
.social-popup-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4a7cff;
}
.social-popup-footer {
    padding: 10px 14px;
    border-top: 1px solid #e0e0e0;
}
.social-popup-save {
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 7px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.social-popup-save:hover {
    background: #3a7bc8;
}

@media (max-width: 520px) {
    .social-popup {
        width: 98vw;
    }
    .social-popup-input {
        width: 110px;
    }
    .social-popup-check {
        width: 50px;
    }
}

/* Profile AI Chat */
#profile-aichat-wrap {
    display: flex;
    flex-direction: column;
    height: 550px;
    background: #fff;
    border-radius: 8px;
}
.profile-aichat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}
.profile-aichat-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.profile-aichat-title i {
    color: #4a90d9;
    margin-right: 6px;
}
.profile-aichat-clear {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    color: #888;
    font-size: 13px;
    transition: all 0.2s;
}
.profile-aichat-clear:hover {
    background: #fee;
    color: #c00;
    border-color: #c00;
}
.profile-aichat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.profile-aichat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}
.profile-aichat-welcome-icon {
    font-size: 36px;
    color: #4a90d9;
    margin-bottom: 10px;
}
.profile-aichat-welcome h3 {
    margin: 0 0 8px;
    color: #333;
    font-size: 18px;
}
.profile-aichat-welcome p {
    margin: 0 0 20px;
    font-size: 13px;
    color: #888;
}
.profile-aichat-suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 450px;
    margin: 0 auto;
}
.profile-aichat-suggestion {
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-aichat-suggestion:hover {
    border-color: #4a90d9;
    box-shadow: 0 2px 8px rgba(74,144,217,0.15);
}
.profile-aichat-suggestion .card-icon {
    font-size: 20px;
    margin-bottom: 6px;
    color: #4a90d9;
}
.profile-aichat-suggestion .card-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 2px;
}
.profile-aichat-suggestion .card-desc {
    font-size: 11px;
    color: #999;
}
.profile-aichat-msg {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}
.profile-aichat-msg.user {
    align-self: flex-end;
    align-items: flex-end;
}
.profile-aichat-msg.assistant {
    align-self: flex-start;
    align-items: flex-start;
}
.profile-aichat-msg .msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.profile-aichat-msg.user .msg-bubble {
    background: #4a90d9;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.profile-aichat-msg.assistant .msg-bubble {
    background: #f1f3f4;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}
.profile-aichat-msg .msg-time {
    font-size: 10px;
    color: #aaa;
    margin-top: 3px;
    padding: 0 4px;
}
.profile-aichat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #f1f3f4;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    border: 1px solid #e0e0e0;
}
.profile-aichat-typing span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: profileAiTyping 1.2s ease-in-out infinite;
}
.profile-aichat-typing span:nth-child(2) { animation-delay: 0.15s; }
.profile-aichat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes profileAiTyping {
    0%, 60%, 100% { transform: scale(0.6); opacity: 0.4; }
    30% { transform: scale(1); opacity: 1; }
}
.profile-aichat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}
.profile-aichat-input-bar input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.profile-aichat-input-bar input:focus {
    border-color: #4a90d9;
}
.profile-aichat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #4a90d9;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.profile-aichat-send:hover {
    background: #3a7bc8;
}
.profile-aichat-footer {
    text-align: center;
    font-size: 10px;
    color: #aaa;
    padding: 6px;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 8px 8px;
}
