/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 5% auto;
    max-width: 600px;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--error);
}

.modal-body {
    padding: 1.5rem;
}

/* Profile Section Styles */
.profile-section {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .profile-section {
        flex-direction: column;
        align-items: center;
    }
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.avatar-edit {
    position: relative;
}

.avatar-edit input {
    display: none;
}

.avatar-edit label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-primary);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.avatar-edit label:hover {
    background-color: var(--accent-secondary);
}

.profile-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.save-btn {
    background-color: var(--accent-primary);
    color: white;
}

.save-btn:hover {
    background-color: var(--accent-secondary);
}

.logout-btn {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.logout-btn:hover {
    background-color: var(--error);
    color: white;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    background-color: var(--bg-secondary);
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1000;
    display: none;
    animation: dropdownFadeIn 0.2s;
    border: 1px solid var(--border);
}

.dropdown-menu.show {
    display: block;
}

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

.dropdown-menu ul {
    list-style: none;
    padding: 0.5rem 0;
}

.dropdown-menu li {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.dropdown-menu li:hover {
    background-color: var(--hover-bg);
}

.icon-settings:before, .icon-logout:before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-size: contain;
}

.icon-settings:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22l-1.92 3.32c-.12.22-.07.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z'/%3E%3C/svg%3E");
}

.icon-logout:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z'/%3E%3C/svg%3E");
}

/* User Profile Styles */
.user-profile {
    position: relative;
    cursor: pointer;
}