/* resources.css — 跨平台学习资源卡片（延伸学习 / 去补强 共用，全局） */
/* 设计跟随 recommend.css 的 token：--brand / --text / --text-light / --card / --border */

/* ── 资源列表容器 ── */
.res-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* ── 单张资源卡 ── */
.res-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; text-decoration: none;
  background: var(--bg-soft, #fafbfc); border: 1px solid var(--border, #eef0f3);
  color: var(--text, #111827); transition: border-color .15s, transform .05s, box-shadow .15s;
}
.res-card:hover { border-color: var(--brand, #4A72FF); box-shadow: 0 2px 8px rgba(74,114,255,.12); }
.res-card:active { transform: scale(.995); }

.res-plat {
  flex: 0 0 auto; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  color: #fff; background: #8a93a6; white-space: nowrap;
}
.res-plat--bilibili { background: #fb7299; }
.res-plat--wechat { background: #07c160; }
.res-plat--xiaohongshu { background: #ff2741; }
.res-plat--douyin { background: #161823; }
.res-plat--website { background: #4A72FF; }
.res-plat--official_oj { background: #f0883e; }
.res-plat--mooc { background: #9b59b6; }

.res-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res-title { font-size: .94rem; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-sub { font-size: .78rem; color: var(--text-light, #6b7280); }
.res-stars { color: #f5a623; letter-spacing: 1px; }
.res-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.res-tag { font-size: .7rem; color: var(--text-light, #6b7280); background: var(--border, #eef0f3); border-radius: 6px; padding: 1px 6px; }
.res-go { flex: 0 0 auto; font-size: .82rem; color: var(--brand, #4A72FF); font-weight: 600; white-space: nowrap; }

/* ── 题目讲解内「延伸学习」面板 ── */
.ai-expl-learn { margin-top: 14px; }
.ai-expl-learn-body { margin-top: 8px; }
.ai-expl-learn-topics { font-size: .8rem; color: var(--text-light, #6b7280); margin-bottom: 6px; }
.ai-expl-learn-empty { font-size: .85rem; color: var(--text-light, #6b7280); padding: 10px 0; }

/* ── 错题本「去补强」面板 ── */
.result-reinforce { margin: 0 0 18px; }
.reinforce-toggle { width: 100%; justify-content: flex-start; text-align: left; }
.reinforce-body { margin-top: 12px; }
.reinforce-meta { font-size: .82rem; color: var(--text-light, #6b7280); margin-bottom: 8px; }

/* 复用 spinner（若全局未定义则兜底） */
.spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px;
  border: 2px solid var(--border, #e5e7eb); border-top-color: var(--brand, #4A72FF);
  border-radius: 50%; animation: res-spin .7s linear infinite;
}
@keyframes res-spin { to { transform: rotate(360deg); } }
.rec-loading { padding: 14px 4px; color: var(--text-light, #6b7280); font-size: .88rem; }
