/* ===== V2 全局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  height: 100vh;
  overflow: hidden;
  -webkit-app-region: drag;
}

button, input, select, .subtitle-scroll, .feedback-content, .modal-body {
  -webkit-app-region: no-drag;
}

.hidden { display: none !important; }

/* ===== 洋红闪烁边框（只框字幕区） ===== */
.glow-border {
  display: none;
}

/* ===== 三列布局 ===== */
.layout {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  height: 100vh;
  gap: 0;
}

/* 左栏 */
.panel-left {
  padding: 60px 16px 16px;
  border-right: 1px solid #1a1a1a;
  overflow: hidden;
}

/* 右栏 */
.panel-right {
  padding: 60px 16px 16px;
  border-left: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-title {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #222;
}

.btn-sm {
  padding: 3px 8px;
  font-size: 11px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #1a1a1a;
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-sm:hover {
  background: #333;
  color: #fff;
  border-color: #E5007E;
}

.subtitle-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 0;
  flex-shrink: 0;
}

.subtitle-topbar-right {
  display: flex;
  gap: 4px;
}

.btn-paste-top {
  background: #1a1a1a;
  border-color: #444;
  color: #ccc;
  padding: 5px 12px;
  font-size: 12px;
}

.btn-paste-top:hover {
  border-color: #E5007E;
  color: #fff;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 统计 */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.stat-label { font-size: 13px; color: #666; }
.stat-value { font-size: 18px; font-weight: 600; font-family: "SF Mono", monospace; }
.stat-red { color: #ff6b6b; }
.stat-orange { color: #ffa94d; }
.stat-yellow { color: #ffd43b; }
.stat-green { color: #69db7c; }

/* 实时反馈 */
.feedback-content {
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
}
.feedback-item {
  padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
  color: #ddd;
}
.feedback-item:last-child { border-bottom: none; }
.feedback-item.type-vague { color: #ffd43b; }
.feedback-item.type-filler { color: #888; font-size: 12px; }
.feedback-item.type-hedge { color: #ffa94d; }
.feedback-item.type-ai { color: #fff; }
.feedback-item.type-good { color: #69db7c; }

/* ===== 中间主区域 ===== */
.main-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* 顶栏 */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  padding-top: 36px;
  flex-shrink: 0;
}
.app-title { font-size: 13px; color: #555; letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.timer { font-size: 16px; font-family: "SF Mono", monospace; color: #555; }
.timer.active { color: #E5007E; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }
.btn-icon { background:none; border:none; font-size:18px; cursor:pointer; padding:4px; }

/* 字幕滚动区——关键！ */
.subtitle-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px 20px;
  min-height: 0;
  border: 1.5px solid rgba(229, 0, 126, 0.3);
  border-radius: 12px;
  margin: 0 8px;
  animation: subtitleGlow 3s ease-in-out infinite;
}
@keyframes subtitleGlow {
  0%, 100% { border-color: rgba(229,0,126,0.2); box-shadow: inset 0 0 10px rgba(229,0,126,0.03); }
  50% { border-color: rgba(229,0,126,0.5); box-shadow: inset 0 0 15px rgba(229,0,126,0.06); }
}
.subtitle-container {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.subtitle-line {
  font-size: 26px;
  font-weight: 300;
  line-height: 1.7;
  color: #fff;
  word-break: break-word;
}
.subtitle-line.old { color: #666; font-size: 22px; }
.subtitle-line.hint { color: #444; font-size: 20px; }
.subtitle-line.interim-line { color: #aaa; }

/* 高亮 */
.subtitle-line .filler { color: #ff6b6b; text-decoration: underline wavy; }
.subtitle-line .hedge { color: #ffa94d; }
.subtitle-line .vague { color: #ffd43b; border-bottom: 2px dashed #ffd43b; }

/* 底部按钮栏 */
.action-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  flex-shrink: 0;
}
.btn-main {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 14px; border: none; border-radius: 20px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.2s;
}
.btn-icon-inner { font-size: 13px; }
.btn-label { font-size: 12px; }

.btn-start { background: #E5007E; color: #fff; }
.btn-start:hover { background: #cc006e; transform: scale(1.02); }
.btn-pause { background: #ffa94d; color: #000; }
.btn-pause:hover { background: #e09540; }
.btn-resume { background: #E5007E; color: #fff; }
.btn-resume:hover { background: #cc006e; }
.btn-stop { background: #ff4444; color: #fff; }
.btn-stop:hover { background: #cc3333; }
.btn-report { background: #222; color: #fff; border: 1px solid #E5007E; }
.btn-report:hover { background: #333; }
.btn-copy-text { background: #222; color: #fff; border: 1px solid #444; }
.btn-copy-text:hover { background: #333; border-color: #ffd43b; }
.btn-save-text { background: #222; color: #fff; border: 1px solid #444; }
.btn-save-text:hover { background: #333; border-color: #69db7c; }
.btn-clear { background: #222; color: #888; border: 1px solid #333; }
.btn-clear:hover { background: #333; color: #ff6b6b; border-color: #ff6b6b; }

/* ===== 少女icon ===== */
.girl-icon {
  position: fixed;
  bottom: 16px; right: 16px;
  opacity: 0.4;
  z-index: 50;
  pointer-events: none;
}

/* ===== 报告弹窗 ===== */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-content {
  background: #111;
  border: 1px solid #E5007E;
  border-radius: 16px;
  width: 92%;
  max-width: 800px;
  height: 88vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.btn-close { background:none; border:none; color:#888; font-size:22px; cursor:pointer; }
.btn-close:hover { color:#fff; }
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  font-size: 14px;
  line-height: 1.9;
  color: #ddd;
}
.modal-body h2 { color: #E5007E; margin-top: 20px; margin-bottom: 8px; font-size: 16px; }
.modal-body h3 { color: #fff; margin-top: 14px; font-size: 14px; }
.modal-body blockquote { border-left: 3px solid #E5007E; padding-left: 12px; color: #999; margin: 8px 0; }
.modal-body code { background: #1a1a1a; padding: 2px 6px; border-radius: 4px; color: #E5007E; font-size: 13px; }
.modal-body table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.modal-body th, .modal-body td { border: 1px solid #333; padding: 6px 10px; text-align: left; font-size: 13px; }
.modal-body th { background: #1a1a1a; color: #E5007E; }

/* 滚动条 */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
