/* 음성 녹음 모달 스타일 */
.voice-recorder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.voice-recorder-content {
    background: var(--bg-primary, #ffffff);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--border-color, #e0e0e0);
}

/* 모달 헤더 */
.voice-recorder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    background: var(--bg-secondary, #f8f9fa);
}

.voice-recorder-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #333333);
}

.voice-recorder-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary, #666666);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.voice-recorder-close:hover {
    background: var(--bg-hover, #f0f0f0);
    color: var(--text-primary, #333333);
}

/* 모달 바디 */
.voice-recorder-body {
    padding: 24px;
}

/* 마이크 권한 요청 섹션 */
.mic-permission-section {
    text-align: center;
    padding: 20px 0;
}

.mic-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.8;
}

.mic-permission-section p {
    margin: 0 0 20px 0;
    color: var(--text-secondary, #666666);
    line-height: 1.5;
}

.permission-btn {
    background: var(--accent-primary, #007bff);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.permission-btn:hover {
    background: var(--accent-primary-dark, #0056b3);
    transform: translateY(-1px);
}

/* 녹음 컨트롤 */
.recording-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 녹음 시간 */
.recording-timer {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-primary, #007bff);
    font-family: 'Courier New', monospace;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 음량 게이지 */
.volume-gauge-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.volume-gauge {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary, #e9ecef);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.volume-bar {
    height: 100%;
    background: #2ed573;
    border-radius: 4px;
    transition: all 0.1s ease;
    width: 0%;
}

/* 녹음 버튼들 */
.recording-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.record-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.record-btn.start {
    background: var(--accent-primary, #007bff);
    color: white;
}

.record-btn.start:hover {
    background: var(--accent-primary-dark, #0056b3);
    transform: translateY(-1px);
}

.record-btn.stop {
    background: #ff4757;
    color: white;
    animation: pulse 2s infinite;
}

.record-btn.stop:hover {
    background: #ff3742;
    transform: translateY(-1px);
}

/* STT 결과 섹션 */
.stt-result {
    text-align: center;
}

.stt-result h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary, #333333);
    font-size: 1.1rem;
}

.stt-text {
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    min-height: 60px;
    color: var(--text-primary, #333333);
    line-height: 1.5;
    word-break: break-word;
    font-size: 1rem;
}

.stt-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: var(--accent-primary, #007bff);
    color: white;
}

.action-btn.primary:hover {
    background: var(--accent-primary-dark, #0056b3);
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: var(--bg-tertiary, #e9ecef);
    color: var(--text-primary, #333333);
    border: 1px solid var(--border-color, #e0e0e0);
}

.action-btn.secondary:hover {
    background: var(--bg-hover, #f0f0f0);
    transform: translateY(-1px);
}

/* STT 로딩 */
.stt-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary, #e9ecef);
    border-top: 3px solid var(--accent-primary, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.stt-loading p {
    margin: 0;
    color: var(--text-secondary, #666666);
    font-size: 0.95rem;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
    }
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* 모바일 반응형 */
@media (max-width: 480px) {
    .voice-recorder-content {
        width: 95%;
        margin: 10px;
        max-height: 85vh;
    }

    .voice-recorder-header {
        padding: 16px 20px;
    }

    .voice-recorder-body {
        padding: 20px;
    }

    .recording-timer {
        font-size: 1.75rem;
        min-height: 50px;
    }

    .record-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .stt-actions {
        flex-direction: column;
    }

    .action-btn {
        flex: none;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .voice-recorder-modal {
        background-color: rgba(0, 0, 0, 0.8);
    }

    .voice-recorder-content {
        background: var(--bg-primary, #1a1a1a);
        border-color: var(--border-color, #333333);
    }

    .voice-recorder-header {
        background: var(--bg-secondary, #2a2a2a);
        border-color: var(--border-color, #333333);
    }

    .voice-recorder-header h3 {
        color: var(--text-primary, #ffffff);
    }

    .voice-recorder-close {
        color: var(--text-secondary, #cccccc);
    }

    .voice-recorder-close:hover {
        background: var(--bg-hover, #333333);
        color: var(--text-primary, #ffffff);
    }

    .mic-permission-section p {
        color: var(--text-secondary, #cccccc);
    }

    .stt-text {
        background: var(--bg-secondary, #2a2a2a);
        border-color: var(--border-color, #333333);
        color: var(--text-primary, #ffffff);
    }

    .volume-gauge {
        background: var(--bg-tertiary, #333333);
    }

    .action-btn.secondary {
        background: var(--bg-tertiary, #333333);
        color: var(--text-primary, #ffffff);
        border-color: var(--border-color, #444444);
    }

    .action-btn.secondary:hover {
        background: var(--bg-hover, #444444);
    }

    .stt-loading p {
        color: var(--text-secondary, #cccccc);
    }
}

/* body 모달 열림 상태 */
body.modal-open {
    overflow: hidden;
} 