/* ===== Base (from reference HTML) ===== */
body { font-family: system-ui, sans-serif; background: #f5f7fa; padding: 40px 20px; color: #333; min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1; }
.container { max-width: 800px; margin: 0 auto; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
h2 { border-bottom: 2px solid #eaeaea; padding-bottom: 10px; margin-top:0; display: flex; justify-content: space-between; align-items: center;}

/* 自动下载开关 */
.auto-dl-wrapper { display: flex; align-items: center; font-size: 14px; color: #555; background: #e8f5e9; padding: 4px 10px; border-radius: 20px; border: 1px solid #c8e6c9; cursor: pointer; }
.auto-dl-wrapper input { margin-right: 6px; cursor: pointer; width: 16px; height: 16px; accent-color: #2e7d32; }

.form-group { margin-bottom: 20px; padding: 15px; background: #fafafa; border-radius: 8px; border: 1px solid #eee; }
label { display: block; margin-bottom: 10px; font-weight: bold; font-size: 14px; color: #444; }
select, input[type="file"] { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; background: white; }

.preset-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.preset-btn { background: #e0f0ff; color: #0066cc; border: 1px solid #b3d4ff; padding: 6px 12px; border-radius: 20px; font-size: 13px; cursor: pointer; transition: 0.2s; }
.preset-btn:hover { background: #0076ff; color: white; }
.preset-btn.active { background: #0076ff; color: white; font-weight: bold; border-color: #005bb5; box-shadow: 0 2px 6px rgba(0,118,255,0.3); }

.slider-container { display: flex; align-items: center; margin-top: 10px; }
.slider-container input[type="range"] { flex: 1; margin: 0 15px 0 0; }
.slider-value { min-width: 60px; font-family: monospace; font-size: 14px; background: #e0f0ff; color: #0066cc; padding: 4px 8px; border-radius: 4px; text-align: center; }
.reset-link { margin-left: 10px; font-size: 12px; color: #888; cursor: pointer; text-decoration: underline; }
button.main-btn { width: 100%; padding: 14px; background: #0076ff; border: none; color: white; font-size: 16px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; }
button.main-btn:disabled { background: #a0cfff; cursor: not-allowed; }

.task-list { margin-top: 20px; }
.task-item { padding: 12px; margin-bottom: 10px; border-radius: 6px; background: #f9f9f9; border: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.task-actions { margin-left: 15px; text-align: right; min-width: 150px; }
.btn-cancel { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-clear { background: #f0f0f0; border: 1px solid #ddd; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; margin-left: 5px; }
.status-queued { color: #f57c00; font-size: 13px;}
.status-loading { color: #0288d1; font-size: 13px;}
.status-success { color: #2e7d32; font-weight: bold; font-size: 13px;}
.status-error { color: #c62828; font-weight: bold; font-size: 13px;}
.error-details { display: block; font-size: 12px; color: #d32f2f; margin-top: 5px; font-weight: normal; }
.strong-copyright { margin-top: 30px; padding-top: 20px; border-top: 2px dashed #ddd; text-align: center; font-size: 15px; font-weight: bold; color: #555; letter-spacing: 1px; }
.strong-copyright span { color: #0076ff; }

/* ===== Extensions ===== */
.row-actions { display: flex; gap: 6px; }
.mini-btn { border: 1px solid #b3d4ff; background: #e0f0ff; color: #0066cc; border-radius: 4px; padding: 3px 8px; font-size: 12px; cursor: pointer; }
.mini-btn:hover { background: #0076ff; color: #fff; }
.mini-btn.preview { border-color: #c8e6c9; background: #e8f5e9; color: #2e7d32; }
.mini-btn.preview:hover { background: #2e7d32; color: #fff; }

#timelineWrap { margin-top: 10px; }
#timelineTable { width: 100%; border-collapse: collapse; font-size: 13px; }
#timelineTable th, #timelineTable td { border: 1px solid #eaeaea; padding: 6px; vertical-align: top; text-align: left; }
#timelineTable th { background: #f0f6ff; color: #005bb5; font-weight: 600; }
#timelineTable textarea, #timelineTable input[type="text"] { width: 100%; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; padding: 5px; font-size: 13px; font-family: inherit; resize: vertical; }
#timelineTable .col-idx { width: 36px; text-align: center; }
#timelineTable .col-time { width: 110px; font-family: monospace; font-size: 12px; color: #555; white-space: nowrap; }
#timelineTable .col-act { width: 150px; }
#timelineTable .manual-flag { color: #c62828; font-size: 11px; margin-left: 6px; }
#timelineTable .src-view { background: #f7f7f7; color: #666; border-radius: 4px; padding: 6px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }

#parseStatus { font-size: 13px; margin-top: 8px; min-height: 18px; }
#parseStatus.warn { color: #f57c00; }
#parseStatus.err { color: #c62828; }
#parseStatus.ok { color: #2e7d32; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }

.copyright-box { background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
.copyright-box p { margin: 0 0 10px; font-size: 13px; color: #555; line-height: 1.6; }
.copyright-box label { display: flex; align-items: center; font-weight: 600; color: #b26a00; cursor: pointer; }
.copyright-box input { width: 18px; height: 18px; margin-right: 8px; accent-color: #f57c00; }

.hint { font-size: 12px; color: #888; margin-top: 4px; }
.file-row { display: flex; gap: 12px; }
.file-row > div { flex: 1; }

/* ===== Batch translate progress bar ===== */
.translate-progress { position: relative; flex: 1; max-width: 260px; height: 20px;
  background: #eef1f5; border-radius: 10px; overflow: hidden; display: none; }
.translate-progress-fill { height: 100%; background: linear-gradient(90deg, #4a90d9, #35c26b);
  border-radius: 10px; transition: width .2s ease; }
.translate-progress-text { position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; font-size: 11px; color: #333; }
