.edit-profile-popup {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(8px);
z-index: 1001;
display: none;
align-items: center;
justify-content: center;
padding: 1rem;
opacity: 0;
transition: opacity 0.3s ease;
}

@media (max-width: 640px) {
.edit-profile-popup {
padding: 0;
align-items: flex-end;
}
}

.edit-profile-popup.show {
display: flex;
opacity: 1;
}

.edit-profile-popup-overlay {
display: none;
}

.edit-profile-popup-content {
width: 100%;
max-width: 400px;
max-height: 85vh;
background: #1e2433;
border: 1px solid rgba(74, 158, 255, 0.1);
border-radius: 12px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
overflow: hidden;
position: relative;
animation: editProfileSlideIn 0.2s ease-out;
display: flex;
flex-direction: column;
}

@media (max-width: 640px) {
.edit-profile-popup-content {
width: 100%;
max-width: none;
height: auto;
max-height: 90vh;
border-radius: 12px 12px 0 0;
border: 1px solid rgba(74, 158, 255, 0.1);
box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
animation: editProfileSlideUp 0.3s ease-out;
overflow-y: auto;
}
}

.edit-profile-popup-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-profile-popup-title {
font-size: 1rem;
font-weight: 600;
color: #fff;
margin: 0;
}

@media (max-width: 640px) {
.edit-profile-popup-header {
padding: 0.75rem;
}

.edit-profile-popup-title {
font-size: 0.875rem;
}
}

@keyframes editProfileSlideIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

@keyframes editProfileSlideUp {
from {
opacity: 0;
transform: translateY(100%);
}
to {
opacity: 1;
transform: translateY(0);
}
}

.edit-profile-popup-close {
background: transparent;
border: none;
color: rgba(255, 255, 255, 0.6);
cursor: pointer;
padding: 4px;
border-radius: 4px;
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.edit-profile-popup-close:hover {
color: white;
background: rgba(255, 255, 255, 0.1);
}

.edit-profile-form {
padding: 1rem;
overflow-y: auto;
flex: 1;
max-height: calc(85vh - 60px); /* Account for header height */
}

/* Custom scrollbar styling */
.edit-profile-form::-webkit-scrollbar {
    width: 6px;
}

.edit-profile-form::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.edit-profile-form::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.edit-profile-form::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Firefox scrollbar */
.edit-profile-form {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.edit-profile-section {
margin-bottom: 1rem;
}

.edit-profile-avatar-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
padding: 0.75rem;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
}

@media (max-width: 640px) {
.edit-profile-form {
padding: 0.75rem;
}

.edit-profile-section {
margin-bottom: 0.75rem;
}

.edit-profile-avatar-section {
padding: 0.5rem;
}
}

.edit-profile-avatar-container {
position: relative;
width: 4rem;
height: 4rem;
border-radius: 50%;
overflow: hidden;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
border: 2px solid rgba(255, 255, 255, 0.1);
}

.edit-profile-avatar-container:hover {
transform: scale(1.05);
border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 640px) {
.edit-profile-avatar-container {
width: 3rem;
height: 3rem;
}
}

.edit-profile-avatar-preview {
width: 100%;
height: 100%;
object-fit: cover;
}

.edit-profile-avatar-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
opacity: 0;
transition: opacity 0.2s ease;
}

.edit-profile-avatar-container:hover .edit-profile-avatar-overlay {
opacity: 1;
}

.edit-profile-avatar-input {
display: none;
}

.edit-profile-avatar-label {
color: rgba(255, 255, 255, 0.7);
cursor: pointer;
font-size: 0.75rem;
font-weight: 500;
transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.edit-profile-avatar-label:hover {
color: white;
}

.edit-profile-field {
display: flex;
flex-direction: column;
gap: 0.25rem;
}

.edit-profile-label {
color: #fff;
font-size: 0.75rem;
font-weight: 500;
}

.edit-profile-input,
.edit-profile-textarea {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 0.5rem 0.75rem;
color: white;
font-size: 0.875rem;
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
resize: vertical;
}

.edit-profile-input:focus,
.edit-profile-textarea:focus {
outline: none;
border-color: rgba(255, 255, 255, 0.25);
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.edit-profile-textarea {
min-height: 3rem;
font-family: inherit;
}

.edit-profile-field-hint {
color: rgba(255, 255, 255, 0.4);
font-size: 0.625rem;
}

.edit-profile-actions {
display: flex;
justify-content: center;
margin-top: 1rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-profile-save {
width: 100%;
padding: 0.625rem 1rem;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
border: 1px solid rgba(255, 255, 255, 0.1);
background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
color: white;
backdrop-filter: blur(8px);
}

.edit-profile-save:hover {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
border-color: rgba(255, 255, 255, 0.25);
transform: translateY(-2px) scale(1.02);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.edit-profile-save:disabled {
background: rgba(255, 255, 255, 0.05);
color: rgba(255, 255, 255, 0.4);
cursor: not-allowed;
transform: none;
}

@media (max-width: 640px) {
.edit-profile-actions {
margin-top: 0.75rem;
padding-top: 0.5rem;
}

.edit-profile-save {
padding: 0.75rem 1rem;
}
}






/* Dynamic Banner Compact Option */
.edit-profile-compact-option {
display: flex;
align-items: center;
gap: 0.5rem;
position: relative;
}

.edit-profile-custom-checkbox {
display: flex;
align-items: center;
flex: 1;
}

.edit-profile-custom-checkbox input[type="checkbox"] {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}

.custom-checkbox-label {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
user-select: none;
}

.custom-checkbox-box {
position: relative;
width: 1.125rem;
height: 1.125rem;
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 4px;
background: rgba(255, 255, 255, 0.05);
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.custom-checkbox-check {
width: 0.75rem;
height: 0.75rem;
color: white;
opacity: 0;
transform: scale(0.5);
transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.edit-profile-custom-checkbox input[type="checkbox"]:checked + .custom-checkbox-label .custom-checkbox-box {
background: linear-gradient(135deg, #4a9eff, #357abd);
border-color: #4a9eff;
box-shadow: 0 2px 8px rgba(74, 158, 255, 0.4);
}

.edit-profile-custom-checkbox input[type="checkbox"]:checked + .custom-checkbox-label .custom-checkbox-check {
opacity: 1;
transform: scale(1);
}

.custom-checkbox-label:hover .custom-checkbox-box {
border-color: rgba(255, 255, 255, 0.5);
background: rgba(255, 255, 255, 0.08);
}

.edit-profile-custom-checkbox input[type="checkbox"]:checked + .custom-checkbox-label:hover .custom-checkbox-box {
background: linear-gradient(135deg, #5aa9ff, #4a9eff);
}

.custom-checkbox-text {
color: #fff;
font-size: 0.875rem;
font-weight: 500;
display: flex;
align-items: center;
gap: 0.375rem;
}

.edit-profile-beta-badge {
display: inline-flex;
align-items: center;
padding: 0.0625rem 0.3125rem;
background: linear-gradient(135deg, #4a9eff, #357abd);
color: white;
font-size: 0.5625rem;
font-weight: 700;
text-transform: uppercase;
border-radius: 3px;
letter-spacing: 0.5px;
box-shadow: 0 2px 6px rgba(74, 158, 255, 0.3);
}

.edit-profile-info-icon {
width: 1rem;
height: 1rem;
color: rgba(255, 255, 255, 0.5);
cursor: pointer;
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
flex-shrink: 0;
position: relative;
}

.edit-profile-info-icon:hover {
color: #4a9eff;
transform: scale(1.1);
}

.edit-profile-info-icon svg {
width: 100%;
height: 100%;
}

.edit-profile-tooltip {
position: absolute;
bottom: calc(100% + 0.5rem);
right: 0;
background: #2a3142;
border: 1px solid rgba(74, 158, 255, 0.3);
border-radius: 8px;
padding: 0.625rem 0.75rem;
min-width: 200px;
max-width: 250px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
z-index: 1000;
opacity: 0;
visibility: hidden;
transform: translateY(4px);
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
pointer-events: none;
}

.edit-profile-tooltip.show {
opacity: 1;
visibility: visible;
transform: translateY(0);
pointer-events: auto;
}

.tooltip-arrow {
position: absolute;
bottom: -6px;
right: 0.5rem;
width: 12px;
height: 12px;
background: #2a3142;
border-right: 1px solid rgba(74, 158, 255, 0.3);
border-bottom: 1px solid rgba(74, 158, 255, 0.3);
transform: rotate(45deg);
}

.tooltip-content {
color: rgba(255, 255, 255, 0.9);
font-size: 0.75rem;
line-height: 1.4;
position: relative;
z-index: 1;
}

@media (max-width: 640px) {
.edit-profile-compact-option {
gap: 0.375rem;
}

.custom-checkbox-box {
width: 1rem;
height: 1rem;
}

.custom-checkbox-check {
width: 0.625rem;
height: 0.625rem;
}

.custom-checkbox-text {
font-size: 0.8125rem;
}

.edit-profile-beta-badge {
font-size: 0.5rem;
padding: 0.0625rem 0.25rem;
}

.edit-profile-info-icon {
width: 0.875rem;
height: 0.875rem;
}

.edit-profile-tooltip {
min-width: 180px;
max-width: 220px;
padding: 0.5rem 0.625rem;
}

.tooltip-content {
font-size: 0.6875rem;
}
}


/* Avatar Type Selector */
.edit-profile-avatar-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    padding: 0.1875rem;
    position: relative;
}

.avatar-type-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8125rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.avatar-type-option:hover:not(.active) {
    color: rgba(255, 255, 255, 0.6);
}

.avatar-type-option.active {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.25), rgba(53, 122, 189, 0.25));
    color: #fff;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.2);
}

.avatar-type-icon {
    width: 1.125rem;
    height: 1.125rem;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

.avatar-type-option.active .avatar-type-icon {
    transform: scale(1.1);
}

@media (max-width: 640px) {
    .avatar-type-option {
        padding: 0.5625rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.375rem;
    }
    
    .avatar-type-icon {
        width: 1rem;
        height: 1rem;
    }
}

/* Social Links Section */
.social-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.social-link-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.social-platform-dropdown {
    position: relative;
    min-width: 80px;
    flex-shrink: 0;
}

.social-platform-button {
    display: flex;
    align-items: center;
    gap: 0.1875rem;
    padding: 0.1875rem 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.625rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    justify-content: space-between;
    min-height: 24px;
}

.social-platform-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.social-platform-button.active {
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
}

.social-platform-dropdown.open .social-platform-button {
    border-color: rgba(74, 158, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.social-platform-content {
    display: flex;
    align-items: center;
    gap: 0.1875rem;
    flex: 1;
    min-width: 0;
}

.social-platform-icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

.social-platform-text {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.625rem;
}

.social-platform-arrow {
    width: 0.625rem;
    height: 0.625rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.social-platform-dropdown.open .social-platform-arrow {
    transform: rotate(180deg);
}

.social-platform-options {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #2a3142;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-height: 180px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: 2px;
}

/* Custom scrollbar for dropdown */
.social-platform-options::-webkit-scrollbar {
    width: 4px;
}

.social-platform-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.social-platform-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.social-platform-options::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Firefox scrollbar */
.social-platform-options {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.social-platform-dropdown.open .social-platform-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.social-platform-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.375rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.625rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.social-platform-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.social-platform-option:first-child {
    border-radius: 6px 6px 0 0;
}

.social-platform-option:last-child {
    border-radius: 0 0 6px 6px;
}

.social-link-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.1875rem 0.25rem;
    color: white;
    font-size: 0.625rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 24px;
}

.social-link-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.social-link-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.remove-social-link-btn {
    background: transparent;
    border: none;
    color: rgba(255, 100, 100, 0.6);
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.remove-social-link-btn:hover {
    color: rgba(255, 100, 100, 1);
    background: rgba(255, 100, 100, 0.1);
}

.remove-social-link-btn svg {
    width: 0.625rem;
    height: 0.625rem;
}

.add-social-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.1875rem;
    padding: 0.25rem 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.625rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: 0.1875rem;
}

.add-social-link-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

.add-social-link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.add-social-link-btn svg {
    width: 0.625rem;
    height: 0.625rem;
}

/* Platform Icons */
.platform-icon-twitter { color: #1da1f2; }
.platform-icon-youtube { color: #ff0000; }
.platform-icon-discord { color: #5865f2; }
.platform-icon-reddit { color: #ff4500; }
.platform-icon-linkedin { color: #0077b5; }
.platform-icon-github { color: #fff; }
.platform-icon-twitch { color: #9146ff; }
.platform-icon-instagram { color: #e4405f; }
.platform-icon-tiktok { color: #fff; }
.platform-icon-website { color: #4a9eff; }
.platform-icon-other { color: #888; }

/* Smooth transitions for all platform icons */
.social-platform-icon {
    transition: transform 0.2s ease;
}

.social-platform-option:hover .social-platform-icon {
    transform: scale(1.1);
}

.platform-icon-bloxd {
    background-image: url('../images/Profiles/Bob.png');
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    width: 0.75rem !important;
    height: 0.75rem !important;
    display: inline-block;
}

/* Ensure Bloxd icon displays in dropdown options */
.social-platform-option .platform-icon-bloxd {
    width: 0.75rem !important;
    height: 0.75rem !important;
}

@media (max-width: 640px) {
    .social-link-item {
        padding: 0.1875rem;
        gap: 0.1875rem;
    }
    
    .social-platform-dropdown {
        min-width: 65px;
    }
    
    .social-platform-button {
        padding: 0.125rem 0.1875rem;
        font-size: 0.5625rem;
        min-height: 20px;
    }
    
    .social-platform-icon {
        width: 0.625rem;
        height: 0.625rem;
    }
    
    .social-platform-text {
        font-size: 0.5625rem;
    }
    
    .social-platform-arrow {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .social-link-input {
        font-size: 0.5625rem;
        padding: 0.125rem 0.1875rem;
        min-height: 20px;
    }
    
    .add-social-link-btn {
        padding: 0.1875rem 0.25rem;
        font-size: 0.5625rem;
        gap: 0.125rem;
    }
    
    .remove-social-link-btn {
        width: 20px;
        height: 20px;
    }
    
    .remove-social-link-btn svg {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .platform-icon-bloxd {
        width: 0.625rem !important;
        height: 0.625rem !important;
    }
    
    .edit-profile-form {
        padding: 0.75rem;
        max-height: calc(90vh - 50px);
    }
}