html, body { width: 100%; height: 100%; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); overflow-x: hidden; } .container { max-width: 800px; margin: 0 auto; padding: 20px; min-height: 100vh; box-sizing: border-box; } h1 { text-align: center; color: white; margin-bottom: 40px; font-size: 2.5rem; font-weight: 300; text-shadow: 0 2px 4px rgba(0,0,0,0.3); } .upload-section, .action-section, .result-section { background: white; border-radius: 12px; padding: 30px; margin-bottom: 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.1); backdrop-filter: blur(10px); } /* 输入按钮区域样式 */ .input-buttons { display: flex; gap: 20px; align-items: stretch; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; } .file-input-wrapper, .record-wrapper { flex: 1; min-width: 200px; text-align: center; } .file-input-wrapper { display: flex; align-items: center; justify-content: center; } .upload-btn, .convert-btn, .stream-convert-btn, .record-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 15px 30px; border-radius: 8px; font-size: 16px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); margin: 0 10px; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; } /* 录制按钮特殊样式 */ .record-btn { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%); box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4); position: relative; overflow: hidden; } .record-btn.recording { background: linear-gradient(135deg, #ff4757 0%, #c44569 100%); animation: recordingPulse 1.5s ease-in-out infinite; } .record-btn.stopping { background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%); cursor: not-allowed; } @keyframes recordingPulse { 0%, 100% { box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4); } 50% { box-shadow: 0 4px 25px rgba(255, 107, 107, 0.8), 0 0 20px rgba(255, 107, 107, 0.3); } } .stream-convert-btn { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4); } .upload-btn:hover, .convert-btn:hover:not(:disabled), .stream-convert-btn:hover:not(:disabled), .record-btn:hover:not(:disabled):not(.recording):not(.stopping) { transform: translateY(-2px); } .record-btn:hover:not(:disabled):not(.recording):not(.stopping) { box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6); } .convert-btn:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6); } .stream-convert-btn:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6); } .convert-btn:disabled, .stream-convert-btn:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; transform: none; } .file-info { margin-top: 20px; } .file-selected, .file-recorded { border-radius: 8px; padding: 20px; text-align: center; } .file-selected { background: #f8f9ff; border: 2px dashed #667eea; } .file-recorded { background: #fff8f8; border: 2px dashed #ff6b6b; } .file-selected p, .file-recorded p { margin: 8px 0; color: #444; } /* 录制状态指示器 */ .record-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; padding: 8px 16px; background: rgba(255, 107, 107, 0.1); border-radius: 20px; color: #ff4757; font-size: 14px; font-weight: 500; } .recording-indicator { width: 8px; height: 8px; background: #ff4757; border-radius: 50%; animation: recordingBlink 1s ease-in-out infinite; } @keyframes recordingBlink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0.3; } } /* 录制区域样式 */ .record-wrapper { display: flex; flex-direction: column; align-items: center; gap: 10px; } .action-section { text-align: center; } .loading { display: flex; align-items: center; justify-content: center; gap: 15px; color: #667eea; font-size: 18px; font-weight: 500; } .spinner { width: 24px; height: 24px; border: 3px solid #f3f3f3; border-top: 3px solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .result h3 { color: #333; margin-bottom: 20px; font-size: 1.5rem; } .result-text { background: #f8f9ff; border-left: 4px solid #667eea; padding: 20px; margin-bottom: 20px; border-radius: 4px; font-size: 16px; line-height: 1.6; } .audio-info h4, .utterances h4 { color: #333; margin-bottom: 15px; font-size: 1.2rem; } .audio-info p { margin: 8px 0; color: #666; } .utterances ul { list-style: none; padding: 0; margin: 0; } .utterances li { background: #f5f5f5; margin-bottom: 10px; padding: 15px; border-radius: 6px; border-left: 3px solid #667eea; } .timestamp { display: inline-block; background: #667eea; color: white; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; margin-right: 10px; } .text { color: #333; line-height: 1.5; } /* 响应式设计 */ @media (max-width: 768px) { .container { padding: 15px; } h1 { font-size: 2rem; margin-bottom: 30px; } .upload-section, .action-section, .result-section { padding: 20px; margin-bottom: 15px; } .upload-btn, .convert-btn, .stream-convert-btn, .record-btn { padding: 12px 24px; font-size: 14px; margin: 5px; display: inline-flex; width: auto; min-width: 120px; } .input-buttons { flex-direction: column; gap: 10px; } .file-input-wrapper, .record-wrapper { min-width: auto; width: 100%; } } /* 头部样式 */ .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; } .header h1 { margin: 0; } .settings-btn { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; backdrop-filter: blur(10px); } .settings-btn:hover { background: rgba(255, 255, 255, 0.3); transform: rotate(15deg); } .settings-btn svg { color: white; } /* 弹窗样式 */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(5px); } .modal-content { background: white; border-radius: 12px; width: 90%; max-width: 500px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); animation: modalSlideIn 0.3s ease-out; } @keyframes modalSlideIn { from { opacity: 0; transform: translateY(-50px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } } .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 24px 0; border-bottom: 1px solid #eee; margin-bottom: 0; padding-bottom: 16px; } .modal-header h2 { margin: 0; color: #333; font-size: 1.5rem; font-weight: 500; } .close-btn { background: none; border: none; font-size: 28px; cursor: pointer; color: #999; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s ease; } .close-btn:hover { background: #f5f5f5; color: #666; } .modal-body { padding: 24px; } .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 8px; color: #333; font-weight: 500; font-size: 14px; } .form-group input { width: 100%; padding: 12px 16px; border: 2px solid #e1e5e9; border-radius: 8px; font-size: 14px; transition: border-color 0.3s ease; box-sizing: border-box; background: #fafbfc; } .form-group input:focus { outline: none; border-color: #667eea; background: white; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } .form-group input::placeholder { color: #999; } .modal-footer { padding: 0 24px 24px; display: flex; gap: 12px; justify-content: flex-end; } .save-btn, .cancel-btn { padding: 12px 24px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; border: none; } .save-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); } .save-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6); } .cancel-btn { background: #f8f9fa; color: #666; border: 1px solid #e1e5e9; } .cancel-btn:hover { background: #e9ecef; } /* 响应式设计扩展 */ @media (max-width: 768px) { .header { flex-direction: column; gap: 20px; text-align: center; } .settings-btn { position: absolute; top: 20px; right: 20px; } .modal-content { width: 95%; margin: 20px; } .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; } .modal-footer { flex-direction: column-reverse; } .save-btn, .cancel-btn { width: 100%; } }