.stt-tool-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #ec4899; --p-text: #0f172a; width: 100%; max-width: 1000px; margin: 0 auto; background: var(--p-bg); border-radius: 20px; padding: 24px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); box-sizing: border-box; }
.stt-header-main { font-size: 1.6rem; font-weight: 800; color: var(--p-text); margin-bottom: 8px; text-align: center; }
.stt-subtitle { color: #64748b; font-size: 0.95rem; padding-bottom: 20px; border-bottom: 1px solid var(--p-border); margin-bottom: 24px; text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.6; }

.stt-layout { display: flex; flex-direction: column; gap: 24px; }

/* 面板通用 */
.stt-panel { display: flex; flex-direction: column; background: #f8fafc; border: 1px solid var(--p-border); border-radius: 16px; overflow: hidden; box-sizing: border-box; }
.stt-panel-title { font-size: 1.05rem; font-weight: 700; color: #334155; padding: 16px 20px; border-bottom: 1px solid var(--p-border); background: #ffffff; margin: 0; }
.stt-panel-body { flex: 1; display: flex; flex-direction: column; }

/* 控制面板 */
.stt-controls-panel { padding: 32px 24px; background: #ffffff; align-items: center; justify-content: center; }
.stt-controls-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 32px; }

.stt-form-group { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.stt-label { font-size: 0.9rem; font-weight: 600; color: #475569; }
.stt-select { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #f8fafc; color: var(--p-text); font-size: 1rem; outline: none; transition: 0.2s; box-sizing: border-box; font-weight: 600; cursor: pointer; }
.stt-select:focus { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15); }

/* 核心麦克风按钮 */
.stt-btn-mic { background: #3b82f6; color: white; border: none; padding: 12px 32px; border-radius: 50px; font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3); position: relative; }
.stt-btn-mic:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4); }
.stt-mic-icon { font-size: 1.4rem; }

/* 录音中的动画状态 */
.stt-btn-mic.recording { background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); animation: stt-pulse 1.5s infinite; }
.stt-btn-mic.recording:hover { transform: none; }
@keyframes stt-pulse {
  0% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  50% { transform: scale(1); box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.stt-status-text { margin-top: 24px; font-size: 0.9rem; color: #64748b; font-weight: 600; transition: color 0.3s; }
.stt-status-text.active { color: #ef4444; }

/* 输出区 */
.stt-textarea { width: 100%; min-height: 450px; height: 100%; padding: 24px; font-size: 1.1rem; line-height: 1.7; color: var(--p-text); background: #ffffff; border: none; outline: none; resize: vertical; box-sizing: border-box; font-family: inherit; }
.stt-textarea:focus { box-shadow: inset 0 0 0 2px rgba(236, 72, 153, 0.2); }

/* 动作按钮 */
.stt-actions { display: flex; gap: 12px; }
.stt-action-btn { padding: 6px 14px; font-size: 0.85rem; font-weight: 600; color: #475569; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 6px; }
.stt-action-btn:hover { background: #e2e8f0; color: #0f172a; }
.stt-action-danger { color: #ef4444; border-color: #fca5a5; background: #fef2f2; }
.stt-action-danger:hover { background: #fee2e2; color: #dc2626; border-color: #f87171; }

/* 状态栏 */
.stt-statusbar { display: flex; justify-content: flex-end; gap: 24px; padding: 12px 20px; background: #f1f5f9; border-top: 1px solid var(--p-border); font-size: 0.85rem; color: #64748b; font-weight: 600; }
.stt-stat-item span { color: var(--p-primary); font-family: monospace; font-size: 0.95rem; margin-left: 4px; }


/* ================= 黑夜模式适配 ================= */
[data-theme="dark"] .stt-tool-wrapper { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .stt-header-main, [data-theme="dark"] .stt-panel-title { color: #f8fafc; }
[data-theme="dark"] .stt-panel { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .stt-controls-panel { background: #0f172a; }
[data-theme="dark"] .stt-panel-title { background: #1e293b; border-bottom-color: #475569; }
[data-theme="dark"] .stt-label { color: #cbd5e1; }
[data-theme="dark"] .stt-select { background: #020617; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .stt-status-text { color: #94a3b8; }
[data-theme="dark"] .stt-status-text.active { color: #f87171; }
[data-theme="dark"] .stt-textarea { background: #020617; color: #f8fafc; }
[data-theme="dark"] .stt-statusbar { background: #1e293b; border-top-color: #475569; color: #94a3b8; }
[data-theme="dark"] .stt-action-btn { background: #334155; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .stt-action-btn:hover { background: #475569; }
[data-theme="dark"] .stt-action-danger { background: rgba(239, 68, 68, 0.1); border-color: #991b1b; color: #f87171; }
[data-theme="dark"] .stt-action-danger:hover { background: rgba(239, 68, 68, 0.2); }