/* ============================================= */
/* 语音通话覆盖层样式                              */
/* ============================================= */

.voice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.voice-overlay.hidden-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 炫彩云团Canvas */
.voice-cloud-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    max-width: 80vw;
    max-height: 80vw;
    z-index: 1;
}

/* 状态指示器 */
.voice-status-indicator {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.status-icon {
    font-size: 48px;
    color: var(--md-sys-color-primary);
    margin-bottom: 16px;
    animation: pulse-icon 2s ease-in-out infinite;
}

.status-icon i {
    filter: drop-shadow(0 0 20px rgba(168, 199, 250, 0.6));
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.status-text {
    font-size: 24px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* 底部控制栏 */
.voice-controls {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 10;
}

.voice-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.voice-control-btn i {
    font-size: 28px;
}

.voice-control-btn span {
    font-size: 12px;
    font-weight: 500;
    position: absolute;
    bottom: -25px;
    white-space: nowrap;
}

.voice-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.voice-control-btn.end-call-btn {
    background: rgba(255, 59, 48, 0.9);
    border-color: rgba(255, 59, 48, 1);
}

.voice-control-btn.end-call-btn:hover {
    background: rgba(255, 59, 48, 1);
    transform: scale(1.1);
}

/* 浮动对话记录面板 */
.voice-transcript-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 50%;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 20;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    transform: translateY(0);
}

.voice-transcript-panel.hidden {
    transform: translateY(100%);
}

.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.transcript-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.transcript-close-btn {
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.transcript-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--md-sys-color-on-surface);
}

.transcript-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.transcript-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
}

.transcript-message.user {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    margin-left: auto;
    text-align: right;
}

.transcript-message.ai {
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
}

.transcript-message-role {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.7;
}

.transcript-message-text {
    font-size: 14px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .voice-cloud-canvas {
        width: 300px;
        height: 300px;
    }

    .status-icon {
        font-size: 36px;
    }

    .status-text {
        font-size: 18px;
    }

    .voice-controls {
        bottom: 40px;
        gap: 20px;
    }

    .voice-control-btn {
        width: 60px;
        height: 60px;
    }

    .voice-control-btn i {
        font-size: 24px;
    }
}