/* ============================================
   DROPDOWN MENU - ESTILO NETFLIX
   ============================================ */

/* Container do menu do usuário */
.user-menu {
    position: relative;
    display: inline-block;
}

/* Botão do avatar do usuário */
.user-avatar {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar img {
    border-radius: 4px;
    object-fit: cover;
    width: 32px;
    height: 32px;
}

.user-avatar span {
    color: white;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.user-avatar.active span {
    transform: rotate(180deg);
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    min-width: 260px;
    z-index: 1000;
    animation: fadeDropdown 0.2s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.dropdown-menu.hidden {
    display: none;
}

/* Cabeçalho do dropdown */
.dropdown-header {
    padding: 16px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.dropdown-info {
    flex: 1;
}

.dropdown-name {
    font-weight: 700;
    font-size: 16px;
    color: white;
    margin-bottom: 4px;
}

.dropdown-email {
    font-size: 12px;
    color: #b3b3b3;
    word-break: break-all;
}

.dropdown-status {
    display: inline-block;
    font-size: 10px;
    color: #46d369;
    margin-top: 4px;
}

/* Divisor */
.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
}

/* Itens do dropdown */
.dropdown-item {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: white;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    font-family: 'Inter', 'Netflix Sans', sans-serif;
}

.dropdown-item:hover {
    background: rgba(9, 79, 229, 0.2);
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* Item de logout */
.logout-item {
    color: #098de5;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

.logout-item:hover {
    background: rgba(9, 79, 229, 0.2);
    color: #098de5;
}

/* Modal de edição de perfil */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-modal.hidden {
    display: none;
}

.profile-modal-content {
    background: #141414;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.profile-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-modal-header h2 {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.close-modal {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
}

.profile-modal-body {
    padding: 24px;
}

/* Avatar selector */
.avatar-section {
    text-align: center;
    margin-bottom: 24px;
}

.current-avatar {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid #098de5;
}

.avatar-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.avatar-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    object-fit: cover;
}

.avatar-option:hover {
    transform: scale(1.05);
    border-color: #098de5;
}

.avatar-option.selected {
    border-color: #098de5;
    box-shadow: 0 0 0 2px #098de5;
}

/* Inputs do modal */
.profile-input-group {
    margin-bottom: 20px;
}

.profile-input-group label {
    display: block;
    color: #b3b3b3;
    font-size: 14px;
    margin-bottom: 8px;
}

.profile-input-group input {
    width: 100%;
    padding: 12px 16px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.profile-input-group input:focus {
    outline: none;
    border-color: #098de5;
}

.profile-save-btn {
    width: 100%;
    padding: 14px;
    background: #098de5;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 16px;
}

.profile-save-btn:hover {
    background: #12a2f6;
}

/* Animações */
@keyframes fadeDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        animation: slideUp 0.3s ease;
    }
    
    .dropdown-menu.hidden {
        display: none;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .user-avatar span {
        display: none;
    }
    
    .avatar-options {
        grid-template-columns: repeat(3, 1fr);
    }
}