dialog.profile-container{
    background-color: #f6f6f2;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 380px;
    height: 220px !important;
    position: relative;
    transition: all 0.3s ease;
    overflow: visible;
    /* display: flex; */
    flex-direction: column;
}

dialog.profile-container.expanded {
    max-width: 600px;
    height: 35vh !important;
}

.main-content {
    flex-grow: 0;
    overflow-y: hidden;
    padding: 20px;
    margin-top: auto;
    margin-bottom: 0px;
}

#main-container {
    border: 2px solid #af8562;
}

.avatar-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translate(-50%, -50%);

}

.avatar-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.icon-button {
    position: absolute;
    background-color: #af8562;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.icon-button:hover {
    background-color: #8f6b4a;
    transform: scale(1.1);
}

.shuffle-button {
    bottom: 10px;
    left: 10px;
}

.edit-avatar-button {
    bottom: 10px;
    right: 10px;
}

.gender-container {
    display: grid;
    place-items: center;
    grid-template-columns: 1 1;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 20px;
    gap: 15px;
}

.gender-button {
    background-color: #f0f0f0;
    border: none;
    padding: 10px 20px;
    /* margin: 0 10px; */
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100px;
}

.save-avatar-button {
    grid-column: span 2;  /* This makes it span two columns */
    width: 100%;
}

.gender-button:hover {
    opacity: 0.8;
}

.gender-button.active {
    color: white;
}

#male-button {
    background-color: #6495ED;
}

#female-button {
    background-color: #DDA0DD;
}

.username-container {
    text-align: center;
    margin-bottom: 20px;
}

.username {
    font-size: 24px;
    margin: 0;
}

.shuffle-username {
    background-color: transparent;
    border: none;
    color: #2196F3;
    cursor: pointer;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 90px;
    box-sizing: border-box;
    padding-bottom: 20px;
}

.avatar-option {
    width: 100%;
    padding-top: 100%;
    /* This maintains a square aspect ratio */
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #f0f0f0;
    /* Example background color */
}

.avatar-option:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.avatar-option img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.confirm-button-container {
    padding: 10px 20px;
    background-color: #f2f1ea;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 20px 20px;
    display: none;
}

.confirm-button {
    display: none;
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-button:hover {
    background-color: #45a049;
}

.back-button {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: scale(1.1);
}

#avatar-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.spinner {
    margin: auto;
    width: 70px;
    text-align: center;
}

.spinner>div {
    width: 18px;
    height: 18px;
    background-color: #333;
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

@keyframes sk-bouncedelay {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}