:root {
  --bg: #f4f5fa;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --line: #e6e8f0;
  --brand: #5b5bd6;
  --brand-2: #8b5cf6;
  --brand-soft: #eef0ff;
  --danger: #e5484d;
  --success: #12a594;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(31, 36, 48, 0.07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
.wrap.wide { max-width: 1120px; }

/* ---------- 醒目返回按钮（子页面左上角 FAB） ---------- */
.back-fab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; margin-bottom: 14px;
  background: #fff; color: var(--brand);
  border: 2px solid var(--brand);
  border-radius: 999px; font-size: 15px; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 12px rgba(91, 91, 214, 0.18);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  user-select: none;
}
.back-fab:hover { background: var(--brand-soft); transform: translateX(-2px); box-shadow: 0 6px 16px rgba(91, 91, 214, 0.28); }
.back-fab:active { transform: translateX(0); }

/* ---------- 顶部 ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 134px;
  background: linear-gradient(135deg, #5b5bd6 0%, #8b5cf6 60%, #a855f7 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  border-radius: 22px;
  padding: 26px 24px;
  box-shadow: 0 10px 30px rgba(91, 91, 214, 0.28);
  margin-bottom: 18px;
  overflow: hidden;
}
/* 自定义背景图：min-height 跟随图片原始比例（hero.js 按 宽度÷比例 算出 --hero-min-height），
 * 整张图完整显示、不拉伸变形；遮罩做成「左深右透」的横向渐变：文字都在左侧，
 * 只压暗左半边即可保证白字清晰，右半边保留原图的通透感 —— 整块均匀压暗会把 KV 压得发灰。
 * 遮罩颜色（--hero-overlay-rgb）与文字颜色 / 字号都可在后台「外观设置」里自定义。 */
.hero.has-image {
  /* 高度 = max(按图片比例算出的高度, 152px)。不用 aspect-ratio 固定死：
   * 字号调大后内容会超过比例高度，固定比例会被 overflow:hidden 裁掉文字；
   * 用 min-height 则内容高时横幅自动撑高（背景 cover 裁两侧，仍可接受）。 */
  min-height: var(--hero-min-height, 152px);
  background-size: cover;
  /* 文案靠下排布，避开绝大多数 KV 放在左上角的 logo / 标识 */
  justify-content: flex-end;
  padding-bottom: 28px;
  /* 遮罩颜色走 --hero-overlay-rgb（"r, g, b" 形式），后台可自定义，默认深紫 42,26,96 */
  background-image:
    linear-gradient(
      90deg,
      rgba(var(--hero-overlay-rgb, 42, 26, 96), var(--hero-overlay, 0.45)) 0%,
      rgba(var(--hero-overlay-rgb, 42, 26, 96), calc(var(--hero-overlay, 0.45) * 0.82)) 34%,
      rgba(var(--hero-overlay-rgb, 42, 26, 96), calc(var(--hero-overlay, 0.45) * 0.22)) 60%,
      rgba(var(--hero-overlay-rgb, 42, 26, 96), 0) 78%
    ),
    var(--hero-image);
}
/* 背景图上的文字加一层阴影，进一步保证在浅色区域也读得清 */
.hero.has-image > * { text-shadow: 0 1px 4px rgba(8, 10, 26, 0.45); }
/* 无背景图时保持原来的紧凑高度，不继承比例高度 */
.hero:not(.has-image) { min-height: 134px; }
/* max-width 必须有：hero 是 align-items:flex-start 的 flex 列，
 * 子项默认按内容宽度撑开，长文案在窄容器（学员端）里会横向溢出被 overflow:hidden 裁掉。 */
.hero > * { position: relative; z-index: 1; max-width: 100%; }
/* 文字颜色 / 字号全部走 CSS 变量，后台「外观设置」可逐项自定义；不写变量时用默认值 */
.hero h1 { margin: 0 0 6px; font-size: var(--hero-title-size, 22px); letter-spacing: 0.5px; color: var(--hero-title-color, #fff); }
.hero p { margin: 0; opacity: 0.9; font-size: var(--hero-sub-size, 13.5px); line-height: 1.5; color: var(--hero-sub-color, #fff); }
.hero .badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: var(--hero-badge-size, 12px);
  color: var(--hero-badge-color, #fff);
  margin-bottom: 10px;
}
/* 横幅右上角按钮组：退出登录 + 「编辑这块」入口（后者仅管理端出现） */
.hero-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-edit,
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* 用深色玻璃底而不是白色半透明底：自定义底图多为浅色调（如白底 KV），
   * 白底按钮压在浅色图上几乎看不见。深色底在浅图 / 深图上都有足够对比度。 */
  background: rgba(16, 18, 42, 0.52);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  backdrop-filter: blur(6px);
  text-shadow: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  transition: background 0.15s, transform 0.15s;
}
.hero-edit:hover,
.logout-btn:hover { background: rgba(16, 18, 42, 0.78); transform: translateY(-1px); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--danger); margin-left: 3px; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 6px; }

input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fbfbfe;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.12);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.7; }
input.err, textarea.err, select.err { border-color: var(--danger); background: #fff5f5; }
select { cursor: pointer; }
select.unset { color: #9a9ab0; }
.err-msg { color: var(--danger); font-size: 12.5px; margin-top: 5px; display: none; }
.err-msg.show { display: block; }

/* 提交通道关闭提示（所有课程都不可提交时显示） */
.closed-tip {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid #f0d9a8;
  background: #fff8e8;
  color: #8a5a00;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}
select option:disabled { color: #b0b0c0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* ---------- 上传 ---------- */
.drop {
  border: 2px dashed #d5d8e6;
  border-radius: 14px;
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  background: #fafbff;
  transition: all 0.18s;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .big { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.drop .sub { font-size: 12.5px; color: var(--muted); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.file-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.file-item .thumb { width: 100%; height: 72px; object-fit: cover; display: block; background: #f0f1f7; }
.file-item .doc-thumb {
  width: 100%; height: 72px; display: flex; align-items: center; justify-content: center;
  background: #f0f1f7; font-size: 22px;
}
.file-item .fname {
  font-size: 11.5px; padding: 5px 6px; word-break: break-all;
  color: var(--muted); line-height: 1.35; max-height: 32px; overflow: hidden;
}
.file-item .del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; border: none;
  font-size: 13px; line-height: 1; cursor: pointer;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(91, 91, 214, 0.3);
  width: 100%;
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #fff; border: 1.5px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.btn-danger { background: #fff; border: 1.5px solid #f3c9ca; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }

/* ---------- 提示条 ---------- */
.alert { padding: 11px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; display: none; }
.alert.show { display: block; }
.alert-error { background: #fff1f1; color: #b42318; border: 1px solid #f8d0d1; }
.alert-ok { background: #ecfdf8; color: #07775f; border: 1px solid #b6ecd8; }
.alert-warn { background: #fff7e6; color: #8a5a00; border: 1px solid #f5d799; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.alert-warn #orphanBarText { flex: 1; }

/* ---------- 成功页 ---------- */
.done { text-align: center; padding: 40px 20px; }
.done .tick {
  width: 66px; height: 66px; margin: 0 auto 16px;
  border-radius: 50%; background: linear-gradient(135deg, #12a594, #34d399);
  color: #fff; font-size: 32px; line-height: 66px;
}
.done h3 { margin: 0 0 8px; font-size: 19px; }
.done p { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

/* ---------- 管理后台 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 26px; font-weight: 700; color: var(--brand); line-height: 1.2; }
.stat .lbl { font-size: 12.5px; color: var(--muted); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { flex: 1; min-width: 130px; }
/* 工具栏里的按钮按内容宽度排，别被 .btn-primary 的 width:100%（那是给学员端整行提交钮用的）撑成独占一行 */
.toolbar .btn { width: auto; flex: 0 0 auto; }

/* 批量操作条：滚动时吸顶，选中后高亮 */
.bulkbar {
  position: sticky; top: 8px; z-index: 5;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.bulkbar.active { border-color: var(--brand); background: var(--brand-soft); }
.bulkbar .spacer { flex: 1; min-width: 0; }
.sel-count { font-size: 13px; color: var(--muted); }
.bulkbar.active .sel-count { color: var(--brand); font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; user-select: none; }
.check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.sub-head .check.pick { margin-top: 11px; }   /* 与头像居中对齐 */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.sub.picked { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(91, 91, 214, 0.14); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line); color: var(--text); background: #fff; }
.btn-danger:disabled:hover { border-color: #f3c9ca; color: var(--danger); background: #fff; }

.sub {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.sub-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sub-avatar {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.sub-main { flex: 1; min-width: 200px; }
.sub-name { font-weight: 700; font-size: 15.5px; }
.sub-meta { font-size: 12.5px; color: var(--muted); }
.sub-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-block; background: var(--brand-soft); color: var(--brand);
  border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; margin-right: 6px;
}
.tag.tag-course { background: #fff4e0; color: #b7600a; }
.course-card {
  background: #fafbff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px;
}
.course-card .course-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.course-card .course-title { font-weight: 600; font-size: 14px; color: var(--text); }
.course-card input[type="text"], .course-card textarea {
  background: #fff;
}
.course-card textarea { font-family: inherit; line-height: 1.6; resize: vertical; }
/* 作业提交通道开关 */
.sub-toggle.is-on { background: #ecfdf8; border-color: #b6ecd8; color: #07775f; }
.sub-toggle.is-off { background: #fff5f5; border-color: #f3c9c9; color: #b3341f; }
.sub-tip { font-size: 12.5px; color: #6b6b85; margin: 0 0 12px; line-height: 1.7; }
.sub-body { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sub-body.open { display: block; }
.sub-body .text { white-space: pre-wrap; font-size: 14px; line-height: 1.75; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 96px; object-fit: cover; display: block; background: #f0f1f7; }
.gallery .doc {
  width: 100%; height: 96px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; color: var(--muted); padding: 6px; text-align: center; word-break: break-all;
}
.empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 14px; }

.login { max-width: 380px; margin: 12vh auto; }

.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }

/* ---------- 外观设置（顶部横幅自定义） ---------- */
.ap-tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.ap-tab {
  background: transparent; border: none; cursor: pointer;
  padding: 9px 16px; font-size: 14px; font-weight: 600; font-family: inherit;
  color: var(--muted); border-radius: 10px 10px 0 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ap-tab:hover { color: var(--brand); background: var(--brand-soft); }
.ap-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* 评分管理：课程子页签（点课程看对应榜单，「全部」看总览） */
.sc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 14px; }
.sc-tab {
  background: transparent; border: 1px solid var(--line); cursor: pointer;
  padding: 8px 14px; font-size: 13.5px; font-weight: 600; font-family: inherit;
  color: var(--muted); border-radius: 999px; transition: color .15s, border-color .15s, background .15s;
}
.sc-tab:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.sc-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
/* 评分管理工具栏右上角的「小组单课总分统计」入口 */
.gs-entry { margin-left: auto; }

.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.ap-form { min-width: 0; }
.ap-textarea { min-height: 64px; resize: vertical; line-height: 1.6; }
/* 横幅编辑器里「文字 + 颜色 + 字号」的横向组合行 */
.ap-style-row { display: flex; gap: 8px; align-items: center; }
.ap-style-row input[type="text"], .ap-style-row textarea { flex: 1; min-width: 0; }
.ap-style-row input[type="range"] { flex: 1; }
/* 颜色选择器：固定一个小方块，点开是系统取色板 */
.ap-style-row input[type="color"].ap-color {
  flex: none; width: 42px; height: 40px; padding: 3px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: #fbfbfe; cursor: pointer;
}
/* 字号输入：窄输入框，单位固定为 px（label 里已说明） */
.ap-style-row input[type="number"].ap-size {
  flex: none; width: 68px;
  padding: 11px 8px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--text); background: #fbfbfe;
}

.ap-upload {
  border: 2px dashed var(--line); border-radius: 12px;
  padding: 22px 16px; text-align: center; cursor: pointer;
  background: #fafbff; transition: border-color 0.15s, background 0.15s;
}
.ap-upload:hover, .ap-upload.over { border-color: var(--brand); background: var(--brand-soft); }
.ap-drop-icon { font-size: 26px; margin-bottom: 6px; }
.ap-drop-main { font-size: 13.5px; color: var(--text); }
.ap-drop-tip { font-size: 12px; color: var(--muted); margin-top: 6px; }

.ap-img-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ap-thumb {
  width: 154px; height: 62px; border-radius: 10px; flex: 0 0 auto;
  background: #eef0ff center / cover no-repeat; border: 1px solid var(--line);
}
.ap-img-meta { flex: 1; min-width: 132px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ap-img-meta .pass { color: var(--success); font-weight: 600; }
.ap-img-meta .warn { color: #b7791f; font-weight: 600; }
/* 这里按钮按内容宽度排布即可，别被 .btn-primary 的 width:100% 拉成整行 */
.ap-img-row .btn { flex: 0 0 auto; white-space: nowrap; }

.ap-overlay-tip { font-size: 12px; color: var(--muted); margin-top: 6px; }
input[type="range"] { width: 100%; accent-color: var(--brand); cursor: pointer; }

.ap-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
/* 覆盖 .btn-primary 的满宽，让两个按钮并排且按内容宽度 */
.ap-actions .btn { width: auto; flex: 0 0 auto; }

.ap-preview-wrap { min-width: 0; }
.ap-preview-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.ap-preview-wrap .hero { margin-bottom: 16px; }
.ap-note {
  background: #fafbff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-size: 12.5px; color: var(--muted); line-height: 1.7;
}
.ap-note-title { font-weight: 700; color: var(--text); margin-bottom: 6px; font-size: 13px; }
.ap-note ul { margin: 0; padding-left: 18px; }
.ap-note li { margin-bottom: 3px; }
.ap-note b { color: var(--brand); }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 19px; }
  /* 手机端优先用单独配置的手机背景图（--hero-image-m），没配则回落桌面图 */
  .hero.has-image {
    background-image:
      linear-gradient(
        90deg,
        rgba(var(--hero-overlay-rgb, 42, 26, 96), var(--hero-overlay, 0.45)) 0%,
        rgba(var(--hero-overlay-rgb, 42, 26, 96), calc(var(--hero-overlay, 0.45) * 0.82)) 34%,
        rgba(var(--hero-overlay-rgb, 42, 26, 96), calc(var(--hero-overlay, 0.45) * 0.22)) 60%,
        rgba(var(--hero-overlay-rgb, 42, 26, 96), 0) 78%
      ),
      var(--hero-image-m, var(--hero-image));
  }
  .card { padding: 16px; }
  .ap-grid { grid-template-columns: 1fr; gap: 18px; }
  /* 子页头部（观摩 / 评分榜）：小字统计放不下时整行折到标题下方，避免把标题挤成竖排 */
  .showcase-head { flex-wrap: wrap; row-gap: 6px; }
  .showcase-title { white-space: nowrap; }
  .showcase-count { flex-basis: 100%; white-space: normal; padding-left: 2px; }
}

/* ============================================================== */
/* 观摩优秀作业：瀑布流 + 详情                                     */
/* ============================================================== */

.showcase {
  background: transparent;
  padding: 0;
  margin: 0;
}

.showcase-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 4px 4px 0;
}

.showcase-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.showcase-count {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn-back:hover { background: #fafbff; border-color: var(--brand); color: var(--brand); transform: translateX(-2px); }
.btn-back:active { transform: translateX(0); }

/* CSS columns 实现瀑布流 —— 比 JS masonry 简单可靠，性能也好 */
.showcase-grid {
  column-count: 3;
  column-gap: 16px;
}
@media (max-width: 900px) { .showcase-grid { column-count: 2; } }
@media (max-width: 520px) { .showcase-grid { column-count: 1; } }

.sc-card {
  break-inside: avoid;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: block;
  width: 100%;
  font-family: inherit;
  color: inherit;
  text-align: left;
}
.sc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(50, 50, 100, 0.12);
  border-color: rgba(118, 99, 255, 0.45);
}
.sc-card:active { transform: translateY(0); }

.sc-cover {
  width: 100%;
  display: block;
  background: linear-gradient(135deg, #f5f6fc 0%, #e9eaf7 100%);
  position: relative;
  overflow: hidden;
}
.sc-cover img {
  width: 100%;
  height: auto;
  display: block;
  /* 关键：保持原图比例不变形 */
}
.sc-cover .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  height: 160px;
  color: rgba(118, 99, 255, 0.5);
}

.sc-meta {
  padding: 12px 14px 14px;
}

.sc-course {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(118, 99, 255, 0.10);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.sc-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.sc-title {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.snip {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  background: #fafbff;
  border-left: 2px solid rgba(118, 99, 255, 0.35);
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
  word-break: break-word;
}

.sc-foot {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  opacity: 0.85;
}

/* 空状态 */
.showcase-empty {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
}
.showcase-empty .empty-emoji { font-size: 56px; margin-bottom: 12px; }
.showcase-empty p { line-height: 1.8; font-size: 14px; margin: 0 0 18px; }
.showcase-empty .btn { min-width: 160px; }

.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
}
.loading.err { color: #c33; }

/* 详情页 */
.detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 26px;
  max-width: 880px;
  margin: 0 auto;
}

.dt-meta { margin-bottom: 18px; }
.dt-course {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(118, 99, 255, 0.10);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.dt-author { font-size: 18px; font-weight: 700; color: var(--text); }
.dt-title {
  font-size: 15px;
  color: var(--text);
  margin-top: 6px;
  line-height: 1.5;
  font-weight: 500;
}
.dt-time { margin-top: 8px; font-size: 12px; color: var(--muted); }

.dt-text {
  background: #fafbff;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 20px;
}

.dt-section {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 18px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dt-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}
.dt-gallery a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f6fc;
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dt-gallery a:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(50, 50, 100, 0.12); }
.dt-gallery img { width: 100%; height: auto; display: block; }

.dt-noimg {
  background: #fafbff;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

.dt-files {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.dt-files li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.dt-files li:last-child { border-bottom: none; }
.dt-icon { font-size: 18px; line-height: 1; }
.dt-files a {
  flex: 1;
  color: var(--brand);
  text-decoration: none;
  word-break: break-all;
  min-width: 0;
}
.dt-files a:hover { text-decoration: underline; }
.dt-size { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ============================================================== */
/* 顶部导航 + Ai 评选评分榜                                         */
/* ============================================================== */

.topnav {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.nav-btn {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.nav-btn:hover { border-color: var(--brand); color: var(--brand); }
.nav-btn.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow);
}

/* —— 评分榜主体 —— */
.sb-body { display: flex; flex-direction: column; gap: 22px; }

/* ---- 查我的成绩 ---- */
.my-lookup {
  background: #fff;
  border: 1px solid var(--line, #e5e7f0);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 6px;
  box-shadow: 0 2px 10px rgba(30, 30, 80, 0.05);
}
.my-lookup-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.my-lookup-label { font-weight: 700; font-size: 14px; color: #333; margin-right: 2px; white-space: nowrap; }
.my-lookup input {
  flex: 1 1 130px;
  min-width: 0;
  max-width: 220px;
  border: 1px solid #d8dcea;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.my-lookup input:focus { border-color: #7a5cff; box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.14); }
.my-lookup .btn { flex: 0 0 auto; width: auto; }
#myResultBox { margin-top: 12px; }
#myResultBox:empty { margin-top: 0; }
.my-result { padding: 10px 4px; font-size: 14px; color: #555; }
.my-result.err { color: #c0392b; }
.my-result-hint { font-size: 13px; color: #777; padding: 2px 4px 8px; }
.my-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #eceef6;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 8px;
  background: #fafbff;
}
.my-rank {
  flex: 0 0 auto;
  min-width: 52px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: #5b4bc4;
  background: #efeaff;
  border-radius: 8px;
  padding: 6px 8px;
}
.my-rank.top3 { color: #fff; background: linear-gradient(135deg, #7a5cff, #b84ee0); }
.my-main { flex: 1; min-width: 0; }
.my-course { font-size: 13px; color: #666; }
.my-title { font-size: 14px; font-weight: 700; color: #333; margin-top: 2px; }
.my-comment { font-size: 13px; color: #555; margin-top: 5px; line-height: 1.55; }
.my-score {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.sb-course {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 18px;
  box-shadow: var(--shadow);
}
.sb-course-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.sb-course-head h3 { margin: 0; font-size: 17px; }
.sb-teacher {
  font-size: 12.5px; color: var(--muted);
  background: var(--brand-soft); color: var(--brand);
  padding: 2px 8px; border-radius: 999px;
}
.sb-criteria { flex: 1 1 100%; font-size: 12.5px; color: var(--muted); }
.sb-count { margin-left: auto; font-size: 12.5px; color: var(--muted); }

/* —— 学员端 · 小组单课总分（小组战绩） —— */
.gs-student-body { display: flex; flex-direction: column; gap: 16px; }
.gs-course {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 18px;
  box-shadow: var(--shadow);
}
.gs-unpublished {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 16px;
  text-align: center;
  color: var(--muted, #7a7a8c);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.9;
  box-shadow: var(--shadow);
}
.gs-unpublished span { font-size: 13px; font-weight: 400; opacity: .85; }
.gs-course-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--line);
}
.gs-course-head h3 { margin: 0; font-size: 17px; }
.gs-teacher {
  font-size: 12.5px; background: var(--brand-soft); color: var(--brand);
  padding: 2px 8px; border-radius: 999px;
}
.gs-list { display: flex; flex-direction: column; gap: 10px; }
.gs-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafbff;
}
.gs-row .gs-rank { flex: 0 0 auto; min-width: 40px; text-align: center; font-size: 17px; }
.gs-group { font-weight: 700; font-size: 15px; min-width: 70px; }
.gs-bar-wrap { flex: 1 1 120px; min-width: 80px; height: 10px; background: #eceef6; border-radius: 999px; overflow: hidden; }
.gs-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7a5cff, #b84ee0); }
.gs-total { font-weight: 800; color: var(--brand); font-size: 16px; min-width: 64px; text-align: right; }
.gs-sub { font-size: 12px; color: var(--muted); width: 100%; }
@media (max-width: 640px) {
  .gs-row { gap: 8px 10px; }
  .gs-bar-wrap { flex-basis: 100%; order: 3; }
  .gs-sub { order: 4; }
  .sc-tab { padding: 7px 12px; font-size: 13px; }
}
.sb-list { display: flex; flex-direction: column; gap: 12px; }
.sb-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbff;
}
.rank {
  flex: 0 0 auto;
  min-width: 48px; height: 32px;
  padding: 0 9px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-weight: 800; font-size: 12.5px; letter-spacing: .2px; white-space: nowrap;
  background: var(--brand-soft); color: var(--brand);
}
.rank.r1 { background: #fff4d6; color: #c8841a; }
.rank.r2 { background: #eef1f6; color: #7d8aa0; }
.rank.r3 { background: #fbe9dd; color: #c2703a; }

.sb-cover {
  flex: 0 0 84px;
  width: 84px; height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.sb-cover img { width: 100%; height: 100%; object-fit: cover; }
.sb-cover .ph { font-size: 30px; opacity: .5; }

.sb-meta { flex: 1; min-width: 0; position: relative; }
.sb-score {
  position: absolute; top: 0; right: 0;
  min-width: 44px; text-align: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.sb-author { font-weight: 700; font-size: 14.5px; padding-right: 54px; }
.sb-title { font-size: 13px; color: var(--text); margin-top: 2px; }
.sb-comment {
  margin-top: 6px;
  font-size: 13px; color: var(--muted);
  background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px;
}
.sb-foot { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* —— 管理端评分管理 —— */
.scoring-progress {
  font-weight: 700; font-size: 14px; color: var(--brand);
  margin: 4px 0 14px;
}
/* 小组单课总分统计卡片 */
.gs-card { margin-top: 18px; }
.gs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gs-head h2 { margin: 0; font-size: 17px; }
.gs-desc { font-size: 13px; color: var(--muted); margin: 8px 0 14px; line-height: 1.6; }
.gs-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gs-line label { font-size: 13px; font-weight: 600; }
.gs-line select { width: auto; min-width: 200px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }
.gs-meta { font-size: 12.5px; color: var(--muted); }
.gs-table-wrap { overflow-x: auto; }
.gs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.gs-table th, .gs-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.gs-table th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--surface-2, #f6f7fb); }
.gs-table td.gs-total { font-weight: 800; color: var(--brand); font-size: 15px; }
.gs-table td.gs-group { font-weight: 700; }
.gs-rank { font-weight: 700; color: var(--muted); }
.gs-rank.r1, .gs-rank.r2, .gs-rank.r3 { font-size: 15px; }
.gs-empty td { text-align: center; color: var(--muted); font-size: 13px; padding: 22px 10px; }
@media (max-width: 640px) {
  .gs-head { align-items: flex-start; }
  .gs-line select { min-width: 0; flex: 1 1 100%; }
}
.sc-group { margin-bottom: 18px; }
.sc-group-title {
  font-size: 13px; font-weight: 700; color: var(--muted);
  padding: 6px 2px; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.sc-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 4px; border-bottom: 1px dashed var(--line);
}
.sc-row:last-child { border-bottom: none; }
.sc-info { flex: 1 1 240px; min-width: 0; }
.sc-name { font-weight: 700; font-size: 14px; }
.sc-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-score { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }
.sc-comment { flex: 2 1 220px; min-width: 140px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.sc-msg { font-size: 12px; color: var(--success); min-width: 70px; }
.sc-msg:empty { min-width: 0; }
/* 覆盖全局 input/select width:100%，让评分行内控件保持单行紧凑排布 */
.sc-row .sc-score { width: auto; flex: 0 0 110px; }
.sc-row .sc-comment { width: auto; }
.sc-row .btn { width: auto; flex: 0 0 auto; }
/* 评分行展开的作品预览面板（文字 + 图片缩略图 / 附件） */
.sc-row:has(+ .sc-files.open) { border-bottom-color: transparent; }
.sc-files {
  display: none; margin: 0 0 12px; padding: 12px 14px;
  background: #fafafc; border: 1px solid var(--line); border-radius: 10px;
}
.sc-files.open { display: block; }
.sc-text { font-size: 13px; line-height: 1.65; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.sc-files .sc-text { margin-bottom: 10px; }
.sc-muted { color: var(--muted); }
/* ===== Ai 推荐榜 ===== */
.rec-item { padding: 12px 4px; border-bottom: 1px dashed var(--line); }
.rec-item:last-child { border-bottom: none; }
.rec-item:has(> .sc-files.open) { border-bottom-color: transparent; }
.rec-head { display: flex; align-items: flex-start; gap: 10px; }
.rec-rank {
  flex: 0 0 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff; background: #9ca3af;
}
.rec-rank.r1 { background: #d4a017; } /* 冠军金 */
.rec-rank.r2 { background: #8c9bab; } /* 亚军银 */
.rec-rank.r3 { background: #b0713f; } /* 季军铜 */
.rec-info { flex: 1 1 auto; min-width: 0; }
.rec-name { font-weight: 700; font-size: 14px; }
.rec-sub { font-size: 12.5px; color: var(--muted); }
.rec-manual { font-size: 12px; font-weight: 400; color: var(--muted); }
.rec-comment { font-size: 12.5px; color: var(--text); margin-top: 4px; line-height: 1.55; }
.rec-score {
  flex: 0 0 auto; padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #5b4ee6, #8b5cf6); color: #fff;
  font-weight: 800; font-size: 15px;
}
.rec-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rec-actions .btn { width: auto; flex: 0 0 auto; } /* 覆盖 .btn 的全局 width:100%，避免保存按钮被拉成整行 */
.rec-actions .sc-score { width: auto; flex: 0 0 110px; }
.rec-actions .rec-input { width: auto; flex: 2 1 220px; min-width: 140px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.rec-msg { font-size: 12px; color: var(--success); min-width: 60px; }
.rec-criteria {
  font-size: 12.5px; color: var(--muted); background: #f6f7fb;
  border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.6;
}
.rec-criteria-empty { color: #b45309; background: #fffbeb; }

/* ===== 编辑作业身份弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 17, 40, 0.55); padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  width: 100%; max-width: 440px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden; animation: modalIn 0.16s ease-out;
}
@keyframes modalIn { from { transform: translateY(8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-x {
  border: none; background: transparent; font-size: 24px; line-height: 1;
  color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: 8px;
}
.modal-x:hover { background: #f1f1f6; color: var(--text); }
.modal .field { padding: 0 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 20px; border-top: 1px solid var(--line); background: #fafafe;
}
.modal select, .modal input[type="text"] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 14px; background: #fff; color: var(--text);
}
.modal select:focus, .modal input[type="text"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(94, 73, 220, 0.14); }

/* ===== 排名标签 / 分数胶囊 ===== */
.top-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; padding: 2px 8px; margin-right: 6px;
  border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.3px;
  color: #fff; background: linear-gradient(135deg, #5b4ee6, #8b5cf6);
  box-shadow: 0 2px 6px rgba(94, 73, 220, 0.28);
}
.score-chip {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #b45309; background: #fef3c7;
  border: 1px solid #fcd34d;
}
.sc-chip { font-size: 12.5px; font-weight: 800; color: var(--brand); margin-left: 4px; }
.sc-chip-none { color: var(--muted); font-weight: 400; }
.sc-group-title { display: flex; align-items: center; gap: 8px; }

/* ===== Ai 评分中 · 等候遮罩 ===== */
.ai-mask {
  position: fixed; inset: 0; z-index: 999;
  display: none; align-items: center; justify-content: center;
  background: rgba(23, 20, 45, 0.55); backdrop-filter: blur(3px);
}
.ai-mask.show { display: flex; }
.ai-box {
  width: min(460px, calc(100vw - 40px));
  padding: 30px 28px 22px; border-radius: 18px; text-align: center;
  background: #fff; box-shadow: 0 24px 60px rgba(20, 16, 50, 0.32);
  animation: ai-pop 0.22s ease;
}
@keyframes ai-pop { from { transform: translateY(10px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.ai-box h2 { margin: 14px 0 6px; font-size: 20px; }
.ai-sub { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.ai-spinner { display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; }
.ai-spinner span {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, #5b4ee6, #8b5cf6);
  animation: ai-bounce 1.1s infinite ease-in-out both;
}
.ai-spinner span:nth-child(2) { animation-delay: 0.16s; }
.ai-spinner span:nth-child(3) { animation-delay: 0.32s; }
@keyframes ai-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.45; }
  40% { transform: scale(1.15); opacity: 1; }
}
.ai-bar { height: 8px; border-radius: 999px; background: #eee9fb; overflow: hidden; }
.ai-bar-fill {
  width: 0; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #5b4ee6, #a78bfa);
  transition: width 0.45s ease;
}
.ai-progress { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--brand); }
.ai-hint { margin-top: 12px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.ai-actions { margin-top: 16px; }

/* 学员端评分卡上的 TOP 标签（放在 .sb-meta 列内，随内容排布） */
.sb-top {
  display: inline-block; align-self: flex-start;
  padding: 2px 10px; margin-bottom: 6px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.4px; color: #fff;
  background: linear-gradient(135deg, #5b4ee6, #8b5cf6);
  box-shadow: 0 2px 6px rgba(94, 73, 220, 0.28);
}

/* 评分榜：未发布课程占位（与小组战绩 .gs-unpublished 同款） */
.sb-unpub {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px 18px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.9;
}
.sb-unpub span { font-size: 13px; opacity: 0.85; }
