/* Voice Chat Modal - World Class */
.voice-chat-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voice-chat-modal.active {
    display: flex;
    opacity: 1;
}

.voice-chat-container {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: var(--surface);
    border-radius: 24px;
    padding: 2rem;
    border: 2px solid var(--primary);
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.voice-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.voice-chat-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.voice-close-btn {
    background: var(--error);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-close-btn:hover {
    transform: scale(1.1);
}

.voice-chat-content {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.voice-visualizer {
    margin: 1rem 0;
    flex-shrink: 0;
}

.voice-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gold-shine);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--dark-bg);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.voice-avatar.listening {
    animation: voicePulse 1.5s infinite;
}

.voice-avatar.speaking {
    animation: voiceSpeak 0.5s infinite;
}

@keyframes voicePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(212, 175, 55, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 8px 48px rgba(212, 175, 55, 0.8);
    }
}

@keyframes voiceSpeak {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.voice-status {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-controls {
    margin: 1rem 0;
    flex-shrink: 0;
}

.voice-main-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gold-shine);
    border: none;
    color: var(--dark-bg);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.voice-main-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(212, 175, 55, 0.6);
}

.voice-main-btn:active {
    transform: scale(0.95);
}

.voice-main-btn.listening {
    background: var(--error);
    animation: pulse 1s infinite;
}

.voice-settings {
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: var(--background);
    border-radius: 8px;
    flex-shrink: 0;
}

.voice-setting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.voice-setting label {
    font-weight: 600;
    color: var(--text-primary);
}

.voice-select {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.voice-select:focus {
    border-color: var(--primary);
}

.voice-transcript {
    margin-top: 1rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
    min-height: 200px;
    max-height: 400px;
}

.voice-transcript::-webkit-scrollbar {
    width: 6px;
}

.voice-transcript::-webkit-scrollbar-track {
    background: transparent;
}

.voice-transcript::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.voice-transcript::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

.transcript-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    background: var(--surface);
    padding: 0.5rem 0;
    z-index: 1;
}

.transcript-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1rem;
}

.transcript-msg {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.transcript-msg.user {
    background: var(--primary-light);
    color: var(--text-primary);
    align-self: flex-end;
    max-width: 80%;
}

.transcript-msg.ai {
    background: var(--background);
    color: var(--text-primary);
    align-self: flex-start;
    max-width: 80%;
}

.transcript-msg strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile */
@media (max-width: 768px) {
    .voice-chat-container {
        width: 95%;
        padding: 1.5rem;
    }
    
    .voice-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .voice-main-btn {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}
