:root {
  --bg-primary: #0d0e12;
  --bg-card: #161821;
  --bg-card-hover: #1f2230;
  --border-color: #272a38;
  --accent-orange: #ff6b22;
  --accent-orange-light: #ff8533;
  --accent-orange-glow: rgba(255, 107, 34, 0.35);
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
  height: 100vh;
  height: 100dvh;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  background-color: var(--bg-primary);
}

/* 顶部状态栏 */
.top-nav {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: rgba(13, 14, 18, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 50;
}

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

.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-orange);
  box-shadow: 0 0 8px var(--accent-orange-glow);
}

.app-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.model-badge {
  font-size: 11px;
  color: #ff9d5c;
  background: rgba(255, 107, 34, 0.12);
  border: 1px solid rgba(255, 107, 34, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.nav-right .status-ready {
  font-size: 13px;
  color: var(--accent-orange);
  font-weight: 500;
}

.api-key-badge {
  background: rgba(255, 107, 34, 0.15);
  border: 1px solid rgba(255, 107, 34, 0.4);
  color: #ff9d5c;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.api-key-badge:active {
  transform: scale(0.95);
  background: rgba(255, 107, 34, 0.3);
}

.icon-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

/* 视图容器 */
.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.view.active {
  display: flex;
  flex-direction: column;
}

/* 首页 Hero 区域 (作业助手) */
.hero-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
}

.hero-logo-wrap {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.4), 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.15);
  animation: floatBounce 3s ease-in-out infinite alternate;
}

@keyframes floatBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #ff9248, #ff5500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 340px;
  margin-bottom: 28px;
}

.action-btn-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #ff7e33, #ff500a);
  color: #fff;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--accent-orange-glow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  width: 100%;
  height: 52px;
  background: var(--bg-card);
  color: #e5e7eb;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-sizing: border-box;
}

.btn-secondary svg {
  display: block;
  flex-shrink: 0;
  margin: 0;
}

.btn-secondary span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.btn-secondary:active {
  background: var(--bg-card-hover);
}

.file-btn-wrapper {
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
}

.file-overlay-input {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  font-size: 0 !important;
  display: block !important;
}

/* 首页 3 大特性卡片 */
.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.feature-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.feature-card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* PWA 桌面安装条 */
.pwa-banner {
  margin-top: 22px;
  width: 100%;
  background: rgba(255, 107, 34, 0.12);
  border: 1px solid rgba(255, 107, 34, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.pwa-icon {
  font-size: 24px;
}

.pwa-banner-text strong {
  font-size: 13.5px;
  color: #fff;
  display: block;
}

.pwa-subtext {
  font-size: 11px;
  color: #ff9d5c;
  margin-top: 2px;
}

.pwa-btn {
  background: linear-gradient(135deg, #ff7e33, #ff500a);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--accent-orange-glow);
}

/* 安装指引弹窗 */
.install-guide-card {
  max-width: 390px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0;
}

.guide-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #141722;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--accent-orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
}

.step-content strong {
  font-size: 13.5px;
  color: #fff;
  display: block;
  margin-bottom: 3px;
}

.step-content p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 编辑器头部信息 */
.editor-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #11131a;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}

.page-pill {
  background: #232736;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  margin-right: 6px;
}

.candidate-pill {
  color: var(--text-secondary);
}

.timing-stats {
  color: #9ca3af;
  font-family: monospace;
}

/* 画布舞台区域 */
.editor-stage-wrap {
  flex: 1;
  position: relative;
  background: #131622;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-container {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: inline-block;
}

.homework-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
}

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

/* 题目选框样式 (可拖拽微调) */
.question-box {
  position: absolute;
  pointer-events: auto;
  border: 2px dashed var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
  border-radius: 6px;
  touch-action: none;
  cursor: move;
  transition: border-color 0.15s, background 0.15s;
}

.question-box.is-wrong {
  border-color: #ff4d4f;
  background: rgba(255, 77, 79, 0.12);
  border-style: solid;
}

.question-box.is-unanswered {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  border-style: dashed;
}

.question-box.is-collected {
  border-color: var(--accent-green) !important;
  background: rgba(16, 185, 129, 0.12) !important;
}

/* 选框顶部徽章与操作按钮 */
.box-header-tag {
  position: absolute;
  top: -26px;
  left: -2px;
  background: rgba(30, 34, 48, 0.95);
  border: 1px solid var(--accent-blue);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.question-box.is-wrong .box-header-tag {
  border-color: #ff4d4f;
  color: #ff7875;
}

.question-box.is-unanswered .box-header-tag {
  border-color: #f59e0b;
  color: #fbbf24;
}

.question-box.is-collected .box-header-tag {
  border-color: var(--accent-green);
  color: #52c41a;
}

.box-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.box-act-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(20, 22, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
}

.box-act-btn:active {
  transform: scale(0.9);
}

.btn-collect {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  font-weight: bold;
}

.question-box.is-collected .btn-collect {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.btn-teach {
  background: #4f46e5;
  border-color: #6366f1;
  font-size: 11px;
  width: auto;
  padding: 0 6px;
  border-radius: 12px;
}

/* 缩放手柄 */
.resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid #ff6b22;
  border-radius: 2px;
  pointer-events: auto;
}

.handle-tl { top: -5px; left: -5px; cursor: nwse-resize; }
.handle-tr { top: -5px; right: -5px; cursor: nesw-resize; }
.handle-bl { bottom: -5px; left: -5px; cursor: nesw-resize; }
.handle-br { bottom: -5px; right: -5px; cursor: nwse-resize; }

/* 提示条 */
.stage-hint {
  padding: 6px 12px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-secondary);
  background: #11131a;
  border-top: 1px solid var(--border-color);
}

.hint-tag {
  background: rgba(255, 107, 34, 0.2);
  color: #ff9d5c;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: bold;
}

/* 编辑器底部工具栏 */
.editor-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px calc(var(--safe-bottom) + 8px);
  background: rgba(18, 20, 28, 0.98);
  border-top: 1px solid var(--border-color);
  gap: 8px;
}

.tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s;
}

.tool-btn svg {
  stroke: #cbd5e1;
}

.tool-btn:active {
  background: rgba(255, 255, 255, 0.22);
}

.tool-btn:active svg {
  stroke: #fff;
}

.mistake-badge-pill {
  background: #251614;
  border: 1px solid #792b21;
  color: #ff7875;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.btn-export {
  background: linear-gradient(135deg, #ff7e33, #ff500a);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-orange-glow);
}

.btn-export:active {
  transform: scale(0.96);
}

/* 加载动画 (全局全屏遮罩) */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(13, 14, 18, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 107, 34, 0.2);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.loading-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==================== AI 名师伴读全屏浮动页面样式 (Top-Floating Teacher View) ==================== */
.teacher-page-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: #0b0f19;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.teacher-page-inner {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #0b0f19;
  overflow: hidden;
}

/* 顶部导航栏 (无收藏按钮，返回 + AI 头像 + 模型标签) */
.teacher-nav-bar {
  height: 52px;
  padding: 0 14px;
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 15, 25, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
  z-index: 20;
}

.teacher-nav-back-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s;
}

.teacher-nav-back-btn:active {
  background: rgba(255, 255, 255, 0.12);
}

.teacher-nav-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  margin-left: 4px;
}

.teacher-nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1.5px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.teacher-nav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.teacher-nav-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.teacher-nav-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.teacher-model-tag {
  font-size: 11.5px;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.teacher-model-chip {
  display: none !important;
}

.teacher-nav-right {
  width: 32px;
}

/* 顶部高质感蓝色发光语音播放条 */
.teacher-audio-banner {
  margin: 10px 14px 8px;
  padding: 8px 14px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.42), rgba(67, 56, 202, 0.36));
  border: 1px solid rgba(59, 130, 246, 0.38);
  box-shadow: 0 4px 16px rgba(30, 58, 138, 0.28);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.audio-play-round-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
  transition: transform 0.1s;
}

.audio-play-round-btn:active {
  transform: scale(0.95);
}

.audio-banner-info {
  flex: 1;
  min-width: 0;
}

.audio-banner-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.audio-status-text {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-timer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

.audio-speed-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.audio-speed-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

.audio-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.audio-wave span {
  width: 2.5px;
  height: 10px;
  background: #60a5fa;
  border-radius: 2px;
  transition: height 0.2s;
}

.audio-wave.playing span:nth-child(1) { animation: wave 0.6s infinite ease-in-out; }
.audio-wave.playing span:nth-child(2) { animation: wave 0.8s infinite ease-in-out 0.1s; }
.audio-wave.playing span:nth-child(3) { animation: wave 0.5s infinite ease-in-out 0.2s; }
.audio-wave.playing span:nth-child(4) { animation: wave 0.7s infinite ease-in-out 0.3s; }
.audio-wave.playing span:nth-child(5) { animation: wave 0.9s infinite ease-in-out 0.15s; }

/* 核心讲解内容滚动区 (预留底部 Dock 栏间距) */
.teacher-sections-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  padding-bottom: calc(var(--safe-bottom) + 78px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.teacher-card {
  background: #121624;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

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

.card-header-icon {
  font-size: 16px;
}

.card-header-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
}

.card-action-tag-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 8px;
  color: #60a5fa;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.card-action-tag-btn:active {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
}

.card-toggle-btn {
  background: none;
  border: none;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 卡片 1：题目内容 + 缩略图 */
.question-card-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.question-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
  word-break: break-all;
}

.question-thumb-box {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s;
}

.question-thumb-box:active {
  transform: scale(0.96);
}

.question-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.question-thumb-zoom-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 10px;
  color: #fff;
}

/* 卡片 2：名师思路点拨 */
.insights-text {
  font-size: 13px;
  line-height: 1.65;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

/* 卡片 3：分步标准解答卡片流 */
.steps-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-card-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
}

.step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.step-card-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.step-check-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-badge {
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.step-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-action-tag {
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 10.5px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.step-formula-box {
  background: rgba(30, 58, 138, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #e0f2fe;
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  box-sizing: border-box;
  max-width: 100%;
}

/* 卡片 4：金牌奖杯标准答案 */
.card-trophy-answer {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.45), rgba(49, 46, 129, 0.35));
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.trophy-title {
  color: #e0e7ff;
}

.ans-check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trophy-answer-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  color: #c7d2fe;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  box-sizing: border-box;
  max-width: 100%;
}

/* 卡片 5：易错陷阱与扣分警示 */
.card-pitfalls-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.warning-title {
  color: #fcd34d;
}

.warning-arrow {
  color: #f59e0b;
  font-size: 14px;
  font-weight: bold;
}

.pitfall-content-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: #fef3c7;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

/* 卡片 6：举一反三变式题 */
.variant-q-text {
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.btn-variant-toggle-ans {
  background: none;
  border: none;
  color: var(--accent-orange);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.variant-ans-box {
  margin-top: 8px;
  background: rgba(255, 107, 34, 0.08);
  border: 1px solid rgba(255, 107, 34, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #ff9d5c;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

/* 底部常驻快捷操作栏 (重新讲解 + 查看图形 + 播放语音) */
.teacher-bottom-action-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 250;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  padding-bottom: calc(var(--safe-bottom) + 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dock-btn-secondary {
  height: 40px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.dock-btn-secondary:active {
  background: rgba(255, 255, 255, 0.16);
}

.dock-btn-primary {
  flex: 1;
  max-width: 240px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  transition: opacity 0.15s;
}

.dock-btn-primary:active {
  opacity: 0.9;
}


/* 清洗设置弹窗 */
.popover-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popover-card {
  background: #1a1d29;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.setting-item {
  margin-bottom: 16px;
}

.setting-item label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.setting-item input[type="range"] {
  width: 100%;
  accent-color: var(--accent-orange);
}

.checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-item label {
  margin-bottom: 0;
  flex: 1;
}

.btn-primary-small {
  width: 100%;
  padding: 10px;
  background: var(--accent-orange);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 24, 33, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 300;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 实时相机取景拍摄浮层 */
.camera-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  z-index: 300;
  display: flex;
  flex-direction: column;
}

.camera-preview-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.camera-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.camera-guidelines {
  position: absolute;
  top: 10%;
  left: 6%;
  right: 6%;
  bottom: 18%;
  border: 1.5px dashed rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
}

.camera-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--accent-orange);
  border-style: solid;
}
.corner-tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-top-left-radius: 10px; }
.corner-tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-top-right-radius: 10px; }
.corner-bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-bottom-left-radius: 10px; }
.corner-br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-bottom-right-radius: 10px; }

.camera-hint-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 20px;
}

.camera-top-bar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  padding-top: max(16px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, transparent 100%);
}

.camera-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.camera-bottom-bar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 24px 20px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.camera-aux-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 9px 15px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}
.camera-aux-btn:active {
  background: rgba(255, 255, 255, 0.35);
}

.shutter-btn-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-shutter-btn {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s;
}

.camera-shutter-btn:active {
  transform: scale(0.92);
}

.shutter-inner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7e33, #ff500a);
}

.flash-effect {
  animation: cameraFlash 0.15s ease-out;
}

@keyframes cameraFlash {
  0% { opacity: 0; }
  50% { opacity: 1; background: #fff; }
  100% { opacity: 0; }
}

/* 首页 我的错题本持久化常驻卡片 */
.mistake-notebook-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(30, 34, 48, 0.95), rgba(22, 25, 36, 0.98));
  border: 1px solid rgba(255, 107, 34, 0.35);
  border-radius: 16px;
  padding: 16px 18px;
  margin-top: 10px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(255, 107, 34, 0.08);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.mistake-notebook-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #ff7e33, #ff500a);
}

.notebook-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.notebook-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.notebook-icon {
  font-size: 26px;
  line-height: 1;
}

.notebook-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.notebook-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.highlight-count {
  color: #ff9d5c;
  font-size: 14px;
  font-weight: 700;
}

.notebook-tag {
  font-size: 11px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.notebook-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.notebook-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
  border: none;
  box-sizing: border-box;
}

.notebook-btn:active {
  transform: scale(0.97);
}

.btn-notebook-view {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
}

.btn-notebook-view:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-notebook-export {
  background: linear-gradient(135deg, #ff7e33, #ff500a);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-orange-glow);
}

/* 错题本查看与管理弹窗 (Mistake Manager Modal) */
.mistake-manager-card {
  max-width: 520px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: #181b24;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

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

.mgr-icon {
  font-size: 20px;
}

.mgr-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.mgr-btn-export {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ff7e33, #ff500a);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-orange-glow);
}

.mgr-btn-export:active {
  transform: scale(0.97);
}

.mgr-btn-clear {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.mgr-btn-clear:active {
  background: rgba(239, 68, 68, 0.25);
}

.mgr-mistake-list {
  flex: 1;
  overflow-y: auto;
  min-height: 180px;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.mgr-mistake-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  transition: background 0.15s;
}

.mgr-mistake-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.mgr-thumb-wrap {
  width: 90px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mgr-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mgr-item-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.mgr-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mgr-item-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.mgr-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mgr-btn-teach {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.mgr-btn-teach:hover, .mgr-btn-teach:active {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}

.mgr-btn-del {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.mgr-btn-del:hover, .mgr-btn-del:active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.mgr-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.mgr-empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.mgr-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.mgr-empty-desc {
  font-size: 12px;
  line-height: 1.6;
  max-width: 280px;
}

.mgr-footer-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mistake-badge-pill {
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s, opacity 0.15s;
}
.mistake-badge-pill:active {
  transform: scale(0.95);
  opacity: 0.9;
}

/* ==================== 错题本全屏视图样式 (View Mistakes) ==================== */
.mistakes-page-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--safe-bottom) + 32px);
  max-width: 100%;
}

.mistakes-page-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.mistakes-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mistakes-page-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mistakes-page-icon {
  font-size: 22px;
}

.mistakes-page-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.mistakes-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-orange);
  background: rgba(255, 107, 34, 0.15);
  border: 1px solid rgba(255, 107, 34, 0.35);
  border-radius: 12px;
  padding: 2px 9px;
  margin-left: 2px;
}

.mistakes-page-sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 2px;
}

.mistakes-page-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-page-action-export {
  flex: 2;
  height: 42px;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 107, 34, 0.28);
  transition: transform 0.1s, opacity 0.15s;
}

.btn-page-action-export:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-page-action-clear {
  flex: 1;
  height: 42px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-page-action-clear:active {
  background: rgba(239, 68, 68, 0.25);
}

.mistakes-cards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.mistake-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s;
}

.mistake-page-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.mistake-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mistake-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mistake-card-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-orange-light);
  background: rgba(255, 107, 34, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 107, 34, 0.25);
  flex-shrink: 0;
}

.mistake-card-time {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.mistake-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #f3f4f6;
  line-height: 1.5;
  word-break: break-all;
}

.mistake-img-box {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  max-height: 320px;
  padding: 6px;
  box-sizing: border-box;
  transition: transform 0.12s, box-shadow 0.15s;
}

.mistake-img-box:active {
  transform: scale(0.99);
}

.mistake-card-img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

.zoom-overlay-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.mistake-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-card-teach {
  flex: 1;
  height: 38px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 9px;
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-card-teach:hover, .btn-card-teach:active {
  background: rgba(99, 102, 241, 0.32);
  color: #fff;
}

.btn-card-delete {
  height: 38px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  color: #9ca3af;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-card-delete:hover, .btn-card-delete:active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* 空状态 */
.mistakes-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  margin: 20px 0;
}

.empty-icon {
  font-size: 50px;
  margin-bottom: 14px;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 18px;
}

.btn-empty-add {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
  border: none;
  border-radius: 10px;
  color: #fff;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 107, 34, 0.25);
}

.mistakes-page-footer {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 14px;
  padding: 10px 4px;
}

/* ==================== 高清图片灯箱全屏放大 (Lightbox) ==================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-box {
  position: relative;
  z-index: 10;
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.lightbox-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 10px 4px;
  box-sizing: border-box;
}

.lightbox-title {
  font-size: 14px;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}

.lightbox-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.lightbox-close-btn:active {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox-body {
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 12px;
  padding: 6px;
  box-sizing: border-box;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

.lightbox-img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.lightbox-footer {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 10px;
  text-align: center;
}


