/* Profile Image Selector Modal */

.profile_modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.profile_modal_box {
background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
    border: 3px solid var(--rp-color);
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    width: 90%;                                  
    max-height: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.5);
    animation: slideIn 0.3s ease;
    font-family: 'ClickHerFont';
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.profile_modal_title {
    font-size: 28px;
    font-weight: bold;
    color: var(--rp-color);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.7);
}

.profile_modal_grid_container {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(85vh - 200px);
    padding-right: 10px;
    margin-bottom: 20px;
}

/* Custom scrollbar */
.profile_modal_grid_container::-webkit-scrollbar {
    width: 10px;
}

.profile_modal_grid_container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.profile_modal_grid_container::-webkit-scrollbar-thumb {
    background: var(--rp-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.profile_modal_grid_container::-webkit-scrollbar-thumb:hover {
    background: var(--bn-color);
}

.profile_modal_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 5px;
}

.profile_modal_item {
    aspect-ratio: 1 / 1;
    border: 3px solid rgba(0, 229, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
}

.profile_modal_item:hover {
    border-color: var(--bn-color);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
}

.profile_modal_item.selected {
    border-color: var(--rp-color);
    border-width: 4px;
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.8);
    background: rgba(255, 0, 128, 0.1);
}

.profile_modal_item.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--rp-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.8);
}

.profile_modal_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile_modal_item:hover img {
    transform: scale(1.1);
}

.profile_modal_buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.profile_modal_button {
    padding: 12px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.profile_modal_button.confirm {
    background: var(--rp-color);
    color: white;
    border: 2px solid var(--rp-color);
}

.profile_modal_button.confirm:hover {
    background: transparent;
    color: var(--rp-color);
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.6);
    transform: scale(1.05);
}

.profile_modal_button.cancel {
    background: transparent;
    color: var(--bn-color);
    border: 2px solid var(--bn-color);
}

.profile_modal_button.cancel:hover {
    background: var(--bn-color);
    color: white;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile_modal_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .profile_modal_box {
        padding: 20px;
        max-width: 95%;
    }
    
    .profile_modal_title {
        font-size: 22px;
    }
    
    .profile_modal_button {
        padding: 10px 30px;
        font-size: 16px;
        min-width: 100px;
    }
}
