.profile-container {
    width: 90%;
    max-width: 500px;
    margin: 5px 0 auto;
    box-sizing: border-box;
}

.profile-container h2 {
    text-align: center;
    color: #fff;
}

.profile-image-display-container {
    text-align: center;
    margin: 15px;
}

.profile-avatar,
.profile-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    background-color: rgba(255,255,255,0.1);
}

.profile-avatar-preview {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.profile-avatar-preview.clickable-avatar {
    cursor: pointer;
    border: 3px solid #c7995c;
    filter: grayscale(70%);
    transition: border-color 0.3s, filter 0.3s ease-in-out;
}

/* Avatar Lightbox Styles */
.lightbox#avatarEditLightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

.avatar-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: rgba(150, 150, 150, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    position: relative; 
    max-width: 500px;
}

#avatarLightboxImage {
    max-width: 80vw;
    max-height: 70vh;
    border-radius: 10px;
    margin-bottom: 20px;
    object-fit: contain;
}

.upload-avatar-lightbox-btn {
    font-size: 1.5em;
    margin-top: 15px;
}

#avatarEditLightbox .close-lightbox-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}

#profileDisplaySection p {
    margin-bottom: 5px;
    color: #eee;
    font-size: 1em;
    line-height: 1.6;
}

#profileDisplaySection p strong {
    color: #fff;
    margin-right: 8px;
}

#profileDisplaySection input[readonly] {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #aaa;
    padding: 6px 12px;
    font-size: 0.9em;
    cursor: default;
    width: 50vw;
    max-width: 450px;
    border-radius: 5px;
    box-shadow: none;
}

#profileDisplaySection input[readonly]:focus {
    outline: none;
}

#profileEditForm .input-group,
#changePasswordForm .input-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

#profileEditForm label,
#changePasswordForm label {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 0.9em;
}

#profileEditForm input[type="text"],
#profileEditForm input[type="email"],
#profileEditForm input[type="number"],
#profileEditForm select,
#changePasswordForm input[type="password"] {
    width: 100%;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.9em;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

#profileEditForm input[type="text"]:focus,
#profileEditForm input[type="email"]:focus,
#profileEditForm input[type="number"]:focus,
#profileEditForm input[type="date"]:focus,
#changePasswordForm input[type="password"]:focus {
    background-color: rgb(60, 60, 60, 0.75);
    border-color: rgba(255, 255, 255, 0.5);
}

#profileEditForm select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23cccccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%;
    background-size: 0.9em auto;
    padding-right: 2.5em;
}

#profileEditForm select option {
    background-color: #333;
    color: #fff;
}

.form-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 25px;
}

.form-actions button {
    width: 40%;
    padding: 10px 20px;
}

#editProfileBtn, #changePasswordBtn {
    display: block;
    width: 60%;
    margin: 10px auto;
}

#editProfileBtn {
    margin-top: 25px;
}

#changePasswordForm h3 {
    text-align: center;
    color: #fff;
}

.hidden {
    display: none !important;
}

.error-message, .success-message {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 1.2em;
    font-size: 0.9em;
}

.error-message { color: #ff6b6b; }
.success-message { color: #51cf66; }

@media (max-width: 600px) {
    .profile-container {
        width: 95%;
        padding: 15px;
    }
    #editProfileBtn, #changePasswordBtn {
        width: 80%;
    }
    .form-actions button {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

.profile-info-item {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.profile-info-item label {
    font-size: 0.8em;
    color: #ccc;
    margin-bottom: 3px;
}

#editBirthdate {
    border-radius: 12px;

    width: 95%;
    padding: 8px 10px;
    background-color: rgb(215, 215, 215, 0.25);
    color: #ffffff;
}