:root {
    --primary-color: #1e70b3;
    --secondary-color: #111111;
    --accent-color: #FFD166;
    --background-color: #F1FFFa;
    --light-color: #F6F7FB;
    --btn-color: #559bd4;
    --card-color: #FFFFFF;
    --text-color: #333333;
    --success-color: #06D6A0;
    --warning-color: #EF476F;
    --font-main: 'Nunito', sans-serif;
    --font-fun: 'Comic Neue', cursive;
}

/* User Profile Styles */
.user-profile-dropdown {
    position: relative;
    z-index: 1000;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.user-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
}

.profile-image-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: var(--primary-color);
}

.user-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.fallback-avatar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 40px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.user-profile-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Profile Menu */
.user-profile-menu {
    position: absolute;
    top: 60px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.user-profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--primary-color);
    color: white;
}

.menu-profile-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
}

.menu-profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-user-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: white;
    font-weight: 700;
}

.menu-user-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-item:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.current-language {
    margin-left: auto;
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 10px;
}

.logout-menu-item {
    color: #e74c3c;
}

.logout-menu-item:hover {
    background: #ffeaea;
    color: #c0392b;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--background-color);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: absolute;
    z-index: 999999;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* Settings Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Profile Images Grid */
.profile-images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.profile-image-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.profile-image-option:hover {
    transform: scale(1.05);
}

.profile-image-option.selected {
    border-color: var(--primary-color);
}

.profile-image-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-profile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    border: 2px dashed #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-profile-btn:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
}

.upload-profile-btn i {
    font-size: 24px;
    color: #666;
    margin-bottom: 5px;
}

.upload-profile-btn span {
    font-size: 12px;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.primary-btn,
.secondary-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.primary-btn {
    background: var(--btn-color);
    color: white;
}

.primary-btn:hover {

    transform: translateY(-2px);
}

.secondary-btn {
    background: var(--background-color);

    color: #666;
}

.secondary-btn:hover {
    background: #e9ecef;
}


/* Email Verification */
.email-verification {
    padding: 15px;
    background: var(--background-color);
    border-radius: 8px;
    margin-top: 10px;
}

.verification-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.verification-status.verified {
    color: #27ae60;
}

.verification-status.not-verified {
    color: #e74c3c;
}

.verify-email-btn {
    width: 100%;
    padding: 10px;
    background: var(--btn-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.verify-email-btn:hover {
    transform: translateY(-20px);
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.active {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid #27ae60;
}

.notification.error {
    border-left: 4px solid #e74c3c;
}

.notification.info {
    border-left: 4px solid #3498db;
}

/* Ensure images load properly */
.user-profile-img,
.menu-profile-img img {
    transition: opacity 0.3s ease;
}

.user-profile-img.loading,
.menu-profile-img img.loading {
    opacity: 0.5;
}

/* Profile image container */
.profile-image-container {
    position: relative;
}

.profile-image-container .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.profile-image-container.loading .loading-overlay {
    opacity: 1;
    visibility: visible;
}

.custom-image-preview {
    margin-top: 15px;
    border: 2px solid red;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;

}

.custom-image-preview img {
    height: 100%;
    width: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.custom-image-preview p {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 14px;
}

.custom-image-preview i {
    color: #4ECDC4;
    margin-right: 5px;
}

.preview-container {
    display: flex;
    justify-content: center;
}