:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --border: #2a2f3a;
  --text: #e6e8ee;
  --muted: #8b92a3;
  --accent: #4f7cff;
  --accent-2: #7c5cff;
  --green: #2fbf71;
  --red: #e5534b;
  --yellow: #d8a13a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.container {
  width: calc(100% - 48px);
  max-width: 1600px;  /* 自适应拉宽，超宽屏不至于太散 */
  margin: 0 auto;
  padding: 24px 0 64px;
}
.header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.header h1 { font-size: 22px; margin: 0; }
.header h1 .logo { color: var(--accent); }
.muted { color: var(--muted); }
a { color: var(--accent); text-decoration: none; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; cursor: pointer; transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.secondary { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.btn.danger { background: var(--red); }
.btn.green { background: var(--green); }
input[type="text"] {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 12px; font-size: 14px; width: 260px;
}
input[type="text"]:focus { outline: none; border-color: var(--accent); }

.badge {
  display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 99px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--border);
}
.badge.recording { color: var(--red); border-color: var(--red); }
.badge.done { color: var(--green); border-color: var(--green); }
.badge.generating { color: var(--yellow); border-color: var(--yellow); }
.badge.error { color: var(--red); border-color: var(--red); }

.meeting-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meeting-item .title { font-size: 16px; font-weight: 600; }
.meeting-item .meta { font-size: 13px; margin-top: 4px; }

/* 会议详情页 */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 14px;
  align-items: stretch;  /* 两栏卡片等高 */
}
/* 左栏：对话卡片撑满高度 */
.subtitles-card { display: flex; flex-direction: column; }
.subtitles-card .subtitles {
  flex: 1;
  max-height: none;
  min-height: 420px;
  position: relative;
}
.subtitles-card .empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 380px;
}
/* 右栏：卡片与左栏等高，内容 sticky 吸附顶部，滚动时球始终在视野内 */
.recorder { padding: 0; }
.recorder-inner {
  position: sticky; top: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 16px;
  gap: 10px;
  min-height: 460px;
}
#orb { display: block; }
.rec-status { font-size: 13px; min-height: 18px; text-align: center; }
.controls { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 860px) {
  .main-grid { grid-template-columns: 1fr; }
  .recorder { order: -1; }
}

.subtitles { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.line { padding: 10px 14px; background: var(--panel-2); border-radius: 10px; }
.line .time { font-size: 11px; color: var(--muted); margin-right: 8px; }
.line .orig { font-size: 14px; color: var(--muted); }
.line .trans { font-size: 15px; margin-top: 3px; }
.line .trans:empty { display: none; }
/* 流式输入光标 */
.line.typing-orig .orig::after,
.line.typing-trans .trans::after {
  content: "▍";
  color: var(--accent);
  animation: blink 0.9s infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.record-md h2 {
  font-size: 17px; margin: 22px 0 10px; padding-left: 10px;
  border-left: 3px solid var(--accent);
}
.record-md h3 { font-size: 15px; margin: 14px 0 6px; color: var(--accent-2); }
.record-md p, .record-md li { font-size: 14px; line-height: 1.8; }
.record-md ul, .record-md ol { padding-left: 22px; }
.record-md li.task { list-style: none; }
.record-md code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
audio { width: 100%; margin-top: 6px; }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }
.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid var(--muted);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
