/* ============================================================
   乐思佳儿课堂积分系统 - 科幻机甲主题
   ============================================================ */
:root {
  --bg0: #070b16;
  --bg1: #0b1224;
  --bg2: #0f1830;
  --panel: rgba(16, 26, 48, 0.82);
  --panel2: rgba(20, 32, 58, 0.9);
  --line: #1c2c50;
  --line2: #2a3f6e;
  --cyan: #00e5ff;
  --cyan-dim: #0099b8;
  --orange: #ff9e00;
  --orange2: #ff6a00;
  --pink: #ff5fa8;
  --blue: #4fc3f7;
  --green: #39ffb8;
  --red: #ff4d5e;
  --gold: #ffd54a;
  --silver: #cfd8dc;
  --bronze: #ffab7a;
  --txt: #dbe7ff;
  --txt-dim: #7d90bd;
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  --mono: "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse at 20% -10%, rgba(0,229,255,0.10), transparent 45%),
    radial-gradient(ellipse at 90% 110%, rgba(255,158,0,0.08), transparent 45%),
    var(--bg0);
  color: var(--txt);
  overflow-x: hidden;
}
.hidden { display: none !important; }

/* 背景网格 */
.app::before, .login-view::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
}
.login-bg-grid {
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,229,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.05) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* ============ 通用按钮 ============ */
.btn {
  font-family: var(--font);
  font-size: 14px;
  color: var(--txt);
  background: linear-gradient(180deg, #182a44, #101c38);
  border: 1px solid var(--line2);
  border-radius: 4px;
  padding: 8px 18px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all .18s ease;
  position: relative;
  overflow: hidden;
}
.btn:hover { border-color: var(--cyan); color: #fff; box-shadow: 0 0 14px rgba(0,229,255,0.35); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, #00c8e6, #0083a8);
  border-color: #00e5ff; color: #04121a; font-weight: 700;
}
.btn-primary:hover { box-shadow: 0 0 18px rgba(0,229,255,0.55); color:#04121a; }
.btn-orange {
  background: linear-gradient(180deg, #ff9e00, #e26800);
  border-color: #ffbe59; color: #1a0d00; font-weight: 700;
}
.btn-danger {
  background: linear-gradient(180deg, #b3261e, #7d1412);
  border-color: #ff6b62; color: #fff;
}
.btn-danger:hover { box-shadow: 0 0 14px rgba(255,77,94,0.5); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.active {
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: 0 0 12px rgba(255,158,0,0.35), inset 0 0 8px rgba(255,158,0,0.15);
}

/* ============ 登录页 ============ */
.login-view {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.login-panel {
  width: 400px; padding: 34px 38px 22px;
  position: relative; z-index: 2;
}
.login-title-area { text-align: center; margin-bottom: 24px; }
.login-logo svg { filter: drop-shadow(0 0 10px rgba(0,229,255,0.6)); }
.login-title {
  font-size: 30px; letter-spacing: 6px; color: #fff; margin-top: 8px;
  text-shadow: 0 0 18px rgba(0,229,255,0.5);
}
.login-subtitle {
  font-family: var(--mono); font-size: 11px; color: var(--cyan);
  letter-spacing: 3px; margin-top: 6px; opacity: .8;
}
.login-form .field { margin-bottom: 16px; }
.login-form label {
  display: block; font-size: 12px; color: var(--txt-dim);
  letter-spacing: 2px; margin-bottom: 6px;
}
.login-form input {
  width: 100%; background: rgba(7,13,26,0.9); border: 1px solid var(--line2);
  color: var(--txt); padding: 11px 14px; font-size: 15px; border-radius: 3px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.login-form input:focus { border-color: var(--cyan); box-shadow: 0 0 10px rgba(0,229,255,0.3); }
.login-msg { min-height: 20px; font-size: 13px; color: var(--red); margin: 4px 0 8px; text-align: center; }
.forgot-link {
  text-align: center; margin-top: 16px; font-size: 13px; color: var(--txt-dim);
  cursor: pointer; letter-spacing: 1px;
}
.forgot-link:hover { color: var(--cyan); }
.login-foot { text-align: center; margin-top: 22px; font-family: var(--mono); font-size: 10px; color: #3a4a70; letter-spacing: 2px; }

/* ============ 机甲面板 ============ */
.mecha-panel {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 6px;
  position: relative;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 10px 40px rgba(0,0,0,0.5), inset 0 0 60px rgba(0,229,255,0.03);
}
.mecha-panel::before, .mecha-panel::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
}
.mecha-panel::before { top: -1px; left: -1px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.mecha-panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--orange); border-right: 2px solid var(--orange); }

/* ============ 顶栏 ============ */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; z-index: 1; }
.topbar {
  height: 58px; flex: 0 0 58px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(180deg, rgba(13,22,42,0.95), rgba(9,15,30,0.95));
  border-bottom: 1px solid var(--line2);
  position: relative; z-index: 20;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--orange), transparent);
  opacity: .6;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 30px; height: 30px; position: relative;
  border: 2px solid var(--cyan); border-radius: 50%;
  box-shadow: 0 0 12px rgba(0,229,255,0.6);
}
.brand-mark::before {
  content: ""; position: absolute; inset: 6px;
  border: 1.5px solid var(--orange); border-radius: 50%;
  background: radial-gradient(circle, var(--cyan) 0 30%, transparent 60%);
}
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: 4px; color: #fff; text-shadow: 0 0 12px rgba(0,229,255,0.4); }
.brand-en { font-family: var(--mono); font-size: 10px; color: var(--orange); letter-spacing: 3px; align-self: flex-end; margin-bottom: 4px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.top-user {
  font-size: 14px; color: var(--txt);
  padding: 5px 14px;
  border: 1px solid var(--line2); border-radius: 20px;
  background: rgba(0,229,255,0.06);
  letter-spacing: 1px;
}
.top-user .role-tag {
  font-size: 11px; color: var(--orange); margin-left: 6px;
  border: 1px solid var(--orange); padding: 1px 6px; border-radius: 3px;
}
.top-user .role-tag.admin { color: var(--red); border-color: var(--red); }
.top-user .role-tag.all { color: var(--green); border-color: var(--green); }

/* 个人中心下拉 */
.user-menu { position: relative; }
.user-menu:hover .top-user { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,229,255,0.3); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 170px;
  background: linear-gradient(180deg, #121f3d, #0a1224);
  border: 1px solid var(--line2); border-radius: 6px;
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s ease;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,229,255,0.08);
  z-index: 60;
}
.user-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
.user-dd-item {
  padding: 11px 16px; font-size: 14px; color: var(--txt); cursor: pointer;
  display: flex; align-items: center; gap: 10px; letter-spacing: 1px;
  transition: all .15s;
}
.user-dd-item:hover { background: rgba(0,229,255,0.1); color: #fff; }
.user-dd-item:active { background: rgba(0,229,255,0.18); }

/* 大保存按钮 */
.big-save {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; letter-spacing: 1px;
  padding: 9px 20px;
  border-radius: 6px;
  background: linear-gradient(180deg, #00c8e6, #0079a6);
  border: 1px solid #00e5ff; color: #04121a;
  box-shadow: 0 0 20px rgba(0,229,255,0.35);
  cursor: pointer; transition: all .2s;
}
.big-save:hover { box-shadow: 0 0 30px rgba(0,229,255,0.6); transform: translateY(-2px); }
.big-save .big-save-ic { font-size: 17px; }
.big-save.dirty {
  background: linear-gradient(180deg, #ff9e00, #e26800);
  border-color: #ffbe59; color: #1a0d00;
  box-shadow: 0 0 24px rgba(255,158,0,0.5);
  animation: savePulse 1.4s ease infinite;
}
@keyframes savePulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255,158,0,0.35); }
  50% { box-shadow: 0 0 34px rgba(255,158,0,0.75); }
}

/* ============ 侧栏 ============ */
.layout { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 168px; flex: 0 0 168px;
  background: linear-gradient(180deg, rgba(11,18,36,0.95), rgba(8,13,26,0.95));
  border-right: 1px solid var(--line2);
  display: flex; flex-direction: column; position: relative; z-index: 10;
  padding: 14px 10px;
}
.nav { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  padding: 12px 14px;
  font-size: 15px; letter-spacing: 2px;
  color: var(--txt-dim);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all .18s;
  display: flex; align-items: center; gap: 10px;
  position: relative;
}
.nav-item .nav-ic { color: var(--cyan); font-size: 13px; width: 18px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(0,229,255,0.06); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(0,229,255,0.16), rgba(0,229,255,0.03));
  border-color: var(--cyan);
  box-shadow: inset 0 0 16px rgba(0,229,255,0.1), 0 0 10px rgba(0,229,255,0.15);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -11px; top: 20%; bottom: 20%; width: 3px;
  background: var(--orange); box-shadow: 0 0 8px var(--orange);
}
.sidebar-foot {
  font-family: var(--mono); font-size: 9px; color: #33416a;
  letter-spacing: 2px; text-align: center; line-height: 1.8;
  border-top: 1px solid var(--line); padding-top: 10px;
}

/* ============ 内容区 ============ */
.content {
  flex: 1; overflow-y: auto; padding: 22px 26px;
  position: relative; z-index: 2;
}
.view-title {
  font-size: 22px; letter-spacing: 3px; color: #fff;
  margin-bottom: 4px; display: flex; align-items: center; gap: 12px;
}
.view-title::before { content: ""; width: 4px; height: 22px; background: var(--orange); box-shadow: 0 0 10px var(--orange); }
.view-sub { font-size: 13px; color: var(--txt-dim); margin-bottom: 20px; letter-spacing: 1px; }

/* ============ 面板/卡片 ============ */
.panel { background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 18px; margin-bottom: 18px; position: relative; }
.panel-title {
  font-size: 15px; color: var(--cyan); letter-spacing: 2px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.panel-title::before { content: ""; width: 10px; height: 10px; border: 1.5px solid var(--orange); transform: rotate(45deg); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card {
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px;
  padding: 16px; cursor: pointer; transition: all .2s; position: relative;
}
.card:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,229,255,0.15); }
.card h4 { font-size: 16px; color: #fff; letter-spacing: 1px; margin-bottom: 8px; }
.card .card-meta { font-size: 12px; color: var(--txt-dim); line-height: 1.9; }
.card .card-meta b { color: var(--cyan); font-weight: normal; }
.card .card-corn { position: absolute; right: 8px; top: 8px; font-family: var(--mono); font-size: 10px; color: var(--orange); }

/* ============ 表单 ============ */
.form-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.form-row .field { flex: 1; min-width: 160px; }
.field label { display: block; font-size: 12px; color: var(--txt-dim); letter-spacing: 1px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(7,13,26,0.85); border: 1px solid var(--line2);
  color: var(--txt); padding: 9px 12px; font-size: 14px; border-radius: 3px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 8px rgba(0,229,255,0.25); }
.field select option { background: #0b1224; }
.field .hint { font-size: 11px; color: #4a5c86; margin-top: 4px; }

/* ============ 座位画布 ============ */
.seat-canvas {
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(0,229,255,0.04), transparent 60%),
    repeating-linear-gradient(0deg, rgba(0,229,255,0.03) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(0,229,255,0.03) 0 1px, transparent 1px 40px),
    rgba(5,10,20,0.6);
  border: 1px solid var(--line2);
  border-radius: 6px;
  aspect-ratio: 100 / 74;   /* 与布局坐标 x0-100 / y13-87 一致，保证正方形/圆形视觉保真 */
  min-height: 260px;
  overflow: hidden;
  user-select: none;
}
.seat-canvas.dragging { cursor: grabbing; }

/* 单个座位（尺寸由 JS 按画布宽度自适应，--seat-w 为座位宽度变量） */
.seat {
  position: absolute;
  /* 用 margin 负值居中（不用 translate，避免每个座位创建层叠上下文导致名字 z-index 失效） */
  margin-left: calc(var(--seat-w, 88px) / -2);
  margin-top: calc(var(--seat-w, 88px) * 1.32 / -2);
  width: var(--seat-w, 88px); height: calc(var(--seat-w, 88px) * 1.32);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s;
  padding-top: 2%;
}
.seat:hover { transform: scale(1.06); z-index: 100; }
.seat.ghost { opacity: .35; border: 1px dashed var(--line2); border-radius: 6px; }
.seat.dragging { z-index: 20; }
.seat.selected { z-index: 6; }
.seat.selected .seat-avatar { box-shadow: 0 0 0 3px var(--orange), 0 0 22px 4px rgba(255,158,0,0.7); }
.seat-label {
  font-size: calc(var(--seat-w, 88px) * 0.1);
  color: var(--txt-dim); font-family: var(--mono);
  background: rgba(0,0,0,0.5); border: 1px solid var(--line);
  padding: 0 5px; border-radius: 8px; margin-bottom: 5%; letter-spacing: 1px;
  line-height: calc(var(--seat-w, 88px) * 0.16);
}
.seat-avatar-wrap { position: relative; }
.seat-avatar {
  width: calc(var(--seat-w, 88px) * 0.6); height: calc(var(--seat-w, 88px) * 0.6);
  border-radius: 50%;
  background: rgba(20,30,55,0.9);
  display: flex; align-items: center; justify-content: center;
  font-size: calc(var(--seat-w, 88px) * 0.25);
  color: var(--txt-dim);
  overflow: hidden;
  border: 2px solid #2a3f6e;
  transition: box-shadow .2s;
}
.seat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 性别发光描边：男生浅蓝、女生浅粉 —— 作用于显示框，非头像本身 */
.seat-avatar.male { border-color: #7fd6ff; box-shadow: 0 0 10px 2px rgba(79,195,247,0.55), 0 0 22px rgba(79,195,247,0.35); }
.seat-avatar.female { border-color: #ffb3d1; box-shadow: 0 0 10px 2px rgba(255,95,168,0.5), 0 0 22px rgba(255,95,168,0.32); }
.seat-avatar.neutral { border-color: #8a9cc4; box-shadow: 0 0 8px 2px rgba(138,156,196,0.35); }
.seat-name {
  margin-top: 6%;
  font-size: calc(var(--seat-w, 88px) * 0.105);
  color: #fff; max-width: var(--seat-w, 88px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 0 6px rgba(0,0,0,0.9);
  line-height: calc(var(--seat-w, 88px) * 0.14);
  flex-shrink: 0;  /* 座位过小时姓名不被 flex 压缩 */
}
.seat-name.empty { color: var(--txt-dim); }
/* 实时分数：头像右上角炫酷角标 */
.seat-score-badge {
  position: absolute; top: -14%; right: -16%;
  font-family: var(--mono); font-size: calc(var(--seat-w, 88px) * 0.18); font-weight: 900;
  padding: 1px 7px; border-radius: 12px;
  border: 1.5px solid currentColor;
  background: rgba(5,10,20,0.92);
  z-index: 6;
  letter-spacing: 0.5px;
}
.seat-score-badge.pos { color: var(--green); text-shadow: 0 0 10px rgba(57,255,184,0.8); box-shadow: 0 0 10px rgba(57,255,184,0.4), inset 0 0 6px rgba(57,255,184,0.3); }
.seat-score-badge.neg { color: var(--red); text-shadow: 0 0 10px rgba(255,77,94,0.8); box-shadow: 0 0 10px rgba(255,77,94,0.4), inset 0 0 6px rgba(255,77,94,0.3); }
.seat-score-badge.zero { color: #5c6f99; }
.seat.add-mode { border: 1.5px dashed var(--cyan); border-radius: 50%; box-shadow: 0 0 10px rgba(0,229,255,0.2); }
.seat.rem-mode { border: 1.5px dashed var(--red); border-radius: 6px; }
.seat.rem-mode:hover .seat-avatar { box-shadow: 0 0 0 3px var(--red), 0 0 18px rgba(255,77,94,0.6); }
.seat.cp-mode { border: 1.5px dashed var(--orange); border-radius: 50%; box-shadow: 0 0 10px rgba(255,158,0,0.2); }
.seat.dim { opacity: .5; }

/* 讲台（长方形标记，不可交互） */
.podium {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 108px; height: 32px;
  cursor: default; z-index: 4;
}
.podium-inner {
  width: 100%; height: 100%;
  border: 2px solid var(--orange);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(255,158,0,0.18), rgba(255,158,0,0.05));
  box-shadow: 0 0 12px rgba(255,158,0,0.25), inset 0 0 10px rgba(255,158,0,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; letter-spacing: 4px; color: var(--orange);
  text-shadow: 0 0 8px rgba(255,158,0,0.6);
  user-select: none;
}

/* 座位画布拖拽模式开启提示 */
.seat-canvas.drag-on .seat { cursor: grab; }
.seat-canvas.drag-on .podium { cursor: grab; }
.seat-canvas.drag-on .seat:hover { transform: scale(1.03); box-shadow: 0 0 16px rgba(0,229,255,0.25); }
.seat-canvas.drag-on .podium:hover { box-shadow: 0 0 16px rgba(255,158,0,0.45); }
.seat-canvas.dragging .seat, .seat-canvas.dragging .podium { cursor: grabbing; }

/* ============ 座位编辑模式：紧凑化（缩小圆圈、拉大间距视觉） ============ */
.seat-canvas.mode-edit { --seat-w: 62px; }
.seat-canvas.mode-edit .seat { padding-top: 1%; }
.seat-canvas.mode-edit .seat-name { font-size: calc(var(--seat-w, 62px) * 0.17); line-height: calc(var(--seat-w, 62px) * 0.22); }
/* 选班上课：姓名字号跟随座位间距自适应（--name-fs 由 JS 计算），
   任何缩放级别名字宽度都小于座位间距，完整显示且不重叠 */
.seat-canvas.mode-teach .seat-name {
  font-size: var(--name-fs, 12px); max-width: 240px;
  background: rgba(5,10,20,0.85); padding: 0 2px; border-radius: 8px;
  border: 1px solid rgba(0,229,255,0.28);
  line-height: calc(var(--name-fs, 12px) * 1.5); white-space: nowrap;
  position: relative; z-index: 60;  /* 放大后座位重叠时，姓名浮在最上层不被头像/其他元素遮挡 */
}
.seat-canvas.mode-teach .seat-name.empty { color: var(--txt-dim); background: transparent; padding: 0; }

/* 选班上课：悬停学生信息浮框 */
.seat-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  display: none; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(8,16,38,0.97), rgba(14,26,52,0.97));
  border: 1px solid var(--cyan); border-radius: 12px;
  padding: 9px 14px; z-index: 120; min-width: 158px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.65), 0 0 18px rgba(0,229,255,0.28);
  pointer-events: none; white-space: nowrap;
}
.seat-tip.below { bottom: auto; top: calc(100% + 10px); }
.seat-tip.left { left: 0; transform: none; }
.seat-tip.right { left: auto; right: 0; transform: none; }
.seat:hover .seat-tip { display: flex; }
.tip-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: none; background: rgba(20,30,55,0.9); display: flex; align-items: center; justify-content: center; }
.tip-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tip-avatar span { font-size: 24px; }
.tip-avatar.male { border: 2px solid #7fd6ff; box-shadow: 0 0 10px 2px rgba(79,195,247,0.55); }
.tip-avatar.female { border: 2px solid #ffb3d1; box-shadow: 0 0 10px 2px rgba(255,95,168,0.5); }
.tip-avatar.neutral { border: 2px solid #8a9cc4; }
.tip-info { display: flex; flex-direction: column; gap: 3px; }
.tip-name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 1px; text-shadow: 0 0 8px rgba(0,229,255,0.4); }
.tip-meta { font-size: 11px; color: var(--txt-dim); letter-spacing: 0.5px; }
.tip-score { font-size: 15px; font-weight: 900; font-family: var(--mono); letter-spacing: 0.5px; }
.tip-score.pos { color: var(--green); text-shadow: 0 0 10px rgba(57,255,184,0.7); }
.tip-score.neg { color: var(--red); text-shadow: 0 0 10px rgba(255,77,94,0.7); }
.tip-score.zero { color: #5c6f99; }
.seat-canvas.mode-edit .seat-score-badge { font-size: calc(var(--seat-w, 62px) * 0.2); }

/* 座位编辑工具栏 */
.seat-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.seat-toolbar .sep { width: 1px; height: 26px; background: var(--line2); }
.tool-hint { font-size: 12px; color: var(--txt-dim); line-height: 1.8; }
.tool-hint b { color: var(--orange); }

/* ============ 快捷分数按钮 ============ */
.quick-bar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; gap: 8px;
  background: rgba(9,15,30,0.95);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}
.quick-btn {
  width: 52px; height: 46px;
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  border-radius: 5px; cursor: pointer; border: 1px solid var(--line2);
  background: rgba(10,18,36,0.9); color: var(--txt);
  transition: all .15s;
  position: relative;
}
.quick-btn.pos { color: var(--green); }
.quick-btn.neg { color: var(--red); }
.quick-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.quick-btn.active { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 14px rgba(255,158,0,0.5); }
.quick-btn.pos.active { border-color: var(--green); color: var(--green); box-shadow: 0 0 14px rgba(57,255,184,0.5); }
.quick-btn.neg.active { border-color: var(--red); color: var(--red); box-shadow: 0 0 14px rgba(255,77,94,0.5); }
.quick-btn:disabled { opacity: .4; }
.quick-info { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }

/* 模式切换 */
.mode-switch { display: flex; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; }
.mode-switch .mode-item { padding: 8px 14px; font-size: 13px; cursor: pointer; color: var(--txt-dim); background: rgba(10,18,36,0.8); }
.mode-switch .mode-item.active { background: rgba(0,229,255,0.15); color: var(--cyan); }

/* 批量选择提示条 */
.batch-bar {
  position: sticky; bottom: 10px; z-index: 200;
  margin-top: 10px;
  background: rgba(9,20,40,0.95);
  border: 1px solid var(--orange);
  border-radius: 6px;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.batch-bar .count { color: var(--orange); font-weight: 700; }

/* ============ 分数特效 ============ */
.fx-float {
  position: fixed; z-index: 500; pointer-events: none;
  font-family: var(--mono); font-weight: 900; font-size: 30px;
  text-shadow: 0 0 14px currentColor;
  animation: floatUp 1.1s ease-out forwards;
}
.fx-float.pos { color: var(--green); }
.fx-float.neg { color: var(--red); }
@keyframes floatUp {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  15% { transform: translate(-50%, -70%) scale(1.25); opacity: 1; }
  70% { transform: translate(-50%, -130%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -200%) scale(0.85); opacity: 0; }
}
.fx-particle { position: fixed; z-index: 499; pointer-events: none; border-radius: 50%; animation: particleFly 0.9s ease-out forwards; }
@keyframes particleFly {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2); opacity: 0; }
}
.fx-ring { position: fixed; z-index: 498; pointer-events: none; border-radius: 50%; border: 3px solid var(--cyan); animation: ringExpand 0.8s ease-out forwards; }
@keyframes ringExpand {
  0% { width: 30px; height: 30px; opacity: 1; }
  100% { width: 130px; height: 130px; opacity: 0; }
}
.fx-beam {
  position: fixed; z-index: 497; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,229,255,0.0), rgba(0,229,255,0.6), rgba(0,229,255,0.0));
  animation: beamFlash 0.6s ease-out forwards;
}
@keyframes beamFlash { 0% { opacity: 0.9; transform: scaleY(0.2);} 100% { opacity: 0; transform: scaleY(1.2);} }

/* 座位得分脉冲 */
@keyframes seatPulse {
  0% { box-shadow: 0 0 0 0 rgba(0,229,255,0.8); }
  100% { box-shadow: 0 0 0 26px rgba(0,229,255,0); }
}
.seat.just-scored .seat-avatar { animation: seatPulse 0.7s ease-out; }

/* 保存成功特效 */
.fx-save-ring {
  position: fixed; z-index: 510; pointer-events: none;
  border: 3px solid rgba(0,229,255,0.7); border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: saveRing 1.2s ease-out forwards;
}
@keyframes saveRing {
  0% { width: 40px; height: 40px; opacity: 1; border-color: rgba(0,229,255,0.9); }
  100% { width: 900px; height: 900px; opacity: 0; border-color: rgba(255,158,0,0.4); }
}
.fx-save-flash {
  position: fixed; inset: 0; z-index: 509; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0,229,255,0.28), transparent 65%);
  animation: saveFlashFade 0.9s ease-out forwards;
}
@keyframes saveFlashFade { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }

/* 学生历史分数（按日期分组） */
.hist-date-group { margin-bottom: 16px; }
.hist-date-title {
  font-size: 14px; color: var(--orange); letter-spacing: 1px;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.hist-row {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 10px; border-radius: 4px;
  font-size: 13px;
}
.hist-row:hover { background: rgba(0,229,255,0.04); }
.hist-delta { font-family: var(--mono); font-size: 16px; font-weight: 900; min-width: 46px; }
.hist-delta.pos { color: var(--green); text-shadow: 0 0 8px rgba(57,255,184,0.5); }
.hist-delta.neg { color: var(--red); text-shadow: 0 0 8px rgba(255,77,94,0.5); }
.hist-reason { flex: 1; color: var(--txt); }
.hist-time { color: var(--txt-dim); font-size: 12px; white-space: nowrap; }

/* ============ 排行榜 ============ */
.rank-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rank-tab {
  padding: 8px 18px; border: 1px solid var(--line2); border-radius: 4px;
  cursor: pointer; font-size: 14px; color: var(--txt-dim); letter-spacing: 1px;
  background: rgba(10,18,36,0.7);
}
.rank-tab.active { color: var(--orange); border-color: var(--orange); box-shadow: 0 0 12px rgba(255,158,0,0.3); }
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, rgba(16,26,48,0.9), rgba(10,18,36,0.7));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 16px;
  transition: all .2s;
  position: relative; overflow: hidden;
}
.rank-item:hover { border-color: var(--cyan); }
.rank-item.top1 { border-color: rgba(255,213,74,0.6); box-shadow: 0 0 18px rgba(255,213,74,0.12); }
.rank-item.top2 { border-color: rgba(207,216,220,0.5); }
.rank-item.top3 { border-color: rgba(255,171,122,0.5); }
.rank-no { width: 42px; text-align: center; font-family: var(--mono); font-size: 20px; font-weight: 900; color: #5c6f99; }
.rank-no.top1 { color: var(--gold); text-shadow: 0 0 12px rgba(255,213,74,0.6); }
.rank-no.top2 { color: var(--silver); }
.rank-no.top3 { color: var(--bronze); }
.rank-avatar { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line2); background: rgba(20,30,55,0.9); flex: 0 0 46px; }
.rank-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rank-avatar.male { border-color: #7fd6ff; box-shadow: 0 0 8px rgba(79,195,247,0.5); }
.rank-avatar.female { border-color: #ffb3d1; box-shadow: 0 0 8px rgba(255,95,168,0.45); }
.rank-info { flex: 1; }
.rank-name { font-size: 15px; color: #fff; }
.rank-meta { font-size: 11px; color: var(--txt-dim); }
.rank-score { font-family: var(--mono); font-size: 24px; font-weight: 900; min-width: 90px; text-align: right; }
.rank-score.pos { color: var(--green); text-shadow: 0 0 12px rgba(57,255,184,0.5); }
.rank-score.neg { color: var(--red); text-shadow: 0 0 12px rgba(255,77,94,0.5); }
.rank-bar { height: 4px; background: rgba(0,229,255,0.1); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--orange)); border-radius: 2px; transition: width .6s ease; }

/* ===== 前 10 名特效：前三名王者荣耀风格 / 4-10 一般特效 ===== */
.rank-item.king { overflow: hidden; }
.rank-item.king::before {
  content: ""; position: absolute; inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 300deg, rgba(255,213,74,0.25) 340deg, transparent 360deg);
  animation: kingShine 3.2s linear infinite;
  pointer-events: none;
}
@keyframes kingShine { to { transform: rotate(360deg); } }
.rank-item.king::after {
  content: ""; position: absolute; left: -120%; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.16), transparent);
  animation: kingSweep 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes kingSweep { 0%, 100% { left: -120%; } 50% { left: 130%; } }
.rank-item.king1 {
  border: 1.5px solid rgba(255,213,74,0.9);
  background: linear-gradient(90deg, rgba(60,42,8,0.65), rgba(30,22,6,0.7));
  box-shadow: 0 0 26px rgba(255,213,74,0.28), inset 0 0 30px rgba(255,213,74,0.08);
  transform: scale(1.012);
}
.rank-item.king2 {
  border: 1.5px solid rgba(200,215,225,0.85);
  background: linear-gradient(90deg, rgba(40,48,60,0.65), rgba(22,26,34,0.7));
  box-shadow: 0 0 22px rgba(200,215,225,0.2), inset 0 0 26px rgba(200,215,225,0.06);
}
.rank-item.king3 {
  border: 1.5px solid rgba(255,171,122,0.85);
  background: linear-gradient(90deg, rgba(58,34,20,0.65), rgba(28,17,10,0.7));
  box-shadow: 0 0 22px rgba(255,171,122,0.22), inset 0 0 26px rgba(255,171,122,0.07);
}
.rank-no.king { font-size: 26px; }
.rank-no.king1 { color: var(--gold); text-shadow: 0 0 16px rgba(255,213,74,0.9), 0 0 34px rgba(255,213,74,0.5); }
.rank-no.king2 { color: var(--silver); text-shadow: 0 0 14px rgba(220,232,240,0.8); }
.rank-no.king3 { color: var(--bronze); text-shadow: 0 0 14px rgba(255,171,122,0.8); }
.rank-avatar.king { border-width: 2.5px; }
.rank-avatar.king1 { border-color: var(--gold); box-shadow: 0 0 18px 3px rgba(255,213,74,0.6), 0 0 40px rgba(255,213,74,0.35); }
.rank-avatar.king2 { border-color: #dce8f0; box-shadow: 0 0 16px 3px rgba(220,232,240,0.5), 0 0 34px rgba(220,232,240,0.28); }
.rank-avatar.king3 { border-color: #ffab7a; box-shadow: 0 0 16px 3px rgba(255,171,122,0.5), 0 0 34px rgba(255,171,122,0.28); }
.rank-item .king-tag {
  position: absolute; right: 118px; top: 50%; transform: translateY(-50%);
  font-size: 11px; letter-spacing: 2px; white-space: nowrap;
  padding: 3px 10px; border-radius: 4px;
  color: #1a0d00; font-weight: 700;
  background: linear-gradient(180deg, #ffe680, #ffbe2e);
  box-shadow: 0 0 14px rgba(255,213,74,0.6);
  animation: kingTagFloat 2s ease-in-out infinite;
}
.rank-item.king2 .king-tag { background: linear-gradient(180deg, #f2f7fb, #b8c8d6); color: #20303f; box-shadow: 0 0 14px rgba(200,215,225,0.5); }
.rank-item.king3 .king-tag { background: linear-gradient(180deg, #ffd3b0, #ff8f57); color: #3a1605; box-shadow: 0 0 14px rgba(255,171,122,0.5); }
@keyframes kingTagFloat { 0%, 100% { transform: translateY(-50%) translateX(0); } 50% { transform: translateY(-50%) translateX(4px); } }
.rank-item.king .rank-score { font-size: 30px; }

/* 4-10 名：一般特效（发光描边 + 扫光） */
.rank-item.elite {
  border: 1px solid rgba(0,229,255,0.45);
  background: linear-gradient(90deg, rgba(8,20,40,0.85), rgba(6,14,28,0.7));
  box-shadow: 0 0 12px rgba(0,229,255,0.12), inset 0 0 18px rgba(0,229,255,0.04);
  overflow: hidden;
}
.rank-item.elite::after {
  content: ""; position: absolute; left: -120%; top: 0; bottom: 0; width: 32%;
  background: linear-gradient(100deg, transparent, rgba(0,229,255,0.1), transparent);
  animation: eliteSweep 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes eliteSweep { 0%, 100% { left: -120%; } 45% { left: 130%; } }
.rank-item.elite .rank-no { color: var(--cyan); text-shadow: 0 0 10px rgba(0,229,255,0.6); }
.rank-item.elite .rank-avatar { border-color: rgba(0,229,255,0.6); box-shadow: 0 0 10px rgba(0,229,255,0.35); }

/* 分数动态 */
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th, .history-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.history-table th { color: var(--cyan); font-weight: normal; letter-spacing: 1px; font-size: 12px; background: rgba(0,229,255,0.04); }
.history-table tr:hover td { background: rgba(0,229,255,0.03); }
.delta-pos { color: var(--green); font-weight: 700; }
.delta-neg { color: var(--red); font-weight: 700; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px;
  border: 1px solid var(--line2); color: var(--txt-dim);
}
.tag.gray { color: var(--txt-dim); border-color: var(--line2); }
.tag.cyan { color: var(--cyan); border-color: var(--cyan); }

/* ============ 头像库 ============ */
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.avatar-item {
  text-align: center; cursor: pointer; position: relative;
  background: rgba(10,18,36,0.6); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 6px 6px; transition: all .18s;
}
.avatar-item:hover { border-color: var(--cyan); transform: translateY(-2px); }
.avatar-item img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line2); }
.avatar-item .av-name { font-size: 11px; color: var(--txt-dim); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-item .av-del {
  position: absolute; top: 4px; right: 4px; width: 18px; height: 18px;
  background: rgba(255,77,94,0.85); color: #fff; border: none; border-radius: 50%;
  font-size: 11px; line-height: 1; cursor: pointer; display: none;
}
.avatar-item:hover .av-del { display: block; }

/* ============ 裁剪弹窗 ============ */
.crop-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.crop-box { position: relative; width: 320px; height: 320px; overflow: hidden; background: #000; }
.crop-box img { position: absolute; max-width: none; }
.crop-mask { position: absolute; border: 2px dashed var(--orange); box-shadow: 0 0 0 9999px rgba(0,0,0,0.6); cursor: move; }

/* ============ 模态框 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(3,6,14,0.7); backdrop-filter: blur(3px);
  z-index: 300; display: flex; align-items: center; justify-content: center;
  animation: fadeIn .18s ease;
}
.modal {
  width: min(640px, 92vw); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, #101c38, #0a1224);
  border: 1px solid var(--line2); border-radius: 8px;
  padding: 22px 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,229,255,0.08);
}
.modal::before, .modal::after { content: ""; position: absolute; width: 20px; height: 20px; }
.modal::before { top: -1px; left: -1px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.modal::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--orange); border-right: 2px solid var(--orange); }
.modal-title { font-size: 17px; color: var(--cyan); letter-spacing: 2px; margin-bottom: 16px; }
.modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--txt-dim); font-size: 22px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--red); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============ Toast ============ */
#toast-root { position: fixed; top: 20px; right: 20px; z-index: 600; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 12px 18px; border-radius: 4px; font-size: 14px;
  border: 1px solid var(--line2); background: rgba(12,22,42,0.95);
  color: var(--txt); box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slideIn .2s ease; min-width: 200px;
}
.toast.ok { border-color: var(--green); }
.toast.err { border-color: var(--red); color: #ffb9bf; }
.toast.warn { border-color: var(--orange); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ 课次状态 ============ */
.lesson-indicator {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  border: 1px solid var(--green); color: var(--green);
  background: rgba(57,255,184,0.08);
}
.lesson-indicator .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: blink 1.2s infinite; }
.lesson-indicator.off { border-color: var(--txt-dim); color: var(--txt-dim); background: transparent; }
.lesson-indicator.off .dot { background: var(--txt-dim); animation: none; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }

/* ============ 杂项 ============ */
.empty-tip { text-align: center; color: var(--txt-dim); padding: 50px 20px; font-size: 14px; letter-spacing: 2px; }
.empty-tip .big { font-size: 40px; margin-bottom: 12px; color: var(--line2); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 24px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(10,18,36,0.9); border: 1px solid var(--line2); border-radius: 24px;
  transition: all .2s;
}
.switch span::before {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--txt-dim); transition: all .2s;
}
.switch input:checked + span { background: rgba(0,229,255,0.2); border-color: var(--cyan); }
.switch input:checked + span::before { transform: translateX(22px); background: var(--cyan); box-shadow: 0 0 8px rgba(0,229,255,0.8); }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } .sidebar { width: 62px; flex: 0 0 62px; } .nav-item { font-size: 0; justify-content: center; } .nav-item .nav-ic { font-size: 16px; } }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: rgba(10,18,36,0.6); }
::-webkit-scrollbar-thumb { background: #22345c; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }

/* ============ 按组编辑 ============ */
.group-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 10px 0; padding: 8px 12px;
  background: linear-gradient(135deg, rgba(0,229,255,0.08), rgba(124,77,255,0.08));
  border: 1px solid rgba(0,229,255,0.35); border-radius: 6px;
  box-shadow: 0 0 18px rgba(0,229,255,0.12), inset 0 0 20px rgba(0,229,255,0.04);
}
.group-bar .gb-title { font-size: 13px; color: var(--cyan); letter-spacing: 1px; white-space: nowrap; }
.group-bar .gb-title b { font-size: 16px; }
.group-bar .gb-deg { font-size: 13px; color: var(--orange); white-space: nowrap; padding: 2px 8px; border: 1px dashed rgba(255,158,0,0.5); border-radius: 4px; cursor: pointer; transition: all .2s; }
.group-bar .gb-deg:hover { background: rgba(255,158,0,0.12); border-color: var(--orange); box-shadow: 0 0 10px rgba(255,158,0,0.35); }
.group-bar .gb-deg b { font-size: 15px; }
.group-bar .gb-deg-input { width: 64px; background: rgba(255,158,0,0.12); color: var(--orange); border: 1px solid var(--orange); border-radius: 4px; font-size: 15px; font-weight: 700; text-align: center; padding: 1px 4px; outline: none; }
.group-bar .gb-deg-input:focus { box-shadow: 0 0 12px rgba(255,158,0,0.5); }
.group-bar .btn.active { background: rgba(0,229,255,0.25); color: var(--cyan); box-shadow: 0 0 12px rgba(0,229,255,0.4); }
.group-frame {
  position: absolute; border: 1.5px dashed rgba(0,229,255,0.35); border-radius: 6px; pointer-events: none;
  z-index: 3; transition: border-color .15s, box-shadow .15s;
}
.group-frame.sel { border: 2px solid var(--cyan); box-shadow: 0 0 14px rgba(0,229,255,0.35), inset 0 0 14px rgba(0,229,255,0.08); }
.group-tag {
  position: absolute; transform: translate(2px, -100%); pointer-events: none; z-index: 4;
  font-size: 11px; letter-spacing: 1px; padding: 1px 6px; border-radius: 3px;
  background: rgba(10,18,36,0.9); color: var(--txt-dim); border: 1px solid var(--line2); white-space: nowrap;
}
.group-tag.sel { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px rgba(0,229,255,0.4); }
/* 组编辑选中态：组内座位高亮 */
.seat.g-sel { z-index: 6; }
.seat.g-sel .seat-avatar { box-shadow: 0 0 0 3px var(--cyan), 0 0 20px 4px rgba(0,229,255,0.5); }
/* 组内删座 / 微调模式提示 */
.seat.g-del .seat-avatar { box-shadow: 0 0 0 2px var(--red), 0 0 14px 3px rgba(255,77,94,0.6); }
.seat.g-del:hover { transform: scale(1.08); }
.seat.g-drag .seat-avatar { box-shadow: 0 0 0 2px var(--orange), 0 0 14px 3px rgba(255,158,0,0.5); }
/* 多选（合并为组）选中态 */
.seat.multi-sel { z-index: 6; }
.seat.multi-sel .seat-avatar { box-shadow: 0 0 0 3px #7c4dff, 0 0 20px 4px rgba(124,77,255,0.6); }

/* ============ 老师/学生视角切换 ============ */
.view-switch .mode-item { padding: 7px 12px; }
.view-switch .mode-item.active { background: rgba(0,229,255,0.15); color: var(--cyan); box-shadow: inset 0 0 12px rgba(0,229,255,0.15); }

/* ============ 全班头像缩放（选班上课） ============ */
.zoom-ctrl { display: flex; align-items: center; gap: 6px; }
.zoom-ctrl .btn { min-width: 34px; padding: 6px 8px; font-size: 15px; font-weight: 700; }
.zoom-val { min-width: 48px; text-align: center; font-size: 13px; color: var(--cyan); font-weight: 700; letter-spacing: 1px; text-shadow: 0 0 8px rgba(0,229,255,0.5); }

/* ============ 间距调节（头像不变，只调座位空隙） ============ */
.gap-ctrl { padding-left: 12px; border-left: 1px solid var(--line2); }
.gap-label { font-size: 12px; color: var(--txt-dim); letter-spacing: 1px; margin-right: 2px; }
.gap-ctrl .zoom-val { color: var(--orange); text-shadow: 0 0 8px rgba(255,158,0,0.5); }

/* ============ 选班上课全屏模式 ============ */
body.app-fs .topbar { display: none; }
body.app-fs .sidebar { display: none; }
body.app-fs .layout { padding: 0; }
.fs-exit {
  display: inline-flex; align-items: center; gap: 6px;
  position: fixed; top: 12px; right: 14px; z-index: 4500;
  background: rgba(255,77,94,0.15); border: 1px solid var(--red);
  color: var(--red); border-radius: 8px; padding: 10px 18px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.fs-exit:hover { background: rgba(255,77,94,0.3); }
.teach-fs {
  position: fixed; inset: 0; z-index: 4000;
  background: radial-gradient(circle at 50% 30%, rgba(0,229,255,0.08), transparent 60%), #060b18;
  padding: 10px 14px 20px; overflow: auto;
}
.teach-fs #te-head { display: none; }
.teach-fs #te-quick-hint { display: none; }
.teach-fs .quick-bar {
  position: sticky; top: 0; z-index: 300; flex-wrap: wrap; row-gap: 6px;
  padding: 6px 8px; gap: 5px;
}
/* 全屏时快捷栏紧凑化（字号/按钮/间距调小，容纳组间距+退出图标） */
.teach-fs .quick-bar .quick-btn { width: 40px; height: 34px; font-size: 14px; }
.teach-fs .quick-bar .mode-switch .mode-item { font-size: 12px; padding: 7px 10px; }
.teach-fs .quick-bar .gap-label { font-size: 11px; }
.teach-fs .quick-bar .zoom-ctrl { gap: 4px; }
.teach-fs .quick-bar .zoom-ctrl .btn { min-width: 26px; padding: 4px 6px; font-size: 13px; }
.teach-fs .quick-bar .zoom-val { min-width: 38px; font-size: 11px; }
.teach-fs .quick-bar .gap-ctrl { padding-left: 8px; }
/* 退出全屏：快捷栏内的小按钮（静态排布，不再 fixed 右上角） */
.teach-fs #te-fs-exit {
  position: static; display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 10px; margin-left: 2px;
  border-radius: 6px; font-size: 13px; white-space: nowrap;
}
.teach-fs .batch-bar { position: sticky; bottom: 10px; z-index: 300; }
