/* css/learn.css - 语音转文字页面样式 */

.main-asr {
    padding: 80px 20px 60px;
    min-height: calc(100vh - 80px - 70px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.main-asr .container {
    max-width: 900px;
}

.main-asr h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.main-asr .subtitle {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.asr-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
}

/* 布局容器 */
.asr-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

/* 列 */
.asr-column {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
}

.asr-column h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* 控制区域 */
.asr-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.record-btn {
    padding: 14px 32px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#start-record {
    background: #4caf50;
    color: white;
}

#start-record:hover:not(:disabled) {
    background: #45a049;
    transform: scale(1.03);
}

#stop-record {
    background: #f44336;
    color: white;
}

#stop-record:hover:not(:disabled) {
    background: #d32f2f;
    transform: scale(1.03);
}

.record-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.divider {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* 文件上传 */
#audio-upload, #video-upload {
    display: none; /* 隐藏原生 input */
}

#upload-btn, #upload-video-btn {
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

#upload-btn:hover, #upload-video-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

#video-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

#export-subtitle-btn {
    background: #2196f3;
}

#export-subtitle-btn:hover {
    background: #1976d2;
}

/* 结果区域 */
.result-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffeb3b;
}

#asr-result {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1.1rem;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.result-section button {
    padding: 8px 16px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}

.result-section button:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .main-asr h2 {
        font-size: 2rem;
    }

    .record-btn {
        padding: 12px 24px;
        font-size: 1.1rem;
    }

    #asr-result {
        min-height: 100px;
        font-size: 1rem;
    }

    .result-section button {
        padding: 7px 14px;
        font-size: 0.9rem;
    }
    
    /* 在小屏幕上将左右布局改为垂直布局 */
    .asr-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .asr-column {
        padding: 15px;
    }
    
    .asr-column h3 {
        font-size: 1.3rem;
    }
}