/* ==========================================================================
   火山引擎 AI 教育智能学习 H5 - 现代化移动端 UI 设计系统 (极致美感精细版)
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --primary-glow: rgba(79, 70, 229, 0.28);
  
  --secondary: #06b6d4;
  --accent: #8b5cf6;
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  
  --bg-main: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(226, 232, 240, 0.85);
  
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px -1px rgba(0, 0, 0, 0.08), 0 2px 5px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 30px -4px rgba(15, 23, 42, 0.08), 0 6px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.35);

  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background: radial-gradient(circle at top left, #1e1b4b 0%, #0f172a 60%, #020617 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  line-height: 1.5;
}

/* PC 端模拟手机壳容器，移动端全屏铺满 */
.phone-viewport {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  max-height: 920px;
  background: var(--bg-main);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7);
  transition: all 0.3s ease;
}

@media (min-width: 500px) {
  .phone-viewport {
    border-radius: 44px;
    height: 94vh;
    border: 9px solid #1e293b;
    box-shadow: 0 0 0 2px #334155, 0 30px 70px -10px rgba(0, 0, 0, 0.8);
  }
}

/* ==========================================================================
   移动端仿真顶部状态栏与灵动岛 (Dynamic Island)
   ========================================================================== */
.phone-status-bar {
  background: #4338ca;
  color: white;
  padding: 8px 22px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  z-index: 25;
  user-select: none;
}

.status-time {
  letter-spacing: 0.3px;
}

/* 灵动岛药丸 */
.dynamic-island {
  background: #000000;
  color: white;
  height: 22px;
  padding: 0 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.dynamic-island:hover {
  transform: scale(1.05);
}

.island-icon {
  font-size: 11px;
  animation: pulse 1.5s infinite;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* 顶部品牌导航栏 */
.app-header {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  color: white;
  padding: 12px 18px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.3);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
}

.brand-logo::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.8) 50%, transparent 60%);
  animation: shineLogo 4s infinite;
}

@keyframes shineLogo {
  0% { transform: translateX(-100%); }
  25%, 100% { transform: translateX(100%); }
}

.brand-info h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.brand-info .brand-badge {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.brand-badge:hover {
  background: rgba(255, 255, 255, 0.32);
}

.brand-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

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

.icon-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   大模型思考模式切换顶栏 (对标火山引擎/豆包思考模式)
   ========================================================================== */
.thinking-mode-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 30;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.mode-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-location-icon {
  font-size: 14px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.mode-capsule:hover, .mode-capsule:active {
  background: #e2e8f0;
}

.mode-capsule.active {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.capsule-icon {
  font-size: 14px;
  line-height: 1;
}

.capsule-text {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.capsule-arrow {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.25s ease;
  margin-left: 2px;
}

.mode-capsule.open .capsule-arrow {
  transform: rotate(180deg);
}

.mode-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-shortcut-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-shortcut-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.mode-shortcut-btn.active {
  color: #4f46e5;
  background: #eef2ff;
  font-weight: 700;
}

/* 思考模式下拉菜单卡片 (1:1 还原用户发来的截图) */
.thinking-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 12px;
  right: 12px;
  background: #ffffff;
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.95);
  z-index: 100;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.thinking-dropdown-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.dropdown-item:hover, .dropdown-item:active {
  background: #f8fafc;
}

.dropdown-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-item-header .item-icon {
  font-size: 16px;
  line-height: 1;
  width: 20px;
  text-align: center;
}

.dropdown-item-header .item-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
}

.dropdown-item-header .item-check {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.dropdown-item.active .dropdown-item-header .item-check {
  opacity: 1;
}

.dropdown-item-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  padding-left: 30px;
  line-height: 1.4;
}

/* 主内容视区 (Tabs 内容区) */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: calc(84px + var(--safe-bottom));
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.content-area::-webkit-scrollbar {
  width: 4px;
}
.content-area::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.6);
  border-radius: 4px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 卡片与玻璃拟态效果 */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title-icon {
  margin-right: 6px;
  font-size: 16px;
}

/* 按钮设计系统 */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.32);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.btn-primary:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:active {
  background: #e2e8f0;
}

/* ==========================================================================
   Tab 1: 作业批改模块样式精细化
   ========================================================================== */
.upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.upload-box:hover {
  border-color: var(--primary);
  background: #f5f3ff;
}

.upload-icon {
  font-size: 38px;
  color: var(--primary);
  margin-bottom: 8px;
  animation: bounceSlow 2.5s infinite;
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.upload-tip {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.upload-subtip {
  font-size: 11px;
  color: var(--text-muted);
}

/* 批改中 Loading 态样式 */
.upload-box.is-loading {
  border: 2px solid #818cf8;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 50%, #faf5ff 100%);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.16);
  cursor: wait;
}

.hw-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

.hw-scan-container {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.hw-scan-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #818cf8;
  opacity: 0.6;
  animation: hwPulseWave 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.hw-scan-pulse-ring.delay {
  animation-delay: 0.7s;
}

@keyframes hwPulseWave {
  0% { transform: scale(0.65); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.hw-scan-core {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  overflow: hidden;
}

.hw-scan-icon {
  font-size: 22px;
  z-index: 2;
  animation: hwIconSpin 2.5s ease-in-out infinite alternate;
}

@keyframes hwIconSpin {
  0% { transform: scale(0.92) rotate(-5deg); }
  100% { transform: scale(1.08) rotate(5deg); }
}

.hw-scan-laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #ffffff, #38bdf8, transparent);
  box-shadow: 0 0 6px #38bdf8;
  z-index: 3;
  animation: hwScanLaser 1.5s ease-in-out infinite;
}

@keyframes hwScanLaser {
  0% { top: 0; opacity: 0.2; }
  50% { top: 44px; opacity: 1; }
  100% { top: 0; opacity: 0.2; }
}

.hw-loading-title {
  font-size: 14px;
  font-weight: 700;
  color: #312e81;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}

.hw-loading-step-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 3px 12px;
  font-size: 11px;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hw-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 6px #6366f1;
  animation: hwDotBlink 1.2s infinite;
}

@keyframes hwDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hw-loading-bar-wrap {
  width: 160px;
  height: 4px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 10px;
}

.hw-loading-bar-fill {
  height: 100%;
  width: 40%;
  border-radius: 4px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #38bdf8);
  animation: hwProgressSweep 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes hwProgressSweep {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(120%); }
  100% { transform: translateX(300%); }
}

.quick-samples {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.sample-tag {
  background: #ede9fe;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid rgba(79, 70, 229, 0.2);
  transition: all 0.2s;
}

.sample-tag:hover {
  background: #ddd6fe;
}
.sample-tag:active {
  background: var(--primary);
  color: white;
}

/* 标注层工具条 (切换显示全部/仅错题/原图) */
.layer-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 2px 4px;
}

.filter-segments {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 20px;
  padding: 2px;
}

.filter-seg-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-seg-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.zoom-controls {
  display: flex;
  gap: 4px;
}

.zoom-btn {
  background: white;
  border: 1px solid var(--card-border);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

/* 批改画布与图像容器 */
.correction-canvas-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  display: none;
  cursor: crosshair;
}

.correction-canvas-container img {
  width: 100%;
  display: block;
}

.correction-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* 批改结果统计条 */
.stat-pills-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stat-pill {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-pill .num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-pill .label {
  font-size: 10px;
  color: var(--text-muted);
}

.stat-pill.success .num { color: var(--success); }
.stat-pill.error .num { color: var(--error); }
.stat-pill.warning .num { color: var(--warning); }
.stat-pill.primary .num { color: var(--primary); }

/* 题目批改卡片列表 */
.question-item-card {
  background: white;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.question-item-card:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
}

.question-item-card.correct { border-left-color: var(--success); }
.question-item-card.wrong { border-left-color: var(--error); background: #fff5f5; }
.question-item-card.half { border-left-color: var(--warning); background: #fffdf5; }

.q-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.q-title {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  line-height: 1.45;
  color: var(--text-main);
}

.q-tag {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 1px;
}

.q-tag.correct { background: var(--success-bg); color: var(--success); }
.q-tag.wrong { background: var(--error-bg); color: var(--error); }
.q-tag.half { background: var(--warning-bg); color: var(--warning); }

.q-body {
  font-size: 12px;
  color: var(--text-sub);
}

/* 知识点掌握度进度条 */
.skill-bar-row {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-bar-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-sub);
}

.skill-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

/* ==========================================================================
   Tab 2: 拍题答疑模块样式与激光扫描光效
   ========================================================================== */
.crop-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1e293b;
  margin-bottom: 12px;
}

.crop-wrapper img {
  width: 100%;
  display: block;
}

/* 激光科技扫描线 */
.laser-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #38bdf8 50%, transparent 100%);
  box-shadow: 0 0 12px #38bdf8, 0 0 20px #0284c7;
  display: none;
  z-index: 10;
  pointer-events: none;
}

.laser-scan-line.scanning {
  display: block;
  animation: scanLaser 2.2s infinite ease-in-out;
}

@keyframes scanLaser {
  0% { top: 0%; opacity: 0.2; }
  50% { top: 96%; opacity: 1; }
  100% { top: 0%; opacity: 0.2; }
}

.crop-box-selector {
  position: absolute;
  border: 2px solid #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  cursor: move;
  border-radius: 4px;
  transition: border-color 0.2s;
  z-index: 5;
}

/* 四个角 L 型准星 */
.crosshair-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 3px solid #38bdf8;
}

.crosshair-corner.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.crosshair-corner.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.crosshair-corner.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.crosshair-corner.br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.crop-tag-pill {
  position: absolute;
  top: -24px;
  left: 0;
  background: #38bdf8;
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   拍题答疑：答题卡矩阵题号选择器 (无横移、无滚动条、自适应平铺)
   ========================================================================== */
.qa-question-nav-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.current-q-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}

.q-nav-arrow-btn {
  background: white;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: all 0.2s;
  white-space: nowrap;
}

.q-nav-arrow-btn:hover:not(:disabled) {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}

.q-nav-arrow-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f1f5f9;
}

.current-q-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.q-num-pill {
  background: #4f46e5;
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.q-kp-text {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 题号矩阵网格：整齐平铺无横向滚动条 */
.qa-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
}

.matrix-q-btn {
  background: white;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.matrix-q-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.matrix-q-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  border-color: transparent;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
  transform: scale(1.05);
}

/* 解题流式打字机区域 */
.stream-solution-box {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  min-width: 0;
  margin-top: 14px;
  display: none;
}

.stream-solution-box.active {
  display: block;
}

.solution-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.solution-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #eef2ff;
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.solution-step-card {
  background: #f8fafc;
  border-left: 3px solid #6366f1;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.step-title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--primary);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   Tab 3: 学习监督与 veRTC 伴学模块样式
   ========================================================================== */
.supervision-camera-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #020617;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}

.camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* 镜像翻转前置摄像头 */
}

/* AI 伴学老师画中画浮窗 */
.ai-teacher-pip {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 90px;
  height: 114px;
  background: linear-gradient(145deg, #1e1b4b, #312e81);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-teacher-pip:hover {
  transform: scale(1.05);
}

.ai-avatar {
  font-size: 38px;
  margin-bottom: 2px;
  animation: floatAvatar 3s ease-in-out infinite;
}

@keyframes floatAvatar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.ai-status-text {
  font-size: 10px;
  color: #a5b4fc;
}

/* 老师讲话气泡 */
.teacher-speech-bubble {
  position: absolute;
  bottom: 50px;
  left: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: none;
  animation: fadeIn 0.3s ease-out;
  z-index: 15;
}

/* 音频动效跳动波形条 */
.audio-visualizer-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.audio-bar {
  width: 3px;
  background: #38bdf8;
  border-radius: 2px;
  height: 4px;
  transition: height 0.1s ease;
}

.audio-visualizer-bar.active .audio-bar:nth-child(1) { animation: wave 0.8s infinite 0.1s; }
.audio-visualizer-bar.active .audio-bar:nth-child(2) { animation: wave 0.8s infinite 0.3s; }
.audio-visualizer-bar.active .audio-bar:nth-child(3) { animation: wave 0.8s infinite 0.2s; }
.audio-visualizer-bar.active .audio-bar:nth-child(4) { animation: wave 0.8s infinite 0.4s; }
.audio-visualizer-bar.active .audio-bar:nth-child(5) { animation: wave 0.8s infinite 0.15s; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

/* 专注度 HUD 叠加层 */
.camera-hud-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: white;
}

.hud-metric {
  display: flex;
  flex-direction: column;
}

.hud-metric .val {
  font-size: 20px;
  font-weight: 700;
  color: #38bdf8;
  font-family: monospace;
}

.hud-metric .sub {
  font-size: 10px;
  color: #94a3b8;
}

.live-badge {
  background: rgba(239, 68, 68, 0.85);
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* 专注度动态指示卡片 */
.focus-monitor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 1px solid var(--card-border);
}

.focus-gauge-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.focus-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(#10b981 0% 95%, #e2e8f0 95% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.focus-circle-inner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--success);
}

.focus-info h4 {
  font-size: 14px;
  font-weight: 700;
}

.focus-info p {
  font-size: 11px;
  color: var(--text-muted);
}

/* 伴学提醒日志 */
.supervision-log-list {
  max-height: 120px;
  overflow-y: auto;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  padding: 6px 10px;
  border-radius: 6px;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  color: var(--text-sub);
}

.log-entry.alert {
  background: #fef2f2;
  color: #dc2626;
  border-left: 3px solid #dc2626;
}

/* ==========================================================================
   随堂草稿纸 (Scratchpad Drawer)
   ========================================================================== */
.scratchpad-canvas {
  width: 100%;
  height: 280px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  touch-action: none;
  cursor: crosshair;
}

/* ==========================================================================
   底部导航栏 (TabBar)
   ========================================================================== */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  z-index: 30;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.04);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.tab-icon {
  font-size: 22px;
  margin-bottom: 2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-label {
  font-size: 11px;
  font-weight: 600;
}

.tab-item.active {
  color: var(--primary);
}

.tab-item.active .tab-icon {
  transform: translateY(-2px) scale(1.12);
}

/* ==========================================================================
   模态框 / 抽屉样式
   ========================================================================== */
.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.show {
  display: flex;
  opacity: 1;
}

.bottom-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 26px 26px 0 0;
  padding: 20px 18px calc(24px + var(--safe-bottom));
  box-shadow: 0 -12px 30px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.bottom-drawer.open {
  transform: translateY(0);
}

.drawer-drag-handle {
  width: 42px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 4px;
  margin: 0 auto 16px;
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 4px;
  display: block;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
}

/* Toast 提示条 */
.toast-notice {
  position: absolute;
  top: 78px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 23, 42, 0.92);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   全屏高清批改留痕大图查看器 (沉浸式全屏阅卷)
   ========================================================================== */
.fullscreen-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 29, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease;
  user-select: none;
}

.fullscreen-lightbox.show {
  display: flex;
  opacity: 1;
}

.lightbox-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  background: rgba(15, 23, 42, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lightbox-icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 18px;
}

.lightbox-heading {
  min-width: 0;
}

.lightbox-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.lightbox-subtitle {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.5;
  color: #94a3b8;
}

.lightbox-toolbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.legend-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 5px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}

.legend-badge.correct {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.legend-badge.wrong {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.legend-badge.half {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.lightbox-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.lightbox-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lightbox-tool-btn:hover, .lightbox-tool-btn:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.lightbox-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lightbox-close-btn:hover, .lightbox-close-btn:active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: scale(1.08);
}

.lightbox-tool-btn:focus-visible,
.lightbox-close-btn:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.lightbox-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
}

.lightbox-img-wrap {
  display: inline-block;
  margin: auto;
  transform-origin: center center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.lightbox-img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  margin: 0 auto;
}

.lightbox-bottombar {
  padding: 12px 18px calc(14px + var(--safe-bottom));
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* ==========================================================================
   思维链与思考模式渲染卡片 (Deep Thinking / Web Search / Auto)
   ========================================================================== */
.thinking-process-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid #6366f1 !important;
  padding: 12px 14px !important;
  margin-bottom: 12px !important;
  border-radius: 12px !important;
}

.thinking-spin-icon {
  display: inline-block;
  animation: spinSlow 3s linear infinite;
  color: #6366f1;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.search-process-card {
  background: #fffbeb !important;
  border: 1px solid #fef3c7 !important;
  border-left: 4px solid #f59e0b !important;
  padding: 12px 14px !important;
  margin-bottom: 12px !important;
  border-radius: 12px !important;
}

.auto-decision-card {
  background: #f0f9ff !important;
  border: 1px solid #e0f2fe !important;
  border-left: 4px solid #0284c7 !important;
  padding: 10px 14px !important;
  margin-bottom: 12px !important;
  border-radius: 12px !important;
}

.solution-step-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.solution-step-card .step-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}

.solution-step-card .step-content {
  font-size: 14px;
  color: #334155;
  line-height: 1.85;
}

#qaSolutionSteps,
#qaSolutionSteps > *,
.solution-prose {
  min-width: 0;
  max-width: 100%;
}

.solution-prose {
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.solution-prose p {
  margin: 0 0 12px;
}

.solution-prose h3,
.solution-prose h4 {
  color: #1e293b;
  font-size: 14px;
  line-height: 1.65;
  margin: 20px 0 10px;
}

.solution-prose h3 {
  color: #4338ca;
  font-size: 15px;
}

.solution-prose ul,
.solution-prose ol {
  margin: 10px 0 14px;
  padding-left: 22px;
}

.solution-prose li + li {
  margin-top: 8px;
}

.solution-prose hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 20px 0;
}

.solution-prose > :first-child {
  margin-top: 0;
}

.solution-prose > :last-child {
  margin-bottom: 0;
}

.solution-prose code {
  background: #f1f5f9;
  border-radius: 4px;
  padding: 2px 4px;
}

/* 保持公式完整，只在公式自身区域横向滚动，避免撑宽整张卡片。 */
.solution-math-inline,
.solution-math-block {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overflow-wrap: normal;
  scrollbar-width: thin;
  scrollbar-color: #c7d2fe transparent;
}

.solution-math-inline {
  display: inline-block;
  vertical-align: middle;
  padding: 2px 0;
}

.solution-equation {
  display: block;
  margin: 12px 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.solution-math-block {
  display: block;
  padding: 12px;
}

.solution-math-hint {
  display: block;
  padding: 0 12px 8px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}

.solution-math-block:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.solution-math-block .katex-display {
  margin: 0;
}

.solution-math-block .katex-display > .katex {
  text-align: left;
}

#qaSolutionBox .katex {
  font-size: 1.05em;
}

/* 评语卡片动态模式小胶囊 */
.mode-active-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.25s ease;
}

.mode-active-pill.standard {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.mode-active-pill.thinking {
  background: #ede9fe;
  color: #6366f1;
  border: 1px solid #c4b5fd;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
}

.mode-active-pill.search {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}

.mode-active-pill.auto {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

/* 题目卡片中的模式角标 */
.q-mode-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: 4px;
  display: inline-block;
}

.q-mode-badge.thinking {
  background: #f5f3ff;
  color: #6366f1;
  border: 1px solid #ddd6fe;
}

.q-mode-badge.search {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.q-mode-badge.auto {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #e0f2fe;
}

/* 抽屉内模式专属容器卡片 */
.drawer-mode-card {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
}

.drawer-mode-header {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-thinking-card {
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  border-left: 4px solid #6366f1;
  color: #3730a3;
}

.drawer-search-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.drawer-auto-card {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0284c7;
  color: #075985;
}

/* =======================================================
   拍题答疑：优化后的解题信息头卡片 (告别竖排折行挤压)
   ======================================================= */
.btn-clear-paper {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(225, 29, 72, 0.08);
}

.btn-clear-paper:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  transform: translateY(-1px);
}

.qa-solution-header-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.qa-header-title-box {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 220px;
  min-width: 0;
}

.qa-header-qnum-tag {
  font-size: 12px;
  font-weight: 800;
  color: #4338ca;
  background: #e0e7ff;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.qa-header-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.65;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.qa-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.qa-action-pill-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.qa-action-pill-btn.favorite {
  color: #4f46e5;
  border-color: #c7d2fe;
  background: #f5f3ff;
}

.qa-action-pill-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.qa-header-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.qa-meta-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.qa-meta-pill.subject {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.qa-meta-pill.difficulty {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.qa-meta-pill.mode {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.qa-meta-pill.mode.thinking {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.qa-meta-pill.mode.search {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.qa-meta-pill.mode.auto {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

/* =======================================================
   火山引擎 veRTC AI 音视频互动：伴学自习室待机与多模态视觉增强
   ======================================================= */
/* 伴学视窗待机封面 (彻底告别黑屏) */
.supervision-idle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 30%, #312e81 0%, #1e1b4b 60%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  z-index: 5;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.supervision-idle-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.idle-avatar-box {
  position: relative;
  margin-bottom: 10px;
}

.idle-avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(99, 102, 241, 0.45);
  filter: blur(14px);
  border-radius: 50%;
  animation: pulse-glow 2.5s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.25); opacity: 0.9; }
}

.idle-avatar {
  font-size: 42px;
  position: relative;
  z-index: 2;
  animation: float-avatar 3s ease-in-out infinite;
}

@keyframes float-avatar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.idle-tag {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #6366f1, #a855f7);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.idle-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.idle-desc {
  font-size: 11px;
  color: #cbd5e1;
  max-width: 250px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.idle-badges-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.idle-pill {
  font-size: 10px;
  color: #e0e7ff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 7px;
  border-radius: 12px;
}

.idle-start-btn {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.idle-start-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

/* 实时字幕条 (遵循 veRTC 官方 DataChannel 实时字幕规范) */
.rtc-subtitle-strip {
  position: absolute;
  bottom: 42px;
  left: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 4;
  color: #ffffff;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: fadeInSubtitle 0.3s ease;
}

@keyframes fadeInSubtitle {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.rtc-subtitle-strip .sub-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.rtc-subtitle-strip .sub-text {
  color: #e2e8f0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 多模态视觉监测健康指标芯片 */
.vision-metric-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}

.vision-metric-chip .chip-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.vision-metric-chip .chip-val {
  font-size: 11px;
  font-weight: 700;
}

.vision-metric-chip .chip-val.healthy {
  color: #10b981;
}

.vision-metric-chip .chip-val.warning {
  color: #f59e0b;
}

.vision-metric-chip .chip-val.danger {
  color: #ef4444;
}

/* 全双工 AI 语音交互抽屉专属样式 */
.voice-teacher-hud {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.teacher-avatar-ring {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.teacher-avatar-ring .avatar {
  font-size: 28px;
  z-index: 2;
}

.sound-wave-rings {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #8b5cf6;
  opacity: 0.6;
  animation: sound-pulse 1.8s infinite ease-out;
}

@keyframes sound-pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.teacher-hud-info {
  flex: 1;
  min-width: 0;
}

.teacher-hud-info .name {
  font-size: 13px;
  font-weight: 700;
  color: #3730a3;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.teacher-hud-info .tag {
  font-size: 9px;
  background: #c7d2fe;
  color: #312e81;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 600;
}

.teacher-hud-info .status {
  font-size: 11px;
  color: #6366f1;
  line-height: 1.3;
}

/* 官方智能打断 (Barge-in) 专属按钮 */
.bargein-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.bargein-btn:hover {
  background: #fecaca;
  transform: scale(1.03);
}

.quick-question-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.q-pill-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.q-pill-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
  transform: translateY(-1px);
}

.voice-chat-history {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  margin-bottom: 12px;
}

.chat-bubble {
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  max-width: 90%;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: #f1f5f9;
  border-left: 3px solid #6366f1;
  color: #1e293b;
}

.chat-bubble.ai .sender {
  font-size: 10px;
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 3px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: #6366f1;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.voice-input-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.voice-text-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 12px;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.voice-text-input:focus {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* 视频视窗主界面随时打断悬浮胶囊 */
.live-bargein-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(239, 68, 68, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(254, 202, 202, 0.6);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  animation: pulse-bargein 1.5s infinite ease-in-out;
  transition: all 0.2s ease;
}

@keyframes pulse-bargein {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.live-bargein-pill:hover {
  background: #dc2626;
  transform: scale(1.08);
}

.bargein-dot {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: blink-dot 0.8s infinite alternate;
}

@keyframes blink-dot {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* 字幕条右侧内置打断小按钮 */
.sub-bargein-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  transition: all 0.15s ease;
}

.sub-bargein-btn:hover {
  background: #fecaca;
}



/* ==========================================================================
   真实 veRTC 学习监督
   ========================================================================== */
.camera-feed.rtc-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  background: #0f172a;
  overflow: hidden;
}

.camera-feed.rtc-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.voice-only-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.audio-resume-btn {
  position: absolute;
  left: 50%;
  bottom: 68px;
  transform: translateX(-50%);
  z-index: 8;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.supervision-error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
}

.ai-teacher-pip.speaking {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35), 0 8px 20px rgba(0, 0, 0, 0.45);
  animation: pipPulse 1.1s ease-in-out infinite;
}

@keyframes pipPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.focus-circle {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.focus-circle.state-active {
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12);
}

.focus-circle.state-error {
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.12);
}

.report-summary-header {
  text-align: center;
  margin: 8px 0 14px;
}

.report-source-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 6px;
}

.report-headline {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.report-subline {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.report-text {
  max-height: 48vh;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px;
  border-radius: 14px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.report-text::-webkit-scrollbar {
  width: 5px;
}

.report-text::-webkit-scrollbar-track {
  background: transparent;
}

.report-text::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* 报告前导说明温馨提示框 */
.report-intro-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 12px;
  color: #1e3a8a;
  line-height: 1.6;
}

.report-intro-box .intro-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.report-intro-box .intro-text {
  flex: 1;
}

/* 结构化分节卡片 */
.report-card-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-card-section:last-child {
  margin-bottom: 0;
}

.report-card-section.focus {
  border-left: 3.5px solid #6366f1;
}

.report-card-section.homework {
  border-left: 3.5px solid #10b981;
}

.report-card-section.qa {
  border-left: 3.5px solid #f59e0b;
}

.report-card-section.suggest {
  border-left: 3.5px solid #0ea5e9;
}

.report-card-section.default {
  border-left: 3.5px solid #8b5cf6;
}

.report-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #f1f5f9;
}

.report-card-title .title-icon {
  font-size: 14px;
}

.report-card-title .title-text {
  flex: 1;
}

.report-card-body {
  font-size: 12px;
  color: #334155;
}

.report-item-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 5px;
}

.report-item-row:last-child {
  margin-bottom: 0;
}

.report-item-row .item-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
  margin-top: 7px;
  flex-shrink: 0;
}

.report-item-row .item-key {
  font-weight: 600;
  color: #1e293b;
  flex-shrink: 0;
}

.report-item-row .item-val {
  color: #475569;
  flex: 1;
  word-break: break-all;
}

.report-p {
  font-size: 12px;
  line-height: 1.6;
  color: #475569;
  margin: 4px 0;
}

/* 报告生成中 Loading 占位 */
.report-loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  gap: 12px;
}

.report-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e0e7ff;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.report-loading-tip {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   历史档案
   ========================================================================== */
.history-thumb {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
  margin: 8px 0;
  display: block;
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.history-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.history-card-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}

.history-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #eef2ff;
  color: #4338ca;
}

.history-badge.demo {
  background: #fef3c7;
  color: #92400e;
}

.history-badge.legacy {
  background: #f1f5f9;
  color: #64748b;
}

.history-summary {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.5;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.history-actions .history-action {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text-sub);
  text-decoration: none;
  cursor: pointer;
}

.history-actions .history-action:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.history-detail {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.history-detail.show {
  display: block;
}

.history-question {
  font-size: 11px;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
  white-space: pre-line;
  color: var(--text-sub);
  line-height: 1.5;
}

.history-transcript {
  max-height: 180px;
  overflow-y: auto;
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px;
  margin-top: 6px;
}

.history-transcript .line {
  font-size: 10px;
  line-height: 1.5;
  margin-bottom: 4px;
  color: var(--text-sub);
  white-space: pre-wrap;
}

.history-report-block {
  margin-top: 8px;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px;
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.6;
  white-space: pre-wrap;
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 0;
  font-size: 12px;
}
