/* =============================================================
   班级积分墙 · 全屏布局样式
   设计基准见 DESIGN.md：Apple 式安静克制 + 课堂大屏可读性
   ============================================================= */

.wall-body { min-height: 100vh; display: flex; flex-direction: column; }

.wall-nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.wall-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

.wall-view { animation: fadeIn 0.2s ease; }

.wall-formula {
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  margin-bottom: 18px;
}

/* ---------- 小组筛选 chips ---------- */
.chip-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  justify-content: center;
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
  font-weight: 500;
}

/* ---------- 卡片网格：铺满全屏 ---------- */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ---------- 学员卡片 ---------- */
.stu-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 18px 16px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 3px solid transparent;
}
.stu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
}
.stu-card:active { transform: scale(0.98); }
.stu-card.view-only { cursor: default; }
.stu-card.view-only:hover { transform: none; box-shadow: var(--shadow-card); }

.stu-rank {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.stu-rank.top {
  color: #fff;
  background: var(--orange);
  border-radius: 980px;
  padding: 2px 9px;
}
.stu-rank.top.r1 { background: #ff9500; }
.stu-rank.top.r2 { background: #8e8e93; }
.stu-rank.top.r3 { background: #c98850; }

.stu-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 52px;
}
.stu-no { font-size: 12px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }

.stu-points {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stu-points .unit { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 4px; }

.stu-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 980px;
  background: rgba(134, 134, 139, 0.12);
  color: var(--text-2);
}
.tag.level { color: #fff; }
.stu-next { font-size: 11px; color: var(--text-3); margin-top: 10px; }

/* 卡片进入动画 */
.stu-card, .grp-card { animation: cardIn 0.25s ease backwards; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 小组卡片 ---------- */
.grp-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 20px 18px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 3px solid var(--accent);
}
.grp-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09); }
.grp-card.view-only { cursor: default; }
.grp-card.view-only:hover { transform: none; box-shadow: var(--shadow-card); }

.grp-name { font-size: 18px; font-weight: 600; padding-right: 52px; }
.grp-points {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.grp-points .unit { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 4px; }

.grp-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.grp-cell-label { font-size: 11px; color: var(--text-3); }
.grp-cell-value { font-size: 16px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- 评分弹窗 ---------- */
.score-modal { max-width: 560px; max-height: calc(100vh - 60px); overflow-y: auto; }

.score-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.score-meta { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.score-total { text-align: right; flex-shrink: 0; }
.score-total-label { display: block; font-size: 11px; color: var(--text-3); }
.score-total-value { font-size: 34px; font-weight: 700; line-height: 1.15; }

.score-section { margin-top: 16px; }
.score-section-title { font-size: 12px; font-weight: 500; color: var(--text-3); margin-bottom: 8px; }

.item-bar { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; }
.item-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 980px;
  padding: 8px 16px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.1s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.item-btn:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.item-btn:active { transform: scale(0.95); }
.item-btn:disabled { opacity: 0.5; cursor: wait; }
.item-btn .item-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.item-empty { color: var(--text-3); font-size: 12px; align-self: center; }

.score-custom { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(0, 0, 0, 0.06); }
.score-custom .row { margin-top: 0; }
.score-custom .btn-block { margin-top: 12px; }

/* 小组成员列表 */
.group-members { margin-top: 16px; max-height: 260px; overflow-y: auto; }
.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.member-row:last-child { border-bottom: none; }
.member-name { font-weight: 500; font-size: 13px; }
.member-name .stu-no { display: inline; margin-left: 8px; }
.member-points { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }

/* ---------- 嵌入模式：隐藏管理入口 ---------- */
.wall-body.embed .wall-nav-actions a { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .wall-main { padding: 16px 14px 48px; }
  .stu-points { font-size: 28px; }
  .grp-points { font-size: 32px; }
}
