/* 学习表 · 调度层样式（学习步 / 复习上限 / 顽固词 / 四档 / 减负日 / 负载预测 / 回忆守卫） */

.study-badge.learn { background: #e0e7ff; color: #4338ca; }
.study-badge.leech { background: #fee2e2; color: #b91c1c; }

/* ---- 回忆耗时标记 ---- */
.study-recall {
  font-size: 11px;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* ---- 隐藏释义 + 点击展开 ---- */
.study-reveal { margin: 6px 0; }
.study-reveal .reveal-btn {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.study-reveal .reveal-btn:hover { background: #dbeafe; border-color: #60a5fa; }

.study-item .study-answer[hidden] { display: none; }
.study-answer:not([hidden]) {
  margin: 6px 0;
  padding: 8px 10px;
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
  border-radius: 4px;
}

/* ---- 回忆太快提示 ---- */
.study-hint {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%) translateY(10px);
  max-width: 90vw;
  padding: 10px 18px;
  font-size: 13px;
  color: #fff;
  background: rgba(30, 41, 59, .94);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
}
.study-hint.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.study-warn {
  margin: 10px 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.study-warn b { color: #b45309; }

.study-note {
  margin: 8px 0;
  padding: 8px 12px;
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 6px;
}

.study-algo {
  margin: 8px 0 10px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
}

/* ---- 设置面板 ---- */
.study-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 14px;
  padding: 10px 14px;
  font-size: 13px;
  color: #374151;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.study-settings label { display: flex; align-items: center; gap: 6px; }
.study-settings select {
  padding: 3px 6px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
}

/* ---- 减负日 chip ---- */
.study-easy-days { gap: 4px; }
.ed-chip {
  min-width: 26px;
  padding: 2px 0;
  font-size: 12px;
  color: #475569;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  cursor: pointer;
  transition: all .15s;
}
.ed-chip:hover { border-color: #94a3b8; }
.ed-chip.on { color: #fff; background: #6366f1; border-color: #6366f1; }

/* ---- 负载预测图 ---- */
.study-forecast {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.fc-title { font-size: 12px; color: #64748b; margin-bottom: 8px; }
.fc-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 90px;
}
.fc-col {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}
.fc-bar {
  width: 100%;
  max-width: 22px;
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  border-radius: 3px 3px 0 0;
  transition: height .3s;
}
.fc-col:first-child .fc-bar { background: linear-gradient(180deg, #34d399, #10b981); }
.fc-num { font-size: 10px; color: #64748b; margin-bottom: 2px; }
.fc-day { font-size: 9px; color: #94a3b8; margin-top: 3px; white-space: nowrap; }

.study-leech-num { color: #dc2626; }

.study-group.leech {
  color: #b91c1c;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  padding-left: 8px;
}
.study-group-hint {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
}

/* ---- 深色模式 ---- */
[data-theme="dark"] .study-warn,
body.dark .study-warn {
  color: #fcd34d;
  background: rgba(180, 83, 9, .15);
  border-color: rgba(251, 191, 36, .35);
}
[data-theme="dark"] .study-note,
body.dark .study-note { color: #cbd5e1; background: rgba(148, 163, 184, .12); }
[data-theme="dark"] .study-settings,
body.dark .study-settings {
  color: #cbd5e1;
  background: rgba(148, 163, 184, .1);
  border-color: rgba(148, 163, 184, .25);
}
[data-theme="dark"] .study-settings select,
body.dark .study-settings select { color: #e2e8f0; background: #1e293b; border-color: #334155; }
[data-theme="dark"] .study-forecast,
body.dark .study-forecast { background: rgba(148, 163, 184, .08); border-color: rgba(148, 163, 184, .2); }
[data-theme="dark"] .ed-chip,
body.dark .ed-chip { color: #cbd5e1; background: #1e293b; border-color: #334155; }
[data-theme="dark"] .ed-chip.on,
body.dark .ed-chip.on { background: #6366f1; border-color: #6366f1; color: #fff; }
[data-theme="dark"] .study-badge.learn,
body.dark .study-badge.learn { background: rgba(99, 102, 241, .25); color: #c7d2fe; }
[data-theme="dark"] .study-group.leech,
body.dark .study-group.leech { background: rgba(239, 68, 68, .12); color: #fca5a5; }
[data-theme="dark"] .study-reveal .reveal-btn,
body.dark .study-reveal .reveal-btn { color: #93c5fd; background: rgba(59, 130, 246, .15); border-color: rgba(147, 197, 253, .4); }
[data-theme="dark"] .study-answer:not([hidden]),
body.dark .study-answer:not([hidden]) { background: rgba(34, 197, 94, .12); border-left-color: #22c55e; }
[data-theme="dark"] .study-recall,
body.dark .study-recall { color: #94a3b8; background: rgba(148, 163, 184, .15); }
