* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0e1a;
  --panel: rgba(255,255,255,.06);
  --panel-strong: rgba(255,255,255,.1);
  --line: rgba(255,255,255,.08);
  --muted: #6b7280;
  --cyan: #22d3ee;
  --purple: #8b5cf6;
  --blue: #3b82f6;
}
html, body { width: 100%; height: 100%; }
body {
  overflow: hidden;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e7eb;
  background: var(--bg);
}
button, input, textarea { font: inherit; min-width: 0; }
button { border: 0; cursor: pointer; }
img, video { max-width: 100%; display: block; }

/* ===== 通用 ===== */
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.muted { color: var(--muted); }
.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-w-0 { min-width: 0; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-cyan-300 { color: #67e8f9; }
.text-cyan-200 { color: #a5f3fc; }
.text-blue-400 { color: #60a5fa; }
.text-purple-300 { color: #c4b5fd; }
.text-red-300 { color: #fca5a5; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.text-center { text-align: center; }
.cursor-pointer { cursor: pointer; }
.w-full { width: 100%; }
.space-y-3 > * + * { margin-top: 12px; }
.leading-5 { line-height: 1.25rem; }
.leading-6 { line-height: 1.5rem; }
.leading-7 { line-height: 1.75rem; }
.leading-8 { line-height: 2rem; }

/* ===== 标签 ===== */
.tag-blue {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.25);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
}

/* ===== 状态标签 ===== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.2);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== 进度条 ===== */
.progress-rail {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
  transition: width .3s ease;
}

/* ===== 按钮 ===== */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #9ca3af;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  transition: all .2s;
}
.icon-btn:hover { color: white; background: rgba(255,255,255,.12); }
.icon-btn i { font-size: 14px; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  color: #d1d5db;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 700;
  transition: all .2s;
}
.chip-btn:hover { color: white; background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.3); }
.chip-btn i { font-size: 13px; }

.mini-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.15);
  font-size: 12px;
}
.mini-btn:hover { background: rgba(0,0,0,.6); }

.control-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
  transition: all .2s;
}
.control-btn:hover { color: white; background: rgba(255,255,255,.12); }
.control-btn.active { color: var(--cyan); border-color: rgba(34,211,238,.3); }
.control-btn.primary {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border: none;
  font-size: 18px;
  box-shadow: 0 0 20px rgba(139,92,246,.3);
}
.control-btn.primary:hover { box-shadow: 0 0 28px rgba(139,92,246,.5); }

/* ===== 开关 ===== */
.switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  right: 2px;
  top: 2px;
  border-radius: 999px;
  background: white;
  transition: right .2s;
}
.switch.off { background: rgba(255,255,255,.15); }
.switch.off::after { right: 18px; }

/* ===== 搜索框 ===== */
.search-box {
  height: 28px;
  width: 100px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: white;
  padding: 0 8px;
  font-size: 12px;
  outline: none;
}
.search-box::placeholder { color: var(--muted); }
.search-box:focus { border-color: rgba(59,130,246,.4); }

/* ===== 评分环 ===== */
.score-ring {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: conic-gradient(#22d3ee 0 86%, rgba(255,255,255,.1) 86% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.score-ring span {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: #67e8f9;
  font-size: 16px;
  font-weight: 900;
}

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.6);
}
.modal.show { display: flex; }
.modal-card {
  width: min(520px, 100%);
  border-radius: 20px;
  padding: 20px;
}
.field {
  width: 100%;
  min-height: 100px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: white;
  padding: 12px;
  outline: none;
  resize: vertical;
  font-size: 14px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 70;
  max-width: 320px;
  border-radius: 12px;
  padding: 10px 14px;
  display: none;
  font-size: 13px;
  font-weight: 600;
}
.toast.show { display: block; }

/* ========================================
   Pad 横屏 (1024x1366)
   ======================================== */
.app-shell {
  display: grid;
  grid-template-columns: 80px 1fr;
  height: 100vh;
  height: 100dvh;
  gap: 0;
}

/* 侧边栏 */
.side-wrap {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 12px;
  background: rgba(10,14,26,.95);
  border-right: 1px solid var(--line);
}
.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  text-decoration: none;
  color: white;
}
.logo-mark { width: 32px; height: 32px; }
.brand-text { font-size: 11px; font-weight: 900; color: white; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 4px;
  border-radius: 12px;
  background: transparent;
  border: none;
  backdrop-filter: none;
}
.side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  border-radius: 10px;
  color: #9ca3af;
  background: transparent;
  border: none;
  font-size: 10px;
  font-weight: 700;
  transition: all .2s;
  position: relative;
}
.side-btn i { font-size: 16px; }
.side-btn:hover { color: white; background: rgba(255,255,255,.08); }
.side-btn.active {
  color: white;
  background: rgba(59,130,246,.15);
}
.side-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--blue);
}
.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  font-size: 10px;
  font-weight: 900;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 12px;
  margin-top: auto;
}
.side-user img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
}
.side-user-info {
  flex: 1;
  min-width: 0;
}
.side-user-name {
  font-size: 11px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-user-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.side-progress-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.side-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
}
.side-progress-text {
  font-size: 9px;
  color: var(--muted);
  flex-shrink: 0;
}

/* 主内容区 */
.main {
  display: grid;
  grid-template-rows: 48px 1fr 64px;
  min-height: 0;
  overflow: hidden;
}

/* 顶部栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.25);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-title {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.topbar-progress-label {
  font-size: 11px;
  color: var(--muted);
}
.topbar-progress-rail {
  width: 80px;
}
.topbar-progress-value {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.topbar-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
  transition: all .2s;
}
.topbar-btn:hover { color: white; background: rgba(255,255,255,.12); }
.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: 2px solid rgba(255,255,255,.15);
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 工作区 */
.workspace {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

/* 左侧内容区 */
.left-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}
.left-content::-webkit-scrollbar { width: 4px; }
.left-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* 视频区域 */
.video-section {
  flex-shrink: 0;
}
.video-card {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-subtitle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 56px;
  text-align: center;
  z-index: 3;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
  max-width: 90%;
}
.video-subtitle-en { font-size: 16px; line-height: 1.5; font-weight: 700; color: white; }
.video-subtitle-zh { color: rgba(255,255,255,.8); font-size: 13px; margin-top: 2px; }
.video-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}
.video-ctrl-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.15);
  font-size: 12px;
  flex-shrink: 0;
}
.video-ctrl-btn:hover { background: rgba(0,0,0,.6); }
.video-progress-wrap { flex: 1; min-width: 0; }
.video-progress-rail { height: 4px; }
.video-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  margin-top: 4px;
}
.video-time-sep { color: rgba(255,255,255,.4); }
.video-ctrl-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 当前句子卡片 */
.current-sentence-card {
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.current-sentence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.current-sentence-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.current-sentence-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sentence-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 600;
  transition: all .2s;
}
.sentence-action-btn:hover { color: white; background: rgba(255,255,255,.12); }
.sentence-action-btn i { font-size: 12px; }
.current-sentence-en {
  font-size: 14px;
  line-height: 1.6;
  color: white;
}
.current-sentence-zh {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.5;
}

/* AI 分析区域 */
.ai-analysis-section {
  margin-top: 10px;
  flex-shrink: 0;
}
.ai-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ai-analysis-title {
  font-size: 14px;
  font-weight: 900;
  color: white;
}
.ai-analysis-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-action-btn {
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 600;
  transition: all .2s;
}
.ai-action-btn:hover { color: white; background: rgba(255,255,255,.12); }
.ai-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* AI 分析网格 */
.ai-analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ai-card {
  border-radius: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.ai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ai-card-title {
  font-size: 12px;
  font-weight: 700;
  color: white;
}
.ai-card-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.25);
  color: #93c5fd;
  font-size: 10px;
  font-weight: 700;
}
.ai-card-content {
  flex: 1;
  margin-bottom: 8px;
}
.ai-card-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.ai-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  color: var(--blue);
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  transition: color .2s;
}
.ai-card-link:hover { color: #60a5fa; }
.ai-card-link i { font-size: 12px; }

/* 词汇项 */
.vocab-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.vocab-word {
  font-size: 13px;
  font-weight: 700;
  color: #67e8f9;
}
.vocab-phonetic {
  font-size: 11px;
  color: var(--muted);
}

/* 评分卡片 */
.ai-score-card {
  align-items: center;
  text-align: center;
}
.score-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* 右侧面板 */
.right-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: rgba(10,14,26,.5);
  min-height: 0;
}
.right-tabs {
  display: flex;
  height: 40px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all .2s;
}
.tab-btn:hover { color: white; }
.tab-btn.active { color: white; border-bottom-color: var(--blue); }
.tab-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  display: none;
}
.tab-content.active { display: block; }
.tab-content::-webkit-scrollbar { width: 4px; }
.tab-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* 字幕列表 */
.subtitle-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subtitle-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #d1d5db;
  transition: background .2s;
}
.subtitle-item:hover { background: rgba(255,255,255,.06); }
.subtitle-item.active {
  background: rgba(59,130,246,.12);
  border-left: 3px solid var(--blue);
}
.sub-index {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  min-width: 20px;
  padding-top: 2px;
}
.sub-body { flex: 1; min-width: 0; }
.sub-time { font-size: 11px; color: var(--muted); }
.sub-en { font-size: 13px; line-height: 1.5; color: white; margin-top: 2px; }
.sub-zh { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sub-play {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: none;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 2px;
}
.sub-play:hover { color: white; background: rgba(255,255,255,.12); }

/* AI 解析详情 */
.analysis-detail {
  padding: 8px;
}
.analysis-detail-card {
  border-radius: 10px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.analysis-detail-title {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}
.analysis-detail-keyword {
  font-size: 12px;
  color: #67e8f9;
  font-weight: 700;
}
.analysis-detail-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 4px;
}
.analysis-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  color: var(--blue);
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

/* 笔记空状态 */
.notes-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
}

/* 底部播放器 */
.bottom-player {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}
.player-track {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.player-thumb {
  width: 56px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.player-track-info {
  min-width: 0;
}
.player-track-title {
  font-size: 12px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-track-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.player-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
  transition: all .2s;
}
.player-btn:hover { color: white; background: rgba(255,255,255,.12); }
.player-btn-play {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border: none;
  font-size: 18px;
  box-shadow: 0 0 20px rgba(139,92,246,.3);
}
.player-btn-play:hover { box-shadow: 0 0 28px rgba(139,92,246,.5); }
.player-extra {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}
.player-speed {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.volume-slider {
  width: 80px;
  accent-color: var(--purple);
}
.lang-btn {
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 600;
  transition: all .2s;
}
.lang-btn:hover { color: white; background: rgba(255,255,255,.12); }

/* ===== 字幕操作栏（默认隐藏，仅移动端显示） ===== */
.subtitle-actions-bar {
  display: none;
}

/* ===== 移动端操作栏（默认隐藏，仅移动端媒体查询中显示） ===== */
.mobile-actions-bar {
  display: none;
}

/* ===== 顶部栏品牌（默认隐藏，仅移动端显示） ===== */
.topbar-brand {
  display: none;
}

/* ===== 移动端底部导航 ===== */
.mobile-nav {
  display: none;
}

/* ========================================
   Pad 竖屏 (768x1024)
   ======================================== */
@media (max-width: 1024px) and (orientation: portrait) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  /* 顶部导航栏 */
  .side-wrap {
    flex-direction: row;
    padding: 8px 12px;
    gap: 8px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    background: rgba(10,14,26,.95);
  }
  .brand-card {
    flex-direction: row;
    padding: 0;
    gap: 6px;
  }
  .logo-mark { width: 24px; height: 24px; }
  .brand-text { font-size: 13px; }
  .sidebar {
    flex-direction: row;
    gap: 2px;
    padding: 0;
    overflow-x: auto;
    flex: 1;
  }
  .side-btn {
    flex-direction: row;
    padding: 8px 12px;
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
  }
  .side-btn i { font-size: 14px; }
  .side-btn.active::before { display: none; }
  .side-btn.active { border-radius: 8px; }
  .side-user { display: none; }
  .badge { top: -2px; right: -2px; }

  /* 主内容 */
  .main {
    grid-template-rows: 44px 1fr 56px;
  }

  /* 顶部栏 */
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .topbar-title { font-size: 12px; }
  .topbar-progress-rail { width: 60px; }
  .topbar-progress-label { display: none; }

  /* 工作区 */
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  /* 左侧 */
  .left-content {
    padding: 8px;
    gap: 8px;
  }

  /* 视频 */
  .video-card { border-radius: 10px; }
  .video-subtitle-en { font-size: 14px; }
  .video-subtitle-zh { font-size: 12px; }

  /* 当前句子 */
  .current-sentence-card { margin-top: 0; padding: 10px 12px; }
  .current-sentence-en { font-size: 13px; }

  /* AI 分析 */
  .ai-analysis-section { margin-top: 0; }
  .ai-analysis-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .score-ring { width: 44px; height: 44px; }
  .score-ring span { width: 34px; height: 34px; font-size: 14px; }

  /* 右侧面板 */
  .right-panel {
    border-left: none;
    border-top: 1px solid var(--line);
    max-height: 45vh;
  }

  /* 底部播放器 */
  .bottom-player {
    padding: 0 12px;
    gap: 10px;
  }
  .player-thumb { width: 48px; height: 28px; }
  .player-btn { width: 28px; height: 28px; font-size: 12px; }
  .player-btn-play { width: 38px; height: 38px; font-size: 16px; }
  .player-controls { gap: 6px; }
  .player-extra { gap: 8px; }
  .volume-slider { width: 60px; }
}

/* ========================================
   移动端 (390x844)
   ======================================== */
@media (max-width: 768px) {
  /* 移动端自定义页面大小容器 */
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    max-width: 430px;
    margin: 0 auto;
    position: relative;
  }
  body {
    background: #000;
  }
  .app-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: -1;
  }

  /* 隐藏侧边栏 */
  .side-wrap { display: none; }

  /* 主内容 */
  .main {
    grid-template-rows: auto 1fr auto auto;
  }

  /* 顶部栏 - Logo + 课程名 */
  .topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: rgba(10,14,26,.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .topbar-brand {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }
  .topbar-logo {
    width: 20px;
    height: 20px;
  }
  .topbar-brand-name {
    font-size: 13px;
    font-weight: 900;
    color: white;
    white-space: nowrap;
  }
  .topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }
  .topbar-status {
    padding: 2px 8px;
    font-size: 10px;
  }
  .topbar-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar-right { display: none; }

  /* 工作区 */
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    overflow: hidden;
  }

  /* 移动端底部导航（移到工作区顶部） */
  .mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: rgba(10,14,26,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-shrink: 0;
  }
  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: var(--muted);
    background: transparent;
    border: none;
    font-size: 10px;
    font-weight: 700;
    position: relative;
    transition: color .2s;
    gap: 2px;
  }
  .mobile-nav-btn i { font-size: 16px; }
  .mobile-nav-btn.active { color: white; }
  .mobile-nav-btn.active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    border-radius: 1px;
    background: var(--blue);
  }
  .mobile-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    font-size: 9px;
    font-weight: 900;
  }

  /* 视频区域 - 16:9 固定比例 */
  .video-section {
    flex-shrink: 0;
    padding: 0;
  }
  .video-card {
    border-radius: 0;
    border: none;
    background: #000;
    backdrop-filter: none;
  }
  .video-frame {
    aspect-ratio: 16 / 9;
    border-radius: 0;
    background: #000;
  }
  .video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .video-subtitle {
    bottom: 48px;
    left: 12px;
    right: 12px;
    transform: none;
  }
  .video-subtitle-en { font-size: 13px; }
  .video-subtitle-zh { font-size: 11px; }

  /* 移动端：隐藏当前句子卡片 */
  .current-sentence-card { display: none; }

  /* 移动端：隐藏左侧 AI 分析区域 */
  .ai-analysis-section { display: none; }

  /* 右侧面板 - 移动端作为主要内容区 */
  .right-panel {
    border-left: none;
    border-top: 1px solid var(--line);
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 96px; /* 播放器 + 操作栏高度 */
  }
  .right-tabs { height: 40px; flex-shrink: 0; }
  .tab-btn { font-size: 13px; }
  .tab-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 12px;
  }

  /* 移动端：字幕列表默认显示 5 排，超过可滑动 */
  .subtitle-list {
    max-height: none;
    overflow-y: auto;
    gap: 2px;
    flex: 1;
    min-height: 0;
    padding-bottom: 100px;
  }
  .subtitle-list.expanded {
    max-height: none;
  }
  .subtitle-item {
    padding: 6px 8px;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
  }
  .sub-index {
    min-width: 16px;
    font-size: 10px;
    padding-top: 1px;
  }
  .sub-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .sub-time {
    font-size: 10px;
    order: 1;
    align-self: flex-end;
    margin-left: auto;
  }
  .sub-en {
    font-size: 12px;
    line-height: 1.4;
    margin-top: 1px;
    order: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sub-zh {
    font-size: 11px;
    margin-top: 1px;
    order: 2;
  }
  .sub-play {
    display: none;
  }

  /* 底部播放器 - 固定在底部 */
  .bottom-player {
    position: fixed;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    padding: 0 12px;
    gap: 8px;
    z-index: 20;
    background: rgba(10,14,26,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .player-track { display: none; }
  .player-controls { flex: 1; justify-content: center; }
  .player-btn { width: 28px; height: 28px; font-size: 12px; }
  .player-btn-play { width: 36px; height: 36px; font-size: 16px; }
  .player-extra { display: none; }

  /* 移动端操作栏 - 固定在底部 */
  .mobile-actions-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    padding: 8px 5px;
    border-top: 1px solid var(--line);
    flex-shrink: 0;
    background: rgba(10,14,26,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 21;
  }
  .mobile-actions-left {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .mobile-actions-right {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .action-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 8px;
    border-radius: 6px;
    color: var(--muted);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    font-size: 11px;
    font-weight: 600;
    transition: all .2s;
    white-space: nowrap;
  }
  .action-chip:hover { color: white; background: rgba(255,255,255,.12); }
  .action-chip i { font-size: 12px; }
  .action-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
  }
}
