/* ===== 重置与基础 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a5f;

  --green-500: #22c55e;
  --green-600: #16a34a;
  --orange-500: #f59e0b;
  --orange-600: #d97706;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --sidebar-width: 220px;
  --right-panel-width: 260px;
  --topnav-height: 56px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
}

html {
  font-size: 14px;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 顶部导航 ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topnav-height);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue-600);
  letter-spacing: -0.02em;
}

.system-name {
  font-size: 0.85rem;
  color: var(--gray-400);
  padding-left: 12px;
  border-left: 1px solid var(--gray-200);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: var(--radius-xs);
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

/* ===== 布局 ===== */
.app-container {
  display: flex;
  min-height: calc(100vh - var(--topnav-height));
  margin-top: var(--topnav-height);
}

/* ===== 左侧边栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  background: #fff;
  border-right: 1px solid var(--gray-200);
  padding: 0 8px 16px;
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

.menu-section {
  margin-bottom: 20px;
}

.menu-section-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 12px;
  margin-bottom: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--blue-50);
  color: var(--blue-600);
}

.menu-item.active {
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 600;
}

.menu-item svg {
  flex-shrink: 0;
}

/* 侧栏红点角标（如智能复习待复习数） */
.menu-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red-500, #ef4444);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(239,68,68,0.4);
  animation: scaleIn 0.25s ease;
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-right: 0;
  padding: 24px 32px;
  min-height: calc(100vh - var(--topnav-height));
}

.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ===== 右侧面板 ===== */
.right-panel {
  display: none;
}

.panel-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-100);
}

.subscription-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscription-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  transition: all 0.15s;
}

.subscription-item:hover {
  background: var(--blue-50);
  border-color: var(--blue-200);
}

.subscription-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
}

.subscription-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.subscription-status.active {
  background: #dcfce7;
  color: var(--green-600);
}

.subscription-status.expired {
  background: #fef3c7;
  color: var(--orange-600);
}

.subscription-status .renew-btn {
  background: none;
  border: none;
  color: var(--blue-600);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
  text-decoration: underline;
}

/* ===== 教材选择器（单词学习页） ===== */
.course-selector {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.course-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.course-selector-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
}

.course-selector-link {
  font-size: 0.75rem;
  color: var(--blue-500);
  text-decoration: none;
}

.course-selector-link:hover {
  text-decoration: underline;
}

.course-selector-hint {
  font-size: 0.7rem;
  color: var(--orange-500);
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.course-selector-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.course-selector-item {
  flex: 0 0 auto;
  min-width: 160px;
  max-width: 220px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.course-selector-item:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
}

.course-selector-item.active {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 0 0 1px var(--blue-500);
}

.course-selector-item-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-selector-units {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.course-selector-unit-chip {
  display: inline-block;
  padding: 2px 7px;
  font-size: 0.68rem;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s;
}

.course-selector-unit-chip:hover {
  background: var(--blue-500);
  color: #fff;
  border-color: var(--blue-500);
}

.course-selector-unit-chip.active {
  background: var(--blue-500);
  color: #fff;
  border-color: var(--blue-500);
}

/* ===== 教材选择器增强（主内容区） ===== */
.course-selector {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
}

.course-selector-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-selector-item {
  flex: none;
  width: 100%;
  max-width: 100%;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.course-selector-item:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
  box-shadow: var(--shadow);
}

.course-selector-item.active {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 0 0 2px var(--blue-200);
}

.cs-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.course-selector-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* 覆盖旧版横向 course-selector 遗留的 margin-bottom:6px，保证与左侧折叠按钮/轮次徽标在同一水平线居中对齐 */
  margin-bottom: 0;
  align-self: center;
}

.course-selector-units {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}



.course-selector-unit-chip { /* 保留占位，防止旧代码报错 */ }

.spelling-input:focus {
  border-color: var(--blue-400);
}

.spelling-input.correct {
  border-color: var(--green-500);
  background: #f0fdf4;
}

.spelling-input.wrong {
  border-color: var(--red-500);
  background: #fef2f2;
}

.spelling-feedback {
  margin-top: 12px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 24px;
}

.spelling-feedback.correct {
  color: var(--green-600);
}

.spelling-feedback.wrong {
  color: var(--red-500);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue-500);
  color: #fff;
  border-color: var(--blue-500);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--gray-200);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-200);
}

.btn-outline {
  background: transparent;
  color: var(--blue-600);
  border-color: var(--blue-300);
}

.btn-outline:hover:not(:disabled) {
  background: var(--blue-50);
  border-color: var(--blue-400);
}

.btn-danger-outline {
  background: transparent;
  color: var(--red-500);
  border-color: var(--red-300);
}

.btn-danger-outline:hover:not(:disabled) {
  background: #fef2f2;
  border-color: var(--red-400);
}

/* ===== 用户信息 ===== */
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
}

.nav-right .icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  width: auto;
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ===== 登录页面 ===== */
/* 注意：登录遮罩不加淡入动画（fadeIn 从 opacity:0 渐显），
   否则刷新时遮罩初始透明，背后学习界面会闪现出来 */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.login-overlay.hidden {
  display: none;
}

.login-modal {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  padding: 40px 32px 32px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s ease;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  margin-bottom: 12px;
}

.login-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--gray-400);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
}

.form-input {
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: var(--gray-50);
}

.form-input:focus {
  border-color: var(--blue-400);
  background: #fff;
}

.login-error {
  font-size: 0.85rem;
  color: var(--red-500);
  min-height: 20px;
  text-align: center;
}

.login-forgot-hint {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-align: right;
  margin-top: -10px;
}

.btn-login {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

.login-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 4px;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-400);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--gray-600);
  background: var(--gray-100);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* ===== 筛选栏 ===== */
.filter-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-500);
  min-width: 44px;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tab:hover {
  border-color: var(--blue-300);
  color: var(--blue-600);
  background: var(--blue-50);
}

.filter-tab.active {
  background: var(--blue-500);
  color: #fff;
  border-color: var(--blue-500);
}

/* ===== 课程网格 ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* ===== 选课中心精简卡片（含进度条+背景渐变）===== */
.course-card-slim {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s, border-color 0.2s;
  cursor: pointer;
}
.course-card-slim:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 10px rgba(59,130,246,0.12);
}
/* 背景渐变通过内联style设置，不影响文字 */
.cc-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cc-icon { font-size: 1.5rem; flex-shrink: 0; }
.cc-info { flex: 1; min-width: 0; }
.cc-title {
  font-size: 1rem; font-weight: 600; color: #1a1a2e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}
.cc-meta { font-size: 0.78rem; color: #6b7280; margin-top: 1px; }
.cc-level {
  font-size: 0.7rem; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: #dbeafe; color: #1d4ed8; flex-shrink: 0;
}
.cc-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; margin-top: 8px;
  border-top: 1px solid #f3f4f6;
}
.cc-progress {
  display: flex; align-items: center; gap: 6px; flex: 1; max-width: 180px;
}
.cc-bar { flex: 1; height: 4px; border-radius: 999px; background: #f3f4f6; overflow: hidden; }
.cc-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.cc-pct { font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.cc-actions { display: flex; align-items: center; gap: 8px; }

.course-status-badge { font-size: 0.72rem; font-weight: 600; }
.course-status-badge.opened { color: #16a34a; }
.course-status-badge.trial { color: #f59e0b; }
.course-status-badge.expired { color: #9ca3af; }
.course-status-badge.not-opened { color: #9ca3af; }

.btn-ghost {
  background: transparent; border: none; color: #3b82f6;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  padding: 4px 8px; border-radius: 6px; transition: background 0.15s;
}
.btn-ghost:hover { background: #eff6ff; }
.btn-ghost:disabled { color: #d1d5db; cursor: not-allowed; }
.btn-ghost:disabled:hover { background: transparent; }

/* ===== 我的教材整体进度条 ===== */
.cs-overall-bar {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px; padding: 0 2px;
}
.cs-overall-track { flex: 1; height: 3px; border-radius: 999px; background: #f3f4f6; overflow: hidden; }
.cs-overall-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.cs-overall-pct { font-size: 0.65rem; font-weight: 600; white-space: nowrap; }

.cs-name-row .cs-actions-row {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ===== 课程（教材）折叠 ===== */
.cs-collapse-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 2px;
}
.cs-collapse-toolbar-count {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-right: auto;
}
.cs-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #9ca3af;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.cs-collapse-toggle:hover {
  border-color: var(--blue-400);
  color: var(--blue-600);
  background: var(--blue-50);
}
/* 教材重复遍数角标（本教材所有单元完整学完轮数的最小值） */
.cs-rounds-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #3b82f6;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid #bfdbfe;
  user-select: none;
}
.cs-rounds-badge:hover {
  background: #dbeafe;
}
/* 折叠态：隐藏单元网格，但保留整体学习进度条（便于快速查看本教材完成度） */
.course-selector-item.collapsed .course-selector-units {
  display: none;
}
.course-selector-item.collapsed .cs-name-row {
  margin-bottom: 6px;
}
.course-selector-item.collapsed .cs-overall-bar {
  margin-bottom: 0;
}
.course-selector-item.collapsed .course-selector-item-name {
  font-weight: 600;
}
.btn-xs {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-xs:hover { border-color: var(--blue-300); color: var(--blue-600); background: #eff6ff; }
.btn-xs.btn-disabled { opacity: 0.45; cursor: not-allowed; }
.btn-xs.btn-disabled:hover { background: #fff; border-color: var(--gray-200); color: var(--gray-600); }

/* ===== 在线词典 ===== */
.phonics-container { max-width: 660px; margin: 0 auto; }
.phonics-input-area { display: flex; gap: 8px; margin-bottom: 20px; }
.phonics-input {
  flex: 1; padding: 12px 16px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 1.1rem; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color 0.2s;
}
.phonics-input:focus { border-color: var(--blue-500); }

.phonics-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 20px; color: var(--gray-500);
}
.spinner { width: 18px; height: 18px; border: 2px solid var(--gray-200); border-top-color: var(--blue-500); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.phonics-error { text-align: center; padding: 20px; color: var(--red-500); background: #fff5f5; border-radius: var(--radius); margin-bottom: 16px; }

.phonics-quick-words { margin-top: 8px; }
.phonics-quick-words h3 { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 8px; text-align: center; }
.phonics-word-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.phonics-word-tag {
  padding: 4px 14px; border-radius: 999px; font-size: 0.85rem; cursor: pointer;
  border: 1px solid var(--gray-200); background: white; color: var(--gray-700);
  transition: all 0.15s; font-family: 'Inter', sans-serif;
}
.phonics-word-tag:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }

/* 词典结果 */
.dict-result { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.dict-word-header {
  display: flex; align-items: center; gap: 12px; padding: 20px 24px;
  background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px;
}
.dict-word-text { font-size: 2rem; font-weight: 700; color: var(--gray-800); }
.dict-word-phonetic { font-size: 1rem; color: var(--gray-400); font-family: monospace; }
.dict-speaker-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #06b6d4, #0ea5e9); color: white;
  font-size: 1.2rem; cursor: pointer; transition: all 0.2s; margin-left: auto;
  box-shadow: 0 2px 8px rgba(6,182,212,0.3); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.dict-speaker-btn:hover { transform: scale(1.1); box-shadow: 0 4px 14px rgba(6,182,212,0.4); }
.dict-speaker-btn.playing { animation: dictPulse 1s ease infinite; }
@keyframes dictPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(6,182,212,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(6,182,212,0); }
}

.dict-translation {
  font-size: 1.1rem; color: var(--gray-700); padding: 14px 20px;
  background: #f0f9ff; border-radius: var(--radius-sm); border-left: 3px solid #0ea5e9; margin-bottom: 12px;
}

.dict-meanings {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 12px;
}
.dict-meanings h4 { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 8px; }
.dict-meaning-row {
  display: flex; align-items: baseline; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--gray-50); font-size: 0.9rem;
}
.dict-meaning-row .dm-pos {
  font-size: 0.75rem; padding: 1px 8px; border-radius: 99px;
  background: var(--blue-50); color: var(--blue-600); font-weight: 600; flex-shrink: 0;
}
.dict-meaning-row .dm-text { color: var(--gray-700); }

.dict-examples {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 12px;
}
.dict-examples h4 { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 8px; }
.dict-example-item {
  padding: 8px 12px; margin: 6px 0; border-radius: var(--radius-xs); background: var(--gray-50);
  border-left: 2px solid var(--gray-300);
}
.dict-example-item .ex-en { color: var(--gray-700); font-size: 0.9rem; margin-bottom: 2px; }
.dict-example-item .ex-cn { color: var(--gray-400); font-size: 0.82rem; }

.dict-audio-hint {
  text-align: center; font-size: 0.78rem; color: var(--green-600);
  padding: 8px; background: #f0fdf4; border-radius: var(--radius-sm);
  margin-bottom: 12px; animation: fadeIn 0.3s ease;
}

/* 词典音节色块 (自然拼读拆分) */
.dict-syllables {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px; margin-bottom: 12px; animation: fadeIn 0.3s ease;
}
.dict-syllables-row {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 8px 0; min-height: 60px; align-items: center;
}
.dict-syllables-row .sy-block {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 16px; border-radius: 12px; min-width: 48px;
  transition: transform 0.15s; cursor: default;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dict-syllables-row .sy-block:hover { transform: scale(1.08); }
.dict-syllables-row .sy-letters {
  font-size: 1.3rem; font-weight: 700; line-height: 1.3;
  font-family: 'Inter', sans-serif; letter-spacing: 0.5px;
}
.dict-syllables-row .sy-ipa {
  font-size: 0.72rem; font-weight: 600; margin-top: 4px;
  opacity: 0.85; font-family: 'IPA', 'Segoe UI', sans-serif;
}
.dict-syllables-bar {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  padding: 6px 0 2px;
}
.dict-syllables-bar .sy-chip {
  padding: 3px 14px; border-radius: 999px; font-size: 0.78rem;
  font-weight: 600; white-space: nowrap;
}

/* 保留：拼读色块（旧词卡中使用） */
.phonics-learn-row { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin: 8px auto 4px; min-height: 24px; max-width: 320px; }
.phonics-learn-block { display: flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 8px; min-width: 36px; transition: transform 0.15s; cursor: default; border: 1px solid rgba(0,0,0,0.08); }
.phonics-learn-block:hover { transform: scale(1.15); }
.phonics-learn-letter { font-size: 1.4rem; font-weight: 700; line-height: 1.4; font-family: 'Inter', monospace; }
.phonics-learn-ipa { font-size: 0.75rem; font-weight: 600; opacity: 0.75; line-height: 1.2; }

/* ===== 单元进度卡片（统一样式：选课网格 + 教材选择器）===== */
.course-units,
.course-selector-units {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.uc-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.uc-card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.uc-card.uc-active {
  box-shadow: 0 0 0 2px rgba(59,130,246,0.25);
}
.uc-card.uc-locked {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f9fafb;
  justify-content: center;
  align-items: center;
  min-height: 56px;
}
.uc-card.uc-locked:hover {
  box-shadow: none;
}

.uc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}

.uc-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.uc-progress-num {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.uc-bar {
  height: 4px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}
.uc-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 0;
}

.uc-dots {
  display: flex;
  gap: 6px;
  margin-top: 1px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  font-weight: 400;
  color: #6b7280;
}

/* 单元"进行中"状态行 */
.uc-status {
  font-size: 0.68rem;
  font-weight: 600;
  color: #3b82f6;
  background: #eff6ff;
  border-radius: 999px;
  padding: 1px 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  margin-top: 1px;
}

/* ===== 断点续学弹窗 ===== */
.resume-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.resume-dialog {
  width: 400px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  animation: scaleIn 0.2s ease;
}
.resume-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.resume-dialog-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.4;
}
.resume-dialog-round {
  font-size: 0.72rem;
  font-weight: 600;
  color: #3b82f6;
  background: #eff6ff;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.resume-dialog-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 12px 0 14px;
}
.resume-dialog-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
}
.resume-dialog-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #f1f5f9;
}
.resume-dialog-stats {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}
.resume-dialog-bar {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.resume-dialog-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  transition: width 0.3s;
}
.resume-dialog-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: #3b82f6;
  margin-top: 6px;
}
.resume-dialog-time {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}
.resume-dialog-btns {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.resume-dialog-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: inherit;
}
.resume-dialog-btn:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}
.resume-dialog-btn.primary {
  border-color: #3b82f6;
  background: #eff6ff;
}
.resume-dialog-btn.primary:hover {
  background: #dbeafe;
}
.resume-dialog-btn-icon {
  font-size: 1.3rem;
  line-height: 1;
}
.resume-dialog-btn b {
  font-size: 0.9rem;
  color: #1a1a2e;
  display: block;
}
.resume-dialog-btn small {
  font-size: 0.72rem;
  color: #94a3b8;
}
.resume-dialog-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 0.74rem;
  color: #94a3b8;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== 通用自定义确认弹窗（交卷等）===== */
.custom-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.custom-confirm-dialog {
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  padding: 24px 26px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  animation: scaleIn 0.2s ease;
}
.custom-confirm-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 10px;
}
.custom-confirm-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.custom-confirm-message {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
}
.custom-confirm-message strong {
  color: #ef4444;
  font-size: 1.05rem;
}
.custom-confirm-detail {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.5;
}
.custom-confirm-btns {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.custom-confirm-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  font-family: inherit;
  transition: all 0.15s;
}
.custom-confirm-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}
.custom-confirm-btn.ok {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #fff;
}
.custom-confirm-btn.ok:hover {
  background: #2563eb;
}
.custom-confirm-btn.ok.danger {
  border-color: #ef4444;
  background: #ef4444;
}
.custom-confirm-btn.ok.danger:hover {
  background: #dc2626;
}

/* ===== 单元悬停弹窗 ===== */
.uc-tooltip-popup {
  position: fixed;
  z-index: 9999;
  width: 280px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 14px 16px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  font-size: 0.8rem;
}
.uct-head {
  font-size: 0.9rem; font-weight: 600; color: #1a1a2e;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
}
.uct-bar-wrap { margin-bottom: 8px; }
.uct-bar { height: 4px; border-radius: 999px; background: #f3f4f6; overflow: hidden; }
.uct-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.uct-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 0; font-size: 0.78rem; color: #4b5563;
}

/* 单元复习次数角标 */
.unit-review-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: super;
  margin-left: 3px;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.3);
}
.unit-review-badge.unit-badge-md {
  font-size: 0.58rem;
  min-width: 16px;
  height: 16px;
}
.unit-review-badge.unit-badge-sm {
  font-size: 0.52rem;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
}

.course-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.course-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.8rem;
}

.course-subscribe-btn.subscribed {
  background: var(--green-500);
  border-color: var(--green-500);
}

/* 旧 course-status-badge 已迁移到 course-card-slim */

/* 旧 course-selector-unit-chip 状态样式已迁移到 .uc-card */

/* 锁定按钮样式 */
.btn-locked {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--gray-100) !important;
  color: var(--gray-400) !important;
  border-color: var(--gray-200) !important;
}
.btn-locked:hover {
  opacity: 0.5;
  background: var(--gray-100) !important;
  color: var(--gray-400) !important;
  border-color: var(--gray-200) !important;
}

/* ===== 词汇量测试 ===== */
.test-intro-card {
  max-width: 520px;
  margin: 20px auto;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.test-intro-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.test-intro-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.test-intro-card p {
  font-size: 0.9rem;
  color: var(--gray-400);
  margin-bottom: 24px;
  line-height: 1.6;
}

.test-info-bar {
  display: inline-block;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.test-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.test-setting label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.test-select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-700);
  cursor: pointer;
  transition: border-color 0.15s;
}

.test-select:focus {
  outline: none;
  border-color: var(--blue-400);
}

.test-tip {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.btn-test-start {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

/* 答题区 */
#test-quiz {
  max-width: 560px;
  margin: 0 auto;
}

.test-progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.test-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.test-quiz-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.test-quiz-title {
  font-weight: 700;
  color: var(--gray-700);
  font-size: 0.95rem;
}

.test-quiz-timer {
  font-weight: 600;
  color: var(--gray-600);
}

.test-quiz-progress-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: -8px;
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.test-quiz-progress {
  font-weight: 600;
  color: var(--blue-600);
  background: var(--blue-50);
  padding: 2px 10px;
  border-radius: 999px;
}

.test-round-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--blue-600);
  margin-top: 20px;
  padding: 12px;
  background: var(--blue-50);
  border-radius: var(--radius-sm);
}

.test-question-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.test-question-word {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.test-question-phonetic {
  font-size: 1rem;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.test-question-prompt {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.test-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.test-choice {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
  background: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.test-choice:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
}

.test-choice.selected {
  border-color: var(--blue-500);
  background: var(--blue-50);
  color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.test-choice.correct {
  border-color: var(--green-500);
  background: #f0fdf4;
  color: var(--green-700);
}

.test-choice.wrong {
  border-color: var(--red-500);
  background: #fef2f2;
  color: var(--red-700);
}

.test-choice:disabled {
  cursor: default;
  opacity: 0.7;
}

/* 结果区 */
.test-result-card {
  max-width: 480px;
  margin: 20px auto;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.test-result-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.test-result-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.test-final-level {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.test-cefr-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.test-result-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.test-result-stat {
  flex: 1;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}

.test-result-stat .stat-label {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.test-result-stat .stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* 报告页结论区 */
.test-result-conclusion {
  margin-bottom: 14px;
}

.test-result-conclusion-label {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.test-result-meta {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.test-grade-table-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-400);
  padding: 0 0 8px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 8px;
}

.test-grade-table-header .test-grade-bar {
  background: transparent;
}

.test-report-tips {
  text-align: left;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}

.test-tip-line {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.test-tip-line + .test-tip-line {
  margin-top: 6px;
  border-top: 1px dashed var(--gray-200);
  padding-top: 6px;
}

.test-grade-details {
  text-align: left;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

.test-grade-details h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px;
}

.test-grade-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.test-grade-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.test-grade-name {
  width: 90px;
  color: var(--gray-600);
  flex-shrink: 0;
}

.test-grade-bar {
  flex: 1;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.test-grade-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: 4px;
}

.test-grade-rate {
  width: 44px;
  text-align: right;
  font-weight: 600;
  color: var(--gray-700);
}

.test-grade-status {
  width: 80px;
  text-align: right;
  color: var(--gray-500);
  flex-shrink: 0;
}

.test-grade-status.mastered { color: var(--green-600); }
.test-grade-status.partial { color: #d97706; }
.test-grade-status.failed { color: var(--red-500); }

.test-grade-empty {
  font-size: 0.85rem;
  color: var(--gray-400);
  text-align: center;
  padding: 8px 0;
}

.test-suggestions {
  text-align: left;
  margin-bottom: 20px;
  padding: 16px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
}

.test-suggestions h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 10px;
}

.test-suggestion-item {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.test-result-actions {
  display: flex;
  gap: 8px;
}

.test-result-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ===== 英语能力诊断 ===== */
.diag-intro-card {
  max-width: 560px;
}

.diag-dimension-card {
  text-align: left;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.diag-dimension-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px;
}

.diag-dimension-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.diag-dimension-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  transition: all 0.15s;
}

.diag-dimension-item:hover {
  border-color: var(--blue-300);
  color: var(--blue-700);
  transform: translateY(-2px);
}

.diag-dim-icon {
  font-size: 1.5rem;
}

/* 诊断答题页 */
#diag-quiz {
  max-width: 600px;
  margin: 0 auto;
}

.diag-module-badge {
  font-weight: 700;
  color: var(--blue-700);
  background: var(--blue-50);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.diag-audio-row {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.diag-audio-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid var(--blue-200);
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.diag-audio-btn:hover {
  border-color: var(--blue-400);
  background: var(--blue-100);
}

.diag-passage {
  text-align: left;
  background: var(--gray-50);
  border-left: 3px solid var(--blue-300);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 14px;
}

/* 底部：当前题号 + 各维度进度缩略图 */
.diag-module-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 10px 14px;
}

.diag-module-progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  flex-shrink: 0;
}

.diag-dim-bars {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow: hidden;
}

.diag-dim-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.diag-dim-bar-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.diag-dim-bar-track {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.diag-dim-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.diag-dim-bar.done .diag-dim-bar-fill {
  background: linear-gradient(90deg, var(--green-400), var(--green-600));
}

.diag-dim-bar.active .diag-dim-bar-track {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* 诊断报告页 */
.diag-result-card {
  max-width: 560px;
}

.diag-meta {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.diag-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin: 20px 0 12px;
  text-align: left;
}

.diag-radar-wrap {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
}

#diag-radar {
  width: 100%;
  height: auto;
  display: block;
}

.diag-overall {
  text-align: center;
  margin-top: 4px;
  margin-bottom: 8px;
}

.diag-overall-score {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-600);
}

.diag-overall-label {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.diag-dim-table {
  margin-bottom: 20px;
}

.diag-dim-table .test-grade-name {
  width: 110px;
}

.diag-dim-table .test-grade-status.good { color: var(--green-600); }
.diag-dim-table .test-grade-status.warn { color: #d97706; }
.diag-dim-table .test-grade-status.weak { color: var(--red-500); }

.diag-path {
  text-align: left;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}

.diag-path h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 10px;
}

.diag-path-item {
  font-size: 0.85rem;
  color: var(--gray-600);
  padding: 4px 0;
  line-height: 1.7;
}

.diag-path-item strong {
  color: var(--gray-800);
}

.diag-result-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ===== 单词本 ===== */
.wordbook-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .wordbook-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .wordbook-stats { grid-template-columns: repeat(2, 1fr); }
}

.wordbook-stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.wordbook-stat-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 6px;
}

.wordbook-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.wordbook-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-800);
}

.wordbook-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.wordbook-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}

.wordbook-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
  text-align: center;
  cursor: default;
  min-height: 60px;
  justify-content: center;
}
.wordbook-item:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow);
}

.wordbook-item-word {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
  min-width: 100px;
  cursor: pointer;
}
.wordbook-item-word {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}
.wordbook-item-word:hover {
  background: var(--gray-100);
}

.wordbook-item-pos {
  font-size: 0.75rem;
  color: var(--blue-500);
  font-style: italic;
}

.wordbook-item-meaning {
  display: none;
  font-size: 0.75rem;
  color: var(--gray-500);
  max-width: 100%;
  word-break: break-all;
  line-height: 1.3;
}
.wordbook-item-meaning.revealed {
  display: block;
}

.wordbook-item-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.wordbook-item-history {
  cursor: help;
  font-size: 0.6rem;
  color: var(--gray-400);
}

.wordbook-item-status.mastered {
  background: #dcfce7;
  color: var(--green-600);
}

.wordbook-item-status.pending {
  background: #fef3c7;
  color: var(--orange-600);
}
.wordbook-item-status.half {
  background: #dbeafe;
  color: var(--blue-600);
}
.wordbook-item-status.strange {
  background: #f3f4f6;
  color: var(--gray-500);
}
.wordbook-item-status.wrong {
  background: #fef2f2;
  color: var(--red-500);
}
.wordbook-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.wordbook-empty svg {
  margin-bottom: 12px;
}

.wordbook-empty p {
  font-size: 0.9rem;
}

/* ===== 智能复习 ===== */
#review-home {
  max-width: 560px;
  margin: 0 auto;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

/* ===== 复习连续打卡横幅（🔥 streak） ===== */
.review-streak-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #fdba74;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}
.review-streak-flame {
  font-size: 1.6rem;
  animation: flamePulse 1.2s ease infinite;
}
@keyframes flamePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.review-streak-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.review-streak-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ea580c;
}
.review-streak-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9a3412;
}
.review-streak-tip {
  margin-left: auto;
  font-size: 0.8rem;
  color: #c2410c;
}

/* ===== 复习成就反馈 ===== */
.review-achievement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fefce8, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: 12px;
  animation: scaleIn 0.3s ease;
}
.review-achievement-badge {
  font-size: 2rem;
  animation: flamePulse 1.5s ease infinite;
}
.review-achievement-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #854d0e;
}

.review-summary-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.review-summary-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 6px;
}

.review-summary-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.review-summary-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-800);
}

.review-settings {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-setting label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.review-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-review-start {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

/* 复习答题 */
#review-quiz {
  max-width: 520px;
  margin: 0 auto;
}

.review-progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.review-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.review-stats-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.review-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 40px 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.review-card-word {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.review-card-phonetic {
  font-size: 0.95rem;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.review-card-meaning {
  font-size: 1.3rem;
  color: var(--gray-600);
  font-weight: 500;
  margin-bottom: 8px;
  padding: 8px 16px;
  background: var(--blue-50);
  border-radius: var(--radius-xs);
  display: inline-block;
}

.review-card-pos {
  font-size: 0.85rem;
  color: var(--gray-400);
  font-style: italic;
  margin-bottom: 24px;
}

/* 听音选义 - 播放按钮 */
.review-listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px auto 12px;
  padding: 8px 20px;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-600);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.review-listen-btn:hover {
  background: var(--blue-100);
  border-color: var(--blue-300);
}

/* 听音选义 - 释义选项 */
.review-card-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0 8px;
}
.review-option-btn {
  padding: 14px 12px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.review-option-btn:hover:not(:disabled) {
  border-color: var(--blue-400);
  background: var(--blue-50);
}
.review-option-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.review-option-btn.correct {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #16a34a;
  opacity: 1;
}
.review-option-btn.wrong {
  border-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
  opacity: 1;
}

/* 拼写巩固 - 输入区 */
.review-card-spell {
  margin: 16px 0 8px;
}
.review-spell-hint {
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-bottom: 10px;
}
.review-spell-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.review-spell-row input {
  flex: 1;
  max-width: 260px;
  padding: 11px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 1.1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}
.review-spell-row input:focus {
  border-color: var(--blue-400);
}
.review-spell-result {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-600);
  min-height: 1.4em;
}

.review-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-review-forgot {
  flex: 1;
  max-width: 160px;
  padding: 12px 16px;
  background: #fef2f2;
  color: var(--red-600);
  border: 2px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-review-forgot:hover {
  background: #fee2e2;
  border-color: var(--red-400);
}

.btn-review-remember {
  flex: 1;
  max-width: 160px;
  padding: 12px 16px;
  background: #f0fdf4;
  color: var(--green-600);
  border: 2px solid #bbf7d0;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-review-remember:hover {
  background: #dcfce7;
  border-color: var(--green-400);
}

/* 复习结果 */
.review-result-card {
  max-width: 480px;
  margin: 20px auto;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.review-result-icon { font-size: 3rem; margin-bottom: 8px; }

.review-result-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.review-result-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.review-result-stat {
  flex: 1;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}

.review-strategy-tip {
  text-align: left;
  padding: 14px 16px;
  background: var(--blue-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--blue-100);
  margin-bottom: 16px;
}

.review-strategy-tip strong {
  font-size: 0.82rem;
  color: var(--blue-700);
  display: block;
  margin-bottom: 4px;
}

.review-strategy-tip p {
  font-size: 0.82rem;
  color: var(--blue-600);
  line-height: 1.5;
}

.review-result-actions {
  display: flex;
  gap: 8px;
}

.review-result-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ===== 学习分析 ===== */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.analysis-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.analysis-card-icon { font-size: 1.8rem; }

.analysis-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.analysis-label {
  font-size: 0.72rem;
  color: var(--gray-400);
  font-weight: 500;
}

.analysis-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-800);
}

.analysis-card-total { border-left: 3px solid var(--blue-500); }
.analysis-card-mastered { border-left: 3px solid var(--green-500); }
.analysis-card-studying { border-left: 3px solid var(--orange-500); }
.analysis-card-time { border-left: 3px solid var(--purple-500); }

.analysis-section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.analysis-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-100);
}

.analysis-section-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-left: 8px;
}

.analysis-records-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.analysis-records-pager .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.analysis-pager-info {
  white-space: nowrap;
}

.analysis-page-size {
  padding: 5px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: #fff;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--gray-600);
  cursor: pointer;
}

.analysis-page-size:focus {
  outline: none;
  border-color: var(--blue-400);
}

.chart-bar-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-bar-label {
  width: 60px;
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 500;
  text-align: right;
  flex-shrink: 0;
}

.chart-bar-bg {
  flex: 1;
  height: 22px;
  background: var(--gray-100);
  border-radius: 11px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: 11px;
  transition: width 0.5s ease;
  min-width: 0;
}

.chart-bar-value {
  width: 36px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  flex-shrink: 0;
}

.analysis-records {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analysis-record {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.record-course {
  font-weight: 600;
  color: var(--gray-700);
}

.record-unit {
  color: var(--blue-600);
  font-weight: 500;
}

.record-detail {
  color: var(--gray-500);
}

.record-time {
  margin-left: auto;
  color: var(--gray-400);
  font-size: 0.75rem;
}

/* 今日概览（迷你卡片） */
.analysis-grid-mini {
  grid-template-columns: repeat(4, 1fr);
  margin-top: -12px;
}

.analysis-card-mini .analysis-value {
  font-size: 1.1rem;
}

.analysis-value small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-left: 2px;
}

/* 单词状态分布 */
.analysis-state-bar {
  display: flex;
  height: 18px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 12px;
}

.analysis-state-seg {
  height: 100%;
  transition: width 0.4s ease;
}

.analysis-state-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.analysis-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--gray-600);
}

.analysis-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

/* 教材学习进度 */
.analysis-course-bar .chart-bar-label {
  width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-course-detail {
  font-size: 0.72rem;
  color: var(--gray-400);
  padding-left: 160px;
  margin-top: -6px;
  margin-bottom: 8px;
}

/* 近 14 天趋势 */
.analysis-daily-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 150px;
  padding-top: 10px;
}

.daily-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 2px;
}

.daily-bar {
  width: 70%;
  max-width: 34px;
  background: linear-gradient(180deg, var(--blue-400), var(--blue-600));
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.4s ease;
}

.daily-bar-empty {
  background: var(--gray-100);
}

.daily-bar-val {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1d4ed8;
  height: 14px;
  line-height: 14px;
}

.daily-bar-label {
  font-size: 0.68rem;
  color: var(--gray-400);
}

/* 空状态 */
.analysis-empty {
  padding: 24px;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.85rem;
}

/* ===== 个人信息 ===== */
.profile-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

.profile-avatar-section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--blue-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0 auto 12px;
}

.profile-avatar-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.profile-info-section,
.profile-password-section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.profile-password-section {
  grid-column: 1 / -1;
  margin-top: 0;
}

.profile-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-100);
}

.profile-field {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.profile-field:last-of-type {
  border-bottom: none;
}

.profile-field-label {
  min-width: 80px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  flex-shrink: 0;
}

.profile-field-value {
  font-size: 0.9rem;
  color: var(--gray-800);
}

.profile-field-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  max-width: 280px;
}

.profile-field-input:focus {
  border-color: var(--blue-400);
}

.profile-radio-group {
  display: flex;
  gap: 16px;
}

.profile-save-row {
  padding-top: 16px;
  display: flex;
  gap: 8px;
}

.profile-pwd-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.profile-pwd-msg {
  margin-top: 12px;
  font-size: 0.85rem;
  min-height: 20px;
}

.profile-pwd-msg.success { color: var(--green-600); }
.profile-pwd-msg.error { color: var(--red-500); }

@media (max-width: 768px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== 沉浸式单词学习弹窗 ===== */
.immersive-overlay.page-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  background: transparent;
}

.immersive-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  animation: fadeIn 0.25s ease;
}

.immersive-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
}

.immersive-container.study-card {
  position: relative;
  width: 96%;
  max-width: 640px;
  height: 82vh;
  min-height: 420px;
  max-height: 600px;
  padding: 16px 24px 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: scaleIn 0.3s ease;
  overflow: hidden;
  box-sizing: border-box;
}

/* ===== 卡片通用布局 ===== */
.study-card {
  display: flex;
  flex-direction: column;
  width: 96%;
  max-width: 640px;
  min-height: 380px;
  max-height: 85vh;
  padding: 20px 24px 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  box-sizing: border-box;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 0;
  gap: 4px;
  overflow-y: auto;
  min-height: 0;
}

.card-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  width: 100%;
  gap: 10px;
  height: 80px;
  min-height: 80px;
  box-sizing: border-box;
}

/* 顶部导航 - Flex 自适应，无需 @media */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 6px;
  min-height: 44px;
  padding: 0 0 6px;
  border-bottom: 1px solid #f0f0f0;
}

.header-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  gap: 6px;
}

.textbook-name {
  font-size: 14px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.unit-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.imm-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius-xs);
  color: var(--gray-600);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}

.imm-back-btn:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.imm-phase-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--blue-600);
  background: var(--blue-50);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.imm-topbar-right {
  display: flex;
  align-items: center;
}

.imm-topbar-stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.imm-stat-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
  position: relative;
  cursor: help;
}

/* 手机小屏时隐藏统计文字（纯 Flex 控制，无需 @media） */
.imm-stat-item .stat-label {
  display: none;
}

.imm-stat-item svg {
  stroke: var(--gray-400);
}

/* 自定义 tooltip - 悬浮时显示 */
.imm-stat-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 10px;
  background: var(--gray-800);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-xs);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 10;
  line-height: 1.4;
}

.imm-stat-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 进度条 */
.imm-progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.imm-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.imm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

.imm-progress-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
  min-width: 48px;
  text-align: right;
}

/* 阶段提示 - 全屏居中布局，按钮固定底部 */
.imm-phase-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 24px 16px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  color: #fff;
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  border-radius: var(--radius);
  flex: 1;
  animation: slideDown 0.4s ease;
  box-sizing: border-box;
  box-shadow: var(--shadow-md);
}

.imm-phase-icon {
  display: none;
}

.imm-phase-texts {
  text-align: center;
  max-width: 360px;
}

.imm-phase-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.imm-phase-desc {
  font-size: 1.15rem;
  opacity: 0.92;
  line-height: 1.8;
}

/* 过渡按钮固定在 footer 底部操作栏 */
.imm-step-btns#imm-step-transition-btns {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
}

.imm-phase-banner .btn {
  flex-shrink: 0;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  background: #fff;
  border: none;
  color: #1e40af;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s;
}

.imm-phase-banner .btn:hover {
  background: #f0f9ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.imm-phase-banner .btn:active {
  transform: translateY(0);
}

/* 单词卡片区域 */
.imm-card-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 16px;
  overflow: hidden;
  position: relative;
}

/* ===== 单词展示新布局 ===== */

/* 完整原词（红框位置） */
.word-full {
  font-size: 52px;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  line-height: 1.2;
}

/* 彩色音节容器 */
.syllable-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.syllable-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
  font-size: 36px;
  font-weight: 700;
  padding: 6px 14px;
  background: #f8f9fa;
  border-radius: 12px;
  box-sizing: border-box;
}

.syllable-display .syl-part {
  display: inline;
}

.syllable-display .syl-sep {
  display: inline;
  color: #ccc;
  font-weight: 300;
  margin: 0 2px;
  font-size: 80%;
}

.imm-word-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
  padding: 2px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  flex: 1;
  min-height: 200px;
  box-sizing: border-box;
}

.imm-syllable {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  min-height: 1.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  line-height: 1.3;
}

.imm-syllable .syl-part {
  display: inline;
  transition: all 0.2s;
}

.imm-syllable .syl-sep {
  display: inline;
  color: var(--gray-300);
  font-weight: 300;
  margin: 0 2px;
  font-size: 80%;
  vertical-align: middle;
}

.imm-syllable .syl-part:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.imm-word {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: 0.02em;
  line-height: 1.2;
  min-height: 1.2em;
}

.imm-phonetic {
  font-size: 1.5rem;
  color: var(--gray-400);
  font-weight: 500;
  min-height: 36px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imm-phonics-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 6px 0;
  min-height: 44px;
}

.imm-pos {
  font-size: 1.1rem;
  color: var(--blue-500);
  font-weight: 600;
  font-style: italic;
  min-height: 1.2em;
}

.imm-meaning {
  font-size: 2rem;
  color: var(--gray-600);
  font-weight: 700;
  min-height: 48px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 拓展词义区域 */
.imm-extra-meanings {
  min-height: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 彩色拆分音节颜色类 */
.syl-color-0 { color: #FF6B6B; }  /* 红 */
.syl-color-1 { color: #4ECDC4; }  /* 青 */
.syl-color-2 { color: #45B7D1; }  /* 蓝 */
.syl-color-3 { color: #96CEB4; }  /* 绿 */
.syl-color-4 { color: #D4A574; }  /* 黄棕 */
.syl-color-5 { color: #DDA0DD; }  /* 梅 */
.syl-color-6 { color: #FF8A5C; }  /* 橙 */

/* AI例句 */
.imm-ai-examples {
  margin-top: 8px;
  padding: 10px 14px;
  background: #f5f3ff;
  border-radius: 12px;
  border: 1px solid #ede9fe;
  max-height: 160px;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}
.imm-ai-examples-inner {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.7;
}
.imm-ai-examples-inner .ai-example-en {
  color: var(--gray-600);
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}
.imm-ai-examples-inner .ai-example-cn {
  color: var(--gray-400);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 2px solid var(--purple-300);
}
.imm-ai-examples-inner .ai-loading {
  text-align: center;
  color: var(--purple-400);
  font-size: 0.8rem;
}

.imm-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.imm-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-200);
  transition: all 0.3s;
}

/* ===== 节拍器 ===== */
.rhythm-indicator {
  margin-top: 12px;
  text-align: center;
  animation: fadeInUp 0.4s ease;
}
.rhythm-balls {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  flex-wrap: wrap;
}
.rhythm-ball {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 2px solid transparent;
  cursor: default;
}
.rhythm-ball.active {
  color: #fff;
  transform: scale(1.15);
}
.rhythm-label {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 6px;
  transition: opacity 0.3s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.imm-dots .dot.active {
  background: var(--blue-500);
  transform: scale(1.3);
  box-shadow: 0 0 6px rgba(59,130,246,0.3);
}

.imm-dots .dot.completed {
  background: var(--green-500);
}

/* 拼写区域 */
.imm-spelling {
  padding: 0 20px 0;
  flex-shrink: 0;
  min-height: 52px;
  animation: fadeIn 0.3s ease;
}

.imm-spelling-mode {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 10px;
}

.imm-radio {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--gray-600);
  font-weight: 500;
}

.imm-radio input { accent-color: var(--blue-500); }

.imm-spelling-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.imm-spelling-row button {
  padding: 12px 28px;
  font-size: 1.1rem;
}

.imm-spelling-input {
  flex: none;
  width: 240px;
  padding: 12px 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.1em;
  text-align: center;
}

.imm-spelling-input:focus {
  border-color: var(--blue-400);
}

.imm-spelling-input.correct {
  border-color: var(--green-500);
  background: #f0fdf4;
}

.imm-spelling-input.wrong {
  border-color: var(--red-500);
  background: #fef2f2;
}

.imm-spelling-feedback {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 10px;
  min-height: 1.8em;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.imm-spelling-feedback.correct {
  color: #16a34a;
  background: #f0fdf4;
  font-size: 1.3rem;
}
.imm-spelling-feedback.wrong {
  color: #dc2626;
  background: #fef2f2;
  font-size: 1.1rem;
}
.imm-spelling-feedback .sok { color: #16a34a; font-weight: 700; }
.imm-spelling-feedback .sbad { color: #dc2626; font-weight: 700; text-decoration: underline; }

/* ===== 第三步拼写反馈区 - 全新设计 ===== */
.s3-feedback-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.s3-feedback-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.s3-correct-icon { color: var(--green-500); }
.s3-wrong-icon { color: var(--red-500); }
.s3-feedback-word {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: 1px;
  line-height: 1.3;
}
.s3-feedback-compare {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.3;
}
.s3-feedback-compare .sok { color: #16a34a; }
.s3-feedback-compare .sbad { color: #dc2626; text-decoration: underline; }
.s3-feedback-msg {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}
/* 单词文本上的着色字母 */
.word-full .sok { color: #16a34a; font-weight: 800; }
.word-full .sbad { color: #dc2626; font-weight: 800; text-decoration: underline; text-decoration-color: #dc2626; }
.imm-correct-word {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1a2e;
  background: #fef9c3;
  padding: 4px 14px;
  border-radius: 8px;
  margin: 4px 0;
  letter-spacing: 2px;
}

/* 底部操作栏 - 新布局 */
.imm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  margin: 0 12px 8px;
  width: calc(100% - 24px);
  background: #f8fafc;
  border-radius: 16px;
  flex-shrink: 0;
  min-height: 52px;
  gap: 8px;
  box-sizing: border-box;
}

.imm-footer-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.imm-footer-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.imm-footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

/* 环形倒计时 */
.s1-timer-ring {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.s1-ring-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 5;
}
.s1-ring-progress {
  fill: none;
  stroke: #16a34a;
  stroke-width: 5;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}
.s1-ring-text {
  position: absolute;
  font-size: 20px;
  font-weight: 800;
  color: #16a34a;
  line-height: 1;
  transition: color 0.3s ease;
}
/* 颜色变化 */
.s1-timer-ring.orange .s1-ring-progress { stroke: #f97316; }
.s1-timer-ring.orange .s1-ring-text { color: #f97316; }
.s1-timer-ring.red .s1-ring-progress { stroke: #ef4444; }
.s1-timer-ring.red .s1-ring-text { color: #ef4444; }
/* 闪烁 */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.s1-timer-ring.blink .s1-ring-text {
  animation: blink 0.5s ease-in-out infinite;
}

/* 底部发音按钮 */
.imm-footer-speaker {
  width: 44px;
  height: 44px;
  border: none;
  background: #e0f2fe;
  border-radius: 50%;
  color: #0284c7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.imm-footer-speaker:hover {
  background: #bae6fd;
  transform: scale(1.08);
}
.imm-footer-speaker.speaking {
  background: #dcfce7;
  color: #16a34a;
  animation: pulse 0.6s ease infinite;
}
}

/* 底部发音按钮 */
.imm-nav-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 1px solid var(--gray-200);
  background: #fff;
  border-radius: 10px;
  color: var(--gray-600);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.imm-nav-btn:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.imm-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.imm-nav-next {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: #fff;
}

.imm-nav-next:hover:not(:disabled) {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.imm-footer-center {
  display: flex;
  gap: 6px;
}

.imm-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid var(--gray-200);
  background: #fff;
  border-radius: 8px;
  color: var(--gray-600);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.imm-action-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* 移除底部发音按钮 */
#imm-replay-bottom-btn { display: none !important; }

.imm-action-danger {
  color: var(--red-500);
  border-color: #fecaca;
}

.imm-action-danger:hover {
  background: #fef2f2;
  border-color: var(--red-300);
}



/* 三步骤学习按钮 - 统一高度防止弹窗跳动 */
.imm-step-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 52px;
}
.imm-smile-btn, .imm-cry-btn, .imm-remember-btn, .imm-forgot-btn,
.imm-check-btn, .imm-continue-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px;
  box-sizing: border-box;
  padding: 0 28px; border-radius: var(--radius); font-size: 1rem;
  font-weight: 600; font-family: inherit; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s;
}
.imm-smile-btn { background: #dcfce7; color: var(--green-700); border-color: #86efac; }
.imm-smile-btn:hover { background: #bbf7d0; transform: scale(1.03); }
/* emoji 图标统一尺寸，避免撑高按钮导致高度不一致 */
.imm-smile-icon, .imm-cry-icon {
  font-size: 1.8rem;
  line-height: 1;
  height: 28px;
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.imm-remember-btn > span:first-child,
.imm-forgot-btn > span:first-child {
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.imm-cry-btn { background: #fef2f2; color: var(--red-600); border-color: #fca5a5; }
.imm-cry-btn:hover { background: #fee2e2; transform: scale(1.03); }
.imm-check-btn { border-radius: 14px; }
.imm-check-right { background: #dcfce7; color: var(--green-700); border-color: #86efac; }
.imm-check-right:hover { background: #bbf7d0; }
.imm-check-wrong { background: #fef2f2; color: var(--red-600); border-color: #fca5a5; }
.imm-check-wrong:hover { background: #fee2e2; }
.imm-remember-btn { background: #eff6ff; color: var(--blue-700); border-color: #93c5fd; }
.imm-remember-btn:hover { background: #dbeafe; transform: scale(1.03); }
.imm-forgot-btn { background: #fefce8; color: var(--orange-600); border-color: #fde68a; }
.imm-forgot-btn:hover { background: #fef3c7; transform: scale(1.03); }
.imm-continue-btn { background: var(--blue-500); color: #fff; border-color: var(--blue-500); padding: 0 32px; font-size: 1.05rem; border-radius: var(--radius); box-shadow: var(--shadow-md); font-weight: 700; letter-spacing: 0.02em; transition: all 0.2s; }
.imm-continue-btn:hover { background: var(--blue-600); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
/* 过渡按钮 - 使用系统蓝色 */
.imm-transition-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 32px; height: 48px;
  border-radius: var(--radius); font-size: 18px;
  font-weight: 700; font-family: inherit; cursor: pointer;
  border: none; background: var(--blue-500);
  color: #fff; box-shadow: var(--shadow-md);
  transition: all 0.2s ease; letter-spacing: 1px;
}
.imm-transition-btn:hover {
  background: var(--blue-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.imm-transition-btn:active {
  transform: scale(0.96);
}
.imm-continue-btn:hover { background: var(--blue-600); }
.imm-nav-btn, .imm-nav-next { display: none; }
/* 拼写计时器 - 放在输入行右侧，与第一步样式一致 */
.imm-spell-timer {
  font-size: 1.8rem;
  font-weight: 800;
  min-width: 70px;
  text-align: center;
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}
.imm-spell-timer.normal { color: var(--blue-500); }
.imm-spell-timer.warning { color: var(--orange-500); }
.imm-spell-timer.danger { color: var(--red-500); }
.imm-spell-timer.flash {
  animation: timerFlash 0.5s ease-in-out 3;
}

@keyframes timerFlash {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.15); }
}
/* 拼写结果区 */
.imm-spell-result { text-align: center; padding: 16px; background: var(--gray-50); border-radius: var(--radius); margin: 0 20px 12px; }
.imm-spell-result-word { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.imm-spell-result-hint { font-size: 0.95rem; color: var(--gray-500); margin-bottom: 10px; }
.imm-spell-result-word .sok { color: var(--green-600); }
.imm-spell-result-word .sbad { color: var(--red-500); text-decoration: underline; }
.imm-group-badge { font-size: 0.75rem; font-weight: 600; color: var(--blue-500); background: var(--blue-50); padding: 2px 8px; border-radius: 6px; margin-left: 8px; white-space: nowrap; }

/* 本组5词进度点 */
.imm-sub-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 2px 20px 4px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.imm-sub-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gray-200);
  border: 2px solid var(--gray-300);
  transition: all 0.3s;
}
.imm-sub-dot.active { background: var(--blue-500); border-color: var(--blue-500); transform: scale(1.2); box-shadow: 0 0 6px rgba(59,130,246,0.4); }
.imm-sub-dot.done { background: var(--green-500); border-color: var(--green-500); }
.imm-sub-dot.fail { background: var(--orange-400); border-color: var(--orange-400); }

/* ===== 统一学习卡片容器（过渡页 + 学习页共用）===== */

  margin: auto;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s ease;
}

/* ===== 复习提醒横幅（艾宾浩斯遗忘曲线） ===== */
.review-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7, #ffedd5);
  border: 1px solid #fcd34d;
  animation: fadeIn 0.3s ease;
}
.review-banner-icon { font-size: 1.1rem; }
.review-banner-text {
  flex: 1;
  font-size: 0.85rem;
  color: #92400e;
  font-weight: 500;
}
.review-banner-link {
  color: #d97706;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}
.review-banner-link:hover { text-decoration: underline; }
.review-banner-close {
  background: none;
  border: none;
  color: #b45309;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
}
.review-banner-close:hover { background: rgba(217,119,6,0.15); }

/* ===== 复习提醒弹窗（艾宾浩斯遗忘曲线） ===== */
.review-reminder-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}
.review-reminder-modal {
  background: #fff;
  border-radius: 18px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: scaleIn 0.25s ease;
  overflow: hidden;
}
.review-reminder-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  background: linear-gradient(135deg, #eff6ff, #fdf4ff);
  border-bottom: 1px solid #e5e7eb;
}
.review-reminder-icon { font-size: 1.4rem; }
.review-reminder-header h3 {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.review-reminder-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.review-reminder-close:hover { background: #f3f4f6; }
.review-reminder-body { padding: 24px 24px 20px; text-align: center; }
.review-reminder-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.rr-count-num {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--blue-600, #2563eb);
  line-height: 1;
}
.rr-count-label { font-size: 0.95rem; color: #64748b; }
.review-reminder-curve {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 12px;
}
.rr-curve-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}
.rr-curve-desc { font-size: 0.82rem; color: #64748b; line-height: 1.6; }
.review-reminder-urgent {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  text-align: left;
  line-height: 1.5;
}
.review-reminder-footer {
  display: flex;
  gap: 10px;
  padding: 0 24px 20px;
}
.review-reminder-footer .btn { flex: 1; padding: 11px 12px; }

/* ===== 艾宾浩斯分批复习 - 批间暂停 ===== */
.review-batch-pause {
  padding: 24px 0;
}
.review-batch-pause-card {
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border: 1px solid #e0e7ff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  animation: scaleIn 0.25s ease;
}
.review-batch-pause-icon { font-size: 2.6rem; margin-bottom: 8px; }
.review-batch-pause-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
}
.review-batch-pause-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 16px;
}
.rbp-stat { display: flex; flex-direction: column; align-items: center; }
.rbp-stat-num { font-size: 1.8rem; font-weight: 800; color: var(--blue-600, #2563eb); }
.rbp-stat-ok { color: #16a34a; }
.rbp-stat-no { color: #dc2626; }
.rbp-stat-label { font-size: 0.78rem; color: #64748b; margin-top: 2px; }
.review-batch-pause-progress {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 10px;
}
.review-batch-pause-tip {
  font-size: 0.8rem;
  color: #64748b;
  background: rgba(255,255,255,0.7);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
  margin-bottom: 16px;
}
.review-batch-pause-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.review-batch-pause-actions .btn { padding: 10px 28px; }

/* ===== 复习足迹日历 ===== */
.review-calendar {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.review-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.review-calendar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
}
.review-calendar-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--gray-400);
}
.rc-legend-item { font-size: 0.7rem; }
.review-calendar-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 12px);
  grid-template-columns: repeat(8, 12px);
  gap: 3px;
  justify-content: center;
  padding: 4px 0;
}
.rc-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--gray-100);
  transition: transform 0.15s;
}
.rc-cell:hover {
  transform: scale(1.3);
  z-index: 1;
}
.rc-empty { background: transparent; }
.rc-l0 { background: #eef2f7; }
.rc-l1 { background: #dbeafe; }
.rc-l2 { background: #93c5fd; }
.rc-l3 { background: #3b82f6; }
.rc-l4 { background: #1d4ed8; }
.rc-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.review-calendar-tip {
  margin-top: 8px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ===== 分组学习弹窗 ===== */
.gl-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.gl-modal {
  background: #fff; border-radius: 16px;
  width: 90%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: scaleIn 0.2s ease;
  overflow: hidden;
}
.gl-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem; font-weight: 600; color: #4b5563;
}
.gl-close {
  background: none; border: none; font-size: 1.1rem;
  cursor: pointer; color: #9ca3af; padding: 4px 8px;
  border-radius: 6px; transition: background 0.15s;
}
.gl-close:hover { background: #f3f4f6; }
.gl-body {
  padding: 28px 24px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.gl-phonetic { font-size: 0.9rem; color: #9ca3af; }
.gl-word { font-size: 2.2rem; font-weight: 700; color: #1a1a2e; }
.gl-meaning { font-size: 1.1rem; color: #1a1a2e; min-height: 1.5em; }
.gl-buttons {
  display: flex; gap: 12px; margin-top: 12px; width: 100%;
  justify-content: center;
}
.gl-btn {
  border: none; border-radius: 10px;
  padding: 12px 24px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  font-family: inherit;
}
.gl-btn-positive { background: #dcfce7; color: #16a34a; }
.gl-btn-positive:hover { background: #bbf7d0; }
.gl-btn-negative { background: #fee2e2; color: #dc2626; }
.gl-btn-negative:hover { background: #fecaca; }
.gl-btn-primary { background: #3b82f6; color: #fff; }
.gl-btn-primary:hover { background: #2563eb; }
.gl-spelling-area {
  display: none; flex-direction: column; gap: 10px; width: 100%; align-items: center;
  margin-top: 8px;
  order: -1;
}
.gl-spelling-input {
  width: 100%; max-width: 320px; padding: 14px 18px;
  border: 2.5px solid #cbd5e1; border-radius: 10px;
  font-size: 1.3rem; text-align: center; font-family: inherit;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8fafc;
}
.gl-spelling-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  background: #fff;
}
.gl-feedback {
  font-size: 1.3rem; font-weight: 700; min-height: 1.5em;
  padding: 12px 16px; border-radius: 10px;
  text-align: center; width: 100%;
  box-sizing: border-box;
}
.gl-feedback.correct {
  color: #16a34a;
  background: #f0fdf4;
  font-size: 1.3rem;
}
.gl-feedback.wrong {
  color: #dc2626;
  background: #fef2f2;
  font-size: 1.15rem;
}
.gl-correct-word {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1a2e;
  background: #fef9c3;
  padding: 4px 14px;
  border-radius: 8px;
  margin: 6px 0;
  letter-spacing: 2px;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 24px 0;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-800);
}

.modal-body {
  padding: 20px 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.summary-item {
  text-align: center;
  padding: 16px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}

.summary-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.summary-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gray-800);
}

.summary-warning {
  color: var(--orange-500);
}

.summary-primary {
  color: var(--blue-500);
}

.summary-unit {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-left: 2px;
}

.modal-footer {
  padding: 0 24px 20px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  opacity: 0;
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
  z-index: 9999;
  pointer-events: none;
  text-align: center;
  max-width: 90%;
  border: 1px solid rgba(255,255,255,0.1);
  white-space: pre-line;
  line-height: 1.5;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 紧急提示 - 跳动动画 */
.toast.urgent {
  background: linear-gradient(135deg, #dc2626, #ea580c);
  border-color: rgba(255,255,255,0.25);
  animation: toastBounce 0.5s ease 3;
  box-shadow: 0 8px 32px rgba(220,38,38,0.4);
}

@keyframes toastBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  25% { transform: translateX(-50%) translateY(-8px); }
  50% { transform: translateX(-50%) translateY(0); }
  75% { transform: translateX(-50%) translateY(-4px); }
}

/* ===== 占位页面 ===== */
.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--gray-400);
  gap: 16px;
}

.placeholder-content p {
  font-size: 1rem;
}

/* ===== 滚动条美化 ===== */
.main-content::-webkit-scrollbar {
  width: 6px;
}

.main-content::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .right-panel {
    display: none;
  }
  .main-content {
    margin-right: 0;
  }
}

/* ===== 听力训练 ===== */
/* 模式切换（一级导航：分段控件） */
#lt-mode-tabs { gap: 8px; }
#lt-mode-tabs .filter-tab {
  padding: 8px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 10px;
  background: #f8fafc;
  border-color: #e2e8f0;
}
#lt-mode-tabs .filter-tab:hover {
  border-color: var(--blue-300);
  color: var(--blue-600);
  background: var(--blue-50);
}
#lt-mode-tabs .filter-tab.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.35);
}
/* 考试卡片网格 */
.lt-exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.lt-exam-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.lt-exam-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--blue-300);
}
.lt-exam-card .exam-year {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.lt-exam-card h4 {
  font-size: 0.95rem;
  color: var(--gray-700);
  margin-bottom: 4px;
}
.lt-exam-card .exam-meta {
  font-size: 0.8rem;
  color: var(--gray-400);
}
.lt-exam-card .exam-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--blue-500);
}

/* 答题弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}
.quiz-panel {
  position: relative;
  background: white;
  border-radius: 16px;
  width: 92%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  animation: quizSlideIn 0.25s ease;
}
@keyframes quizSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.quiz-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}
.quiz-close {
  width: 32px; height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.quiz-close:hover { background: var(--gray-200); color: var(--gray-700); }
.quiz-progress {
  height: 4px;
  background: var(--gray-200);
  margin: 0;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  transition: width 0.3s ease;
  border-radius: 0 2px 2px 0;
}
.quiz-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--gray-200);
  gap: 8px;
}
.quiz-counter {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* 弹窗内的题目样式 */
.quiz-question {
  display: none;
}
.quiz-question.active { display: block; }
.quiz-question .q-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-600);
  font-weight: 700;
  font-size: 0.8rem;
  margin-right: 6px;
}
.quiz-question .q-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}
.quiz-question .audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 99px;
  border: none;
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  color: white;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(6,182,212,0.25);
}
.quiz-question .audio-btn:hover { transform: scale(1.05); }
.quiz-question .audio-btn.playing { animation: ltPulse 1s ease infinite; }
@keyframes ltPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(6,182,212,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(6,182,212,0); }
}
.quiz-question .q-options { margin-top: 8px; }
.quiz-question .q-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 6px 0;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
}
.quiz-question .q-option:hover { background: var(--blue-50); border-color: var(--blue-300); }
.quiz-question .q-option.selected { background: var(--blue-50); border-color: var(--blue-400); }
.quiz-question .q-option.correct { background: #f0fdf4; border-color: #22c55e; }
.quiz-question .q-option.wrong { background: #fef2f2; border-color: #ef4444; }
.quiz-question .q-option .opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.quiz-question .q-option.selected .opt-letter { background: var(--blue-500); color: white; }
.quiz-question .q-option.correct .opt-letter { background: #22c55e; color: white; }
.quiz-question .q-option.wrong .opt-letter { background: #ef4444; color: white; }
.quiz-question .q-transcript {
  margin-top: 12px;
  padding: 12px 16px;
  background: #f0f9ff;
  border-radius: var(--radius-sm);
  border-left: 3px solid #0ea5e9;
  font-size: 0.85rem;
  line-height: 1.8;
  display: none;
}
.quiz-question .q-result {
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  display: none;
}
.quiz-question .q-result.show { display: inline-block; }
.quiz-question .q-result.correct { background: #f0fdf4; color: #16a34a; }
.quiz-question .q-result.wrong { background: #fef2f2; color: #dc2626; }

/* 报告弹窗 */
.report-summary {
  text-align: center;
  padding: 16px 0 20px;
}
.report-summary .big-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--blue-600);
}
.report-summary .big-score span { font-size: 1.2rem; color: var(--gray-400); }
.report-summary .report-label { color: var(--gray-500); margin-top: 4px; font-size: 0.9rem; }
.report-summary .report-sub { color: var(--gray-400); font-size: 0.82rem; }
.report-detail-item {
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: var(--radius-xs);
  border: 1px solid var(--gray-200);
  font-size: 0.85rem;
}
.report-detail-item.correct { border-color: #22c55e; background: #f0fdf4; }
.report-detail-item.wrong { border-color: #ef4444; background: #fef2f2; }

/* 错题/报告列表 */
.lt-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.lt-list-item {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow);
}
.lt-list-item:hover { box-shadow: var(--shadow-md); }
.lt-list-item .item-title { font-size: 0.9rem; font-weight: 600; color: var(--gray-700); }
.lt-list-item .item-meta { font-size: 0.8rem; color: var(--gray-400); margin-top: 2px; }
.lt-list-item .item-score { font-size: 1.2rem; font-weight: 700; color: var(--blue-600); }

/* 旧听力样式保留（兼容） */
.listening-hint { font-size: 0.8rem; color: var(--gray-400); }
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85rem;
  justify-content: space-between;
}

.listening-command-box code {
  font-size: 0.85rem;
  user-select: all;
}

.listening-command-box .btn {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 4px 10px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.listening-command-box .btn:hover {
  background: rgba(255,255,255,0.25);
}

.listening-hint {
  font-size: 0.8rem;
  color: var(--gray-400);
}

.listening-offline-message .btn-primary {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding: 16px;
  }
  .learning-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .learning-stats {
    justify-content: center;
  }
}

/* ===== 左侧栏顶部用户信息 ===== */
.sidebar-userinfo {
  padding: 14px 12px;
  background: linear-gradient(135deg, var(--blue-50), #fff);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.sui-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sui-info {
  flex: 1;
  min-width: 0;
}
.sui-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 2px;
}
.sui-stats {
  display: flex;
  gap: 8px;
  font-size: 0.62rem;
  color: var(--gray-400);
}
.sui-stats strong {
  color: var(--gray-700);
  font-weight: 600;
}
.sui-warn { color: var(--orange-500) !important; }
.sui-logout {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sui-logout:hover {
  background: var(--gray-100);
  color: var(--red-500);
}


/* ===== 单元测试弹窗 ===== */
.unit-test-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:1000;display:flex;align-items:center;justify-content:center;}
.unit-test-backdrop{position:absolute;inset:0;}
.unit-test-dialog{position:relative;background:#fff;border-radius:16px;width:90%;max-width:700px;max-height:85vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,0.3);animation:scaleIn 0.2s ease;}
.unit-test-dialog-lg{max-width:900px;}
.ut-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--gray-200);}
.ut-title{font-size:1.1rem;font-weight:700;}
.ut-header-right{display:flex;align-items:center;gap:10px;}
.ut-timer{font-size:0.9rem;font-weight:600;color:var(--red-500);}
.ut-close{background:none;border:none;font-size:1.2rem;cursor:pointer;color:var(--gray-400);padding:4px 8px;border-radius:4px;}
.ut-close:hover{background:var(--gray-100);}
.ut-progress{height:4px;background:var(--gray-200);}
.ut-progress-fill{height:100%;background:var(--blue-500);transition:width 0.3s;}
.ut-body{padding:24px 20px;min-height:200px;}
.ut-q-card{text-align:center;}
.ut-q-word{font-size:2rem;font-weight:700;color:var(--gray-800);margin-bottom:8px;}
.ut-q-meaning{font-size:1.1rem;color:var(--gray-500);margin-bottom:12px;}
.ut-q-prompt{font-size:0.85rem;color:var(--gray-500);margin-bottom:16px;}
.ut-input{width:260px;padding:10px 14px;border:2px solid var(--gray-200);border-radius:8px;font-size:1rem;text-align:center;outline:none;}
.ut-input:focus{border-color:var(--blue-400);}
.ut-choices{display:flex;flex-direction:column;gap:8px;max-width:400px;margin:0 auto;}
.ut-choice{padding:10px 16px;border:2px solid var(--gray-200);border-radius:8px;background:#fff;font-size:0.9rem;cursor:pointer;text-align:left;transition:all 0.15s;}
.ut-choice:hover{border-color:var(--blue-300);background:var(--blue-50);}
.ut-choice.correct{border-color:var(--green-500);background:#f0fdf4;}
.ut-choice.wrong{border-color:var(--red-500);background:#fef2f2;}
.ut-result{padding:24px 20px;text-align:center;}
.ut-score{font-size:2rem;font-weight:700;margin-bottom:12px;color:var(--blue-600);}
.ut-detail{text-align:left;max-height:300px;overflow-y:auto;margin-bottom:16px;}
.ut-detail-item{display:flex;gap:12px;padding:8px 12px;border-radius:6px;margin-bottom:4px;font-size:0.85rem;flex-wrap:wrap;}

/* ===== 单元测试/听写 - 单元选择弹窗 ===== */
.unit-selector-dialog{position:relative;background:#fff;border-radius:16px;width:90%;max-width:520px;max-height:80vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,0.3);animation:scaleIn 0.2s ease;}
.unit-selector-body{padding:16px 20px 20px;min-height:80px;}
.us-loading{text-align:center;color:var(--gray-400);padding:30px 0;font-size:0.9rem;}
.us-grid{display:flex;flex-direction:column;gap:8px;}
.us-unit{display:flex;flex-direction:column;padding:12px 16px;border-radius:10px;border:1px solid var(--gray-200);transition:all 0.15s;cursor:pointer;position:relative;}
.us-unit.unlocked{background:#fff;}
.us-unit.unlocked:hover{border-color:var(--blue-400);background:var(--blue-50);box-shadow:0 2px 8px rgba(59,130,246,0.15);}
.us-unit.locked{background:var(--gray-100);opacity:0.6;cursor:not-allowed;}
.us-unit.locked:hover{border-color:var(--gray-300);}
.us-unit-top{display:flex;align-items:center;gap:8px;margin-bottom:4px;}
.us-unit-icon{font-size:1.1rem;}
.us-unit-name{font-weight:600;font-size:0.9rem;color:var(--gray-800);}
.us-unit-info{font-size:0.78rem;color:var(--gray-400);padding-left:26px;}
.us-score-tip{margin-top:6px;padding:8px 10px;background:#f0f9ff;border:1px solid #bae6fd;border-radius:8px;font-size:0.78rem;color:var(--gray-600);animation:fadeIn 0.2s ease;}
.us-score{line-height:1.5;}
.us-score small{color:var(--gray-400);font-size:0.7rem;}
.us-score-none{color:var(--gray-400);font-style:italic;}
@keyframes fadeIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.ut-correct{background:#f0fdf4;}
.ut-wrong{background:#fef2f2;}

/* ===== 试卷详情 ===== */
.tp-header{display:flex;justify-content:space-between;align-items:center;padding:8px 0 16px;border-bottom:1px solid var(--gray-200);margin-bottom:16px;flex-wrap:wrap;gap:8px;}
.tp-header-left{display:flex;flex-direction:column;gap:4px;}
.tp-header-title{font-size:0.9rem;font-weight:600;color:var(--gray-700);}
.tp-header-meta{font-size:0.78rem;color:var(--gray-400);}
.tp-header-right{text-align:right;}
.tp-header-score{font-size:1.5rem;font-weight:700;color:var(--blue-600);}
.tp-header-label{font-size:0.75rem;color:var(--gray-400);}

.tp-question{padding:14px 16px;border-radius:10px;margin-bottom:10px;border:1px solid var(--gray-200);background:#fff;}
.tp-question.tp-correct{border-color:#86efac;background:#f0fdf4;}
.tp-question.tp-wrong{border-color:#fca5a5;background:#fef2f2;}
.tp-q-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;}
.tp-q-num{font-weight:600;font-size:0.85rem;color:var(--gray-600);}
.tp-q-word{font-size:1.05rem;font-weight:700;color:var(--gray-800);}
.tp-q-meaning{font-size:0.82rem;color:var(--gray-500);margin-bottom:6px;}
.tp-q-answers{display:flex;flex-direction:column;gap:3px;font-size:0.82rem;}
.tp-q-answer{display:flex;gap:8px;align-items:center;}
.tp-q-answer-label{color:var(--gray-400);min-width:44px;}
.tp-q-answer-value{font-weight:500;}
.tp-q-answer-value.correct{color:#16a34a;}
.tp-q-answer-value.wrong{color:#dc2626;text-decoration:line-through;}
.tp-q-answer-value.right-answer{color:#16a34a;font-weight:600;}

.tp-summary-bar{display:flex;gap:16px;padding:12px 16px;background:var(--gray-50);border-radius:10px;margin-bottom:16px;flex-wrap:wrap;}
.tp-summary-item{font-size:0.82rem;color:var(--gray-500);}
.tp-summary-item strong{font-size:1rem;}
.tp-summary-item.ok strong{color:#16a34a;}
.tp-summary-item.fail strong{color:#dc2626;}

.tp-clickable{cursor:pointer;text-decoration:underline;text-decoration-style:dashed;text-underline-offset:3px;}
.tp-clickable:hover{color:var(--blue-600);}

/* 测试记录 - 名称副标题 */
.tp-record-meta{font-size:0.75rem;color:var(--gray-400);margin-top:2px;}

/* 测试记录 - 原始试卷 */
.tp-paper-options{display:flex;flex-direction:column;gap:4px;margin:6px 0 8px;}
.tp-paper-option{display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid var(--gray-200);border-radius:8px;font-size:0.82rem;color:var(--gray-600);}
.tp-paper-opt-letter{font-weight:700;color:var(--gray-400);width:16px;flex-shrink:0;text-align:center;}
.tp-paper-option.is-correct{border-color:#86efac;background:#f0fdf4;color:#166534;}
.tp-paper-option.is-correct .tp-paper-opt-letter{color:#16a34a;}
.tp-paper-option.is-user-wrong{border-color:#fca5a5;background:#fef2f2;color:#991b1b;}
.tp-paper-option.is-user-wrong .tp-paper-opt-letter{color:#dc2626;}
.tp-paper-opt-mark{margin-left:auto;flex-shrink:0;font-weight:600;font-size:0.75rem;}
.tp-paper-badge{font-size:0.7rem;color:#3b82f6;background:#eff6ff;border-radius:999px;padding:1px 8px;margin-left:auto;flex-shrink:0;}
.tp-paper-passage{font-size:0.82rem;color:var(--gray-600);line-height:1.7;background:var(--gray-50);border-radius:8px;padding:8px 12px;margin-bottom:6px;white-space:pre-wrap;}

/* 测试记录 - 通用详情弹窗（词汇/诊断报告） */
.tp-section-title{font-size:0.85rem;font-weight:600;color:var(--gray-700);margin:16px 0 8px;text-align:left;}
.tp-grade-list{display:flex;flex-direction:column;gap:8px;}
.tp-grade-row{display:flex;align-items:center;gap:10px;font-size:0.85rem;}
.tp-grade-name{width:110px;color:var(--gray-600);flex-shrink:0;text-align:left;}
.tp-grade-bar{flex:1;height:8px;background:var(--gray-200);border-radius:4px;overflow:hidden;}
.tp-grade-bar-fill{display:block;height:100%;background:linear-gradient(90deg,var(--blue-400),var(--blue-600));border-radius:4px;}
.tp-grade-rate{width:44px;text-align:right;font-weight:600;color:var(--gray-700);}
.tp-grade-status{width:90px;text-align:right;color:var(--gray-500);flex-shrink:0;}
.tp-rec-list{display:flex;flex-direction:column;gap:6px;}
.tp-rec-item{font-size:0.85rem;color:var(--gray-600);line-height:1.7;padding:6px 10px;background:var(--gray-50);border-radius:8px;text-align:left;}

/* ===== 测试记录表格 ===== */
.data-table{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden;box-shadow:var(--shadow-sm);}
.data-table th{background:var(--gray-50);padding:12px 16px;text-align:left;font-size:0.8rem;font-weight:600;color:var(--gray-500);border-bottom:2px solid var(--gray-200);}
.data-table td{padding:10px 16px;border-bottom:1px solid var(--gray-100);font-size:0.85rem;}
.data-table tr:hover td{background:var(--blue-50);}
.pagination{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:16px;font-size:0.82rem;color:var(--gray-500);}

@keyframes scaleIn{from{opacity:0;transform:scale(0.95)}to{opacity:1;transform:scale(1)}}
@keyframes flash{0%,100%{opacity:1}50%{opacity:0.3}}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* ===== 单元测试/听写 - 增强样式 ===== */
.ut-header-left{display:flex;align-items:center;}
.ut-q-type{font-size:0.8rem;color:var(--blue-600);font-weight:600;margin-bottom:8px;text-align:center;}
.ut-q-desc{font-size:0.78rem;color:var(--gray-400);text-align:center;margin-bottom:12px;}
.ut-clickable-audio{cursor:pointer;color:var(--blue-600)!important;}
.ut-clickable-audio:hover{text-decoration:underline;}
.ut-q-footer{display:flex;justify-content:center;padding:12px 0 0;margin-top:8px;}
.ut-q-hint{font-size:0.75rem;color:var(--gray-400);}

/* 环形倒计时 */
.ut-timer-ring{position:relative;width:44px;height:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.ut-timer-ring svg{position:absolute;}
.ut-ring-circle{transition:stroke-dashoffset 0.3s linear,stroke 0.3s;}
.ut-timer-num{font-size:0.7rem;font-weight:700;z-index:1;transition:color 0.3s;}
.ut-timer-flash{animation:flash 0.5s infinite;}

/* 听写音频按钮 */
.ut-dict-audio-btn{display:inline-flex;align-items:center;gap:6px;padding:10px 24px;background:var(--blue-50);border:2px solid var(--blue-200);border-radius:12px;font-size:1.1rem;cursor:pointer;color:var(--blue-700);margin-bottom:12px;transition:all 0.15s;}
.ut-dict-audio-btn:hover{background:var(--blue-100);border-color:var(--blue-400);transform:scale(1.03);}
.ut-dict-phonetic{font-size:0.85rem;color:var(--gray-400);margin-bottom:8px;}
.ut-dict-word-hint{font-size:0.75rem;color:var(--gray-300);margin-top:4px;}
.ut-dict-correct-answer{font-size:1.1rem;font-weight:700;color:#16a34a;margin-top:8px;}

/* 听写开关 */
.ut-dictation-switches{display:flex;align-items:center;gap:8px;}
.ut-switch{display:flex;align-items:center;gap:4px;font-size:0.8rem;cursor:pointer;user-select:none;}
.ut-switch input{display:none;}
.ut-switch-slider{width:28px;height:16px;background:#d1d5db;border-radius:8px;position:relative;transition:background 0.2s;}
.ut-switch-slider::after{content:'';position:absolute;top:2px;left:2px;width:12px;height:12px;background:#fff;border-radius:50%;transition:transform 0.2s;}
.ut-switch input:checked+.ut-switch-slider{background:#3b82f6;}
.ut-switch input:checked+.ut-switch-slider::after{transform:translateX(12px);}

/* 底部导航 */
.ut-footer{display:flex;align-items:center;justify-content:space-between;padding:10px 20px;border-top:1px solid var(--gray-200);}
.ut-footer-left,.ut-footer-right{display:flex;gap:8px;}
.ut-footer-btn{background:none;border:1px solid var(--gray-200);padding:6px 14px;border-radius:6px;font-size:0.8rem;cursor:pointer;color:var(--gray-600);transition:all 0.15s;}
.ut-footer-btn:hover{background:var(--gray-50);border-color:var(--gray-400);}
.ut-skip-btn{color:var(--gray-400);font-size:0.75rem;}
.ut-skip-btn:hover{color:var(--gray-600);}

/* 导航点 */
.ut-nav-dots{display:flex;gap:4px;flex-wrap:wrap;justify-content:center;max-width:300px;}
.ut-nav-dot{width:8px;height:8px;border-radius:50%;background:#d1d5db;cursor:pointer;transition:all 0.15s;}
.ut-nav-dot:hover{transform:scale(1.3);}
.ut-nav-dot-current{width:10px;height:10px;background:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,0.3);}
.ut-nav-dot-correct{background:#22c55e;}
.ut-nav-dot-wrong{background:#ef4444;}

/* 测试报告 */
.tr-container{padding:4px 0;text-align:center;}
.tr-header{margin-bottom:16px;}
.tr-icon{font-size:2.5rem;margin-bottom:4px;}
.tr-title{font-size:1.15rem;font-weight:700;color:var(--gray-800);}
.tr-subtitle{font-size:0.82rem;color:var(--gray-400);margin-top:2px;}
.tr-score-section{display:flex;align-items:baseline;justify-content:center;gap:4px;margin-bottom:4px;}
.tr-score-big{font-size:2.8rem;font-weight:800;line-height:1;}
.tr-score-label{font-size:1rem;color:var(--gray-400);}
.tr-score-grade{font-size:0.85rem;color:var(--gray-500);margin-bottom:8px;}
.tr-meta{display:flex;gap:16px;justify-content:center;font-size:0.78rem;color:var(--gray-400);margin-bottom:16px;flex-wrap:wrap;}
.tr-dimensions{text-align:left;background:var(--gray-50);border-radius:10px;padding:14px 16px;margin-bottom:14px;}
.tr-dim-title{font-size:0.82rem;font-weight:600;color:var(--gray-600);margin-bottom:8px;}
.tr-dimension{display:flex;align-items:center;gap:8px;font-size:0.78rem;color:var(--gray-500);margin-bottom:6px;}
.tr-dim-label{min-width:70px;}
.tr-dim-bar{flex:1;height:6px;background:#e5e7eb;border-radius:3px;overflow:hidden;}
.tr-dim-fill{display:block;height:100%;background:#3b82f6;border-radius:3px;transition:width 0.5s;}
.tr-dim-num{min-width:36px;text-align:right;font-weight:500;color:var(--gray-600);}
.tr-state-changes{text-align:left;padding:10px 0;margin-bottom:12px;}
.tr-state-change{font-size:0.82rem;padding:3px 0;}
.tr-state-change.ok{color:#16a34a;}
.tr-state-change.fail{color:#dc2626;}
.tr-state-change.warn{color:#d97706;}
.tr-review{text-align:left;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:10px 14px;margin-bottom:14px;}
.tr-review-title{font-size:0.8rem;font-weight:600;color:#92400e;margin-bottom:4px;}
.tr-review-words{font-size:0.85rem;color:#92400e;}
.tr-detail-toggle{font-size:0.82rem;color:var(--blue-500);cursor:pointer;padding:6px 0;user-select:none;}
.tr-detail-toggle:hover{text-decoration:underline;}
.tr-detail-list{text-align:left;max-height:250px;overflow-y:auto;margin:8px 0;}
.tr-detail-item{display:flex;gap:8px;align-items:center;padding:6px 10px;border-radius:6px;margin-bottom:3px;font-size:0.78rem;flex-wrap:wrap;}
.tr-detail-correct{background:#f0fdf4;}
.tr-detail-wrong{background:#fef2f2;}
.tr-detail-skip{background:#f9fafb;color:var(--gray-400);}
.tr-detail-num{font-weight:600;color:var(--gray-400);min-width:20px;}
.tr-detail-word{font-weight:600;min-width:80px;}
.tr-detail-meaning{color:var(--gray-500);min-width:80px;}
.tr-detail-answer{color:var(--gray-600);}
.tr-detail-correct-ans{color:#16a34a;font-weight:500;}
.tr-buttons{display:flex;gap:8px;justify-content:center;margin-top:12px;flex-wrap:wrap;}

/* 听写通关反馈 */
.tr-dictation-pass{background:#f0fdf4;border:1px solid #86efac;border-radius:10px;padding:12px;margin-bottom:12px;}
.tr-dictation-pass-title{font-size:1rem;font-weight:700;color:#16a34a;margin-bottom:4px;}
.tr-dictation-pass-desc{font-size:0.82rem;color:var(--gray-500);}
.tr-dictation-next{font-size:0.8rem;color:var(--blue-600);margin-top:6px;font-weight:500;}
.tr-dictation-fail{background:#fef2f2;border:1px solid #fca5a5;border-radius:10px;padding:12px;margin-bottom:12px;}
.tr-dictation-fail-title{font-size:1rem;font-weight:700;color:#dc2626;margin-bottom:4px;}
.tr-dictation-fail-desc{font-size:0.82rem;color:var(--gray-500);}

/* ===== 单词突击 ===== */
.checkbox-card { transition: all 0.2s; user-select: none; }
.checkbox-card.checked { border-color: var(--blue-500) !important; box-shadow: 0 0 0 2px var(--blue-200); }
.checkbox-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.assault-mode-container { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#spell-input:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-100); }
#flash-options button { transition: all 0.15s; }
#flash-options button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
#flash-options button:active { transform: translateY(0); }

/* ===== 沉浸式学习 - 单词加载骨架屏 ===== */
.imm-loading-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 32px;
  background: #fff;
  z-index: 5;
}
.imm-loading-skeleton .skeleton-row {
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: imm-skeleton-shimmer 1.4s ease infinite;
}
.imm-loading-skeleton .skeleton-word { width: 220px; height: 44px; border-radius: 10px; }
.imm-loading-skeleton .skeleton-syllable { width: 180px; height: 22px; }
.imm-loading-skeleton .skeleton-phonetic { width: 130px; height: 18px; }
.imm-loading-skeleton .skeleton-meaning { width: 240px; height: 18px; }
.imm-loading-skeleton .skeleton-dots { width: 120px; height: 12px; border-radius: 6px; }

@keyframes imm-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* 骨架屏显示时隐藏单词卡片内容（避免穿透） */
.imm-loading-skeleton ~ .imm-word-card {
  visibility: hidden;
}
