.audio-output-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.audio-output-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-output-modal-content {
    background: var(--bg-card);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

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

.audio-output-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-gradient);
    color: white;
}

.audio-output-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-output-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px !important;
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.audio-output-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.audio-output-modal-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.audio-device-list {
    margin-bottom: 1rem;
}

.audio-device-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.audio-device-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.audio-device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    margin-bottom: 0.5rem;
}

.audio-device-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.audio-device-item.selected {
    background: rgba(229, 0, 110, 0.1);
    border-color: var(--accent-color);
}

.device-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.device-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.device-details {
    flex: 1;
}

.device-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.device-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.device-status {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.no-devices {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.no-devices i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.audio-output-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.audio-output-info i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.audio-output-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.audio-notification {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInDown 0.3s ease-out;
}

.audio-notification.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.audio-notification.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .audio-output-modal-content {
        width: 95%;
        margin: 1rem;
    }

    .audio-output-modal-header {
        padding: 1rem;
    }

    .audio-output-modal-body {
        padding: 1rem;
    }

    .audio-output-modal-footer {
        padding: 1rem;
        flex-direction: column;
    }

    .device-info {
        gap: 0.75rem;
    }

    .device-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Dark theme support */
[data-theme="light"] .audio-output-modal-content {
    background: #ffffff;
    color: #212529;
}

[data-theme="light"] .audio-output-modal-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .audio-output-modal-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .audio-device-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .device-icon {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .audio-output-info {
    background: rgba(0, 0, 0, 0.05);
}