/* 成绩模块：前台排行榜（score.html）+ 后台录入（admin_scores.html）
   深色主题，配色沿用站点变量 */

/* ==================== 前台：页面框架 ==================== */
.sc-page {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(135deg, #0a0a1f 0%, #1a1147 50%, #0d1b3a 100%);
  min-height: 100vh;
  color: #e0d8ff;
  padding: 30px 16px 60px;
  background-attachment: fixed;
}
.sc-wrap { max-width: 900px; margin: 0 auto; }
.sc-head { text-align: center; margin-bottom: 30px; }
.sc-head h1 {
  font-size: 30px; color: #fff; letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(255, 180, 80, .5);
}
.sc-sub { color: #a0a8c0; margin-top: 8px; font-size: 14px; }
.sc-back {
  display: inline-block; margin-top: 16px; padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 30px;
  color: #fff; text-decoration: none; font-size: 14px; transition: .2s;
}
.sc-back:hover { background: rgba(255, 255, 255, .15); }

/* ==================== 前台：排行榜 ==================== */
.sc-group {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.sc-group-head { margin-bottom: 12px; }
.sc-group-head h3 {
  color: #ffd27a; font-size: 18px; margin-bottom: 4px;
  border-left: 4px solid #ffd27a; padding-left: 10px;
}
.sc-group-meta { color: #a0a8c0; font-size: 13px; padding-left: 14px; }
.sc-table-wrap { overflow-x: auto; }
.sc-board { width: 100%; border-collapse: collapse; font-size: 15px; }
.sc-board th, .sc-board td {
  padding: 9px 10px; text-align: left;
  border-bottom: 1px dashed rgba(255, 255, 255, .12);
}
.sc-board th {
  color: #fff; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.sc-board tbody tr:last-child td { border-bottom: none; }
.sc-board tbody tr:hover { background: rgba(255, 255, 255, .05); }
.sc-rank { width: 62px; font-weight: 700; color: #fff; white-space: nowrap; }
.sc-pair { color: #fff; }
.sc-pair em {
  font-style: normal; color: #a0a8c0; font-size: 12px; margin: 0 4px;
}
.sc-num { width: 88px; color: #fff; font-weight: 600; white-space: nowrap; }
.sc-award { width: 90px; }
.sc-award span {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 12px; background: rgba(255, 210, 122, .16); color: #ffd27a;
}

/* 前三名 */
.sc-board tr.sc-r1 td { background: rgba(255, 210, 122, .12); }
.sc-board tr.sc-r1 .sc-rank { color: #ffd27a; }
.sc-board tr.sc-r2 td { background: rgba(207, 216, 232, .1); }
.sc-board tr.sc-r2 .sc-rank { color: #d8e0ee; }
.sc-board tr.sc-r3 td { background: rgba(217, 154, 108, .1); }
.sc-board tr.sc-r3 .sc-rank { color: #e0a878; }

.sc-empty { text-align: center; color: #999; padding: 60px 20px; font-size: 16px; line-height: 2; }
.sc-offline {
  text-align: center; color: #ffb04d; font-size: 12px; margin-top: 10px;
  opacity: .85;
}
.sc-foot { text-align: center; margin-top: 40px; color: #777; font-size: 12px; line-height: 1.9; }

/* ==================== 后台：录入区 ==================== */
.sc-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.sc-form label { display: block; font-size: 0.82rem; color: var(--text-light, #c8d4e8); margin-bottom: 5px; }
.sc-form input, .sc-form select {
  width: 100%; padding: 9px 12px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px; color: #fff; font-size: 0.92rem;
  font-family: inherit; outline: none;
}
.sc-form input:focus, .sc-form select:focus { border-color: var(--accent, #00D4FF); }
.sc-form select option { background: #14162b; color: #fff; }

.sc-edit-wrap { overflow-x: auto; margin: 12px 0; }
.sc-edit { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 640px; table-layout: fixed; }
.sc-edit th, .sc-edit td {
  padding: 6px 4px; border-bottom: 1px solid rgba(255, 255, 255, .09); vertical-align: middle;
}
.sc-edit th {
  color: #fff; font-size: 0.78rem; font-weight: 600; white-space: nowrap;
  background: rgba(255, 255, 255, .05);
}
.sc-edit td { white-space: nowrap; }
/* 固定列宽，避免 9 列在中等屏幕下溢出被裁 */
.sc-edit th:nth-child(1), .sc-edit td:nth-child(1) { width: 44px; }
.sc-edit th:nth-child(2), .sc-edit td:nth-child(2) { width: 84px; }
.sc-edit th:nth-child(3), .sc-edit td:nth-child(3) { width: 84px; }
.sc-edit th:nth-child(4), .sc-edit td:nth-child(4) { width: 84px; }
.sc-edit th:nth-child(5), .sc-edit td:nth-child(5) { width: 92px; }
.sc-edit th:nth-child(6), .sc-edit td:nth-child(6) { width: 84px; }
.sc-edit th:nth-child(7), .sc-edit td:nth-child(7) { width: 72px; }
.sc-edit th:nth-child(8), .sc-edit td:nth-child(8) { width: 68px; }
.sc-edit th:nth-child(9), .sc-edit td:nth-child(9) { width: 28px; }
.sc-in {
  width: 100%; padding: 7px 8px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px; color: #fff; font-size: 0.85rem;
  font-family: inherit; outline: none;
}
.sc-in:focus { border-color: var(--accent, #00D4FF); background: rgba(0, 212, 255, .06); }
.sc-unit { color: #9aa5b8; font-size: 0.75rem; margin-left: 3px; }
.sc-del {
  background: none; border: none; color: #9aa5b8; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.sc-del:hover { color: #ff6b6b; background: rgba(255, 107, 107, .12); }
.sc-hint {
  font-size: 0.82rem; color: var(--text-light, #c8d4e8); line-height: 1.8;
  background: rgba(255, 255, 255, .045); border-radius: 8px; padding: 10px 12px;
}
.sc-hint b { color: #fff; }
.sc-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.sc-scroll-tip { display: none; }

@media (max-width: 900px) {
  .sc-scroll-tip { display: block; font-size: 0.75rem; color: #9aa5b8; text-align: right; margin: 8px 0 2px; }
}

/* ==================== 响应式 ==================== */
@media (max-width: 560px) {
  .sc-page { padding: 24px 12px 50px; }
  .sc-head h1 { font-size: 24px; }
  .sc-group { padding: 14px 14px; }
  .sc-board { font-size: 13px; }
  .sc-board th, .sc-board td { padding: 8px 7px; }
  .sc-rank { width: 48px; }
  .sc-num { width: 72px; }
}
