/* 语音助手样式 */

/* 语音按钮 */
.voice-assistant-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-assistant-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6);
}

.voice-assistant-btn.recording {
    background: linear-gradient(135deg, #ff3366 0%, #cc0033 100%);
    animation: pulse-recording 1s ease-in-out infinite;
}

.voice-assistant-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
}

@keyframes pulse-recording {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 51, 102, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 40px rgba(255, 51, 102, 0.8);
    }
}

/* 语音对话框 */
.voice-dialog {
    position: fixed;
    right: 30px;
    bottom: 110px;
    width: 380px;
    background: linear-gradient(135deg, rgba(20, 45, 80, 0.98) 0%, rgba(30, 60, 100, 0.98) 100%);
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(12px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.voice-dialog.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.voice-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.voice-dialog-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #00ffff;
    font-weight: 600;
}

.voice-dialog-title svg {
    width: 24px;
    height: 24px;
    fill: #00ffff;
}

.voice-dialog-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    color: #8ab4f8;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.voice-dialog-close:hover {
    background: rgba(255, 51, 102, 0.3);
    color: #ff3366;
}

/* 状态显示 */
.voice-status {
    text-align: center;
    padding: 20px 0;
    color: #8ab4f8;
    font-size: 14px;
}

.voice-status.recording {
    color: #ff3366;
}

.voice-status.processing {
    color: #ffaa00;
}

/* 对话内容 */
.voice-conversation {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.voice-message {
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.voice-message.user {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #e8f4ff;
    margin-left: 40px;
}

.voice-message.assistant {
    background: rgba(78, 203, 115, 0.15);
    border: 1px solid rgba(78, 203, 115, 0.3);
    color: #e8f4ff;
    margin-right: 40px;
}

.voice-message-label {
    font-size: 11px;
    color: #8ab4f8;
    margin-bottom: 4px;
}

/* 波形动画 */
.voice-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin: 20px 0;
}

.voice-waveform span {
    width: 4px;
    height: 20px;
    background: #00d4ff;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.voice-waveform span:nth-child(1) {
    animation-delay: 0s;
}

.voice-waveform span:nth-child(2) {
    animation-delay: 0.1s;
}

.voice-waveform span:nth-child(3) {
    animation-delay: 0.2s;
}

.voice-waveform span:nth-child(4) {
    animation-delay: 0.3s;
}

.voice-waveform span:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    100% {
        height: 10px;
    }

    50% {
        height: 40px;
    }
}

/* 录音提示 */
.voice-hint {
    text-align: center;
    color: #8ab4f8;
    font-size: 12px;
    margin-top: 10px;
}