/* ============ 前台大屏 ============ */
body { overflow: hidden; }

.glow { position: fixed; border-radius: 50%; filter: blur(120px); opacity: 0.5; pointer-events: none; z-index: 0; }
.g1 { width: 520px; height: 520px; background: rgba(99, 102, 241, 0.35); top: -180px; left: -120px; }
.g2 { width: 460px; height: 460px; background: rgba(168, 85, 247, 0.28); bottom: -160px; right: -100px; }

/* ---- 顶栏 ---- */
.topbar {
  position: relative; z-index: 5;
  height: 76px; padding: 0 26px;
  display: flex; align-items: center; gap: 22px;
  background: rgba(13, 17, 35, 0.75); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px;
  box-shadow: 0 6px 16px rgba(124, 92, 246, 0.45);
}
.brand-txt h1 { font-size: 21px; letter-spacing: 0.5px; white-space: nowrap; }
.brand-txt p { font-size: 12px; color: var(--txt-2); margin-top: 2px; white-space: nowrap; }

.tabs {
  display: flex; gap: 6px; padding: 6px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  border-radius: 16px; margin: 0 auto;
}
.tab {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: 12px;
  font-size: 16px; font-weight: 600; color: var(--txt-2);
  transition: all 0.18s;
}
.tab span { font-size: 18px; line-height: 1; display: inline-flex; }
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(124, 92, 246, 0.4); }
.tab:not(.active):hover { color: var(--txt); background: rgba(255, 255, 255, 0.06); }

.top-acts { display: flex; align-items: center; gap: 12px; }
.clock { text-align: right; line-height: 1.15; }
.clock span { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock small { display: block; font-size: 11.5px; color: var(--txt-2); }
.tbtn {
  width: 44px; height: 44px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 20px; transition: all 0.15s; text-decoration: none;
}
.tbtn:hover { color: var(--txt); background: rgba(255, 255, 255, 0.13); }
.tbtn.on { color: #c7d2fe; background: rgba(99, 102, 241, 0.2); border-color: rgba(99, 102, 241, 0.5); }

/* ---- 布局 ---- */
.layout { position: relative; z-index: 1; display: flex; gap: 20px; padding: 20px 26px; height: calc(100vh - 76px); }
.main-view { flex: 1; min-width: 0; position: relative; }
.view { display: none; height: 100%; flex-direction: column; }
.view.active { display: flex; animation: viewIn 0.3s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* ---- 学生墙 ---- */
.wall-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.stat-chips { display: flex; gap: 10px; flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px;
  font-size: 14px; color: var(--txt-2);
}
.chip .icon { font-size: 16px; color: #a5b4fc; }
.chip b { color: var(--txt); font-size: 15px; }
.wall-tip { font-size: 13.5px; color: var(--txt-3); }

.wall {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 14px; align-content: start;
  padding: 4px; margin: -4px;
}
.stu-card {
  position: relative;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  cursor: pointer; transition: transform 0.15s, border-color 0.15s, background 0.15s;
  animation: cardIn 0.35s backwards;
}
@keyframes cardIn { from { opacity: 0; transform: scale(0.9); } }
.stu-card:hover { transform: translateY(-4px); border-color: rgba(129, 110, 247, 0.55); background: var(--panel-2); }
.stu-card:active { transform: scale(0.96); }
.stu-card .av { width: 64px; height: 64px; font-size: 24px; }
.stu-card .stu-name {
  font-size: 16.5px; font-weight: 600; max-width: 100%;
  line-height: 1.25; overflow-wrap: anywhere; word-break: break-word;
  text-align: center;
}
.stu-card .stu-name.long { font-size: 14px; }
.stu-card .stu-name.xlong { font-size: 12px; line-height: 1.35; }
.stu-card .stu-pts {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px;
  background: rgba(99, 102, 241, 0.15); color: #c7d2fe;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.stu-card .stu-pts .icon { font-size: 13px; }
.stu-card .stu-pts.neg { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.stu-card .rank-badge {
  position: absolute; top: 10px; left: 10px;
  width: 26px; height: 26px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  background: rgba(255, 255, 255, 0.08); color: var(--txt-2);
}
.stu-card .rank-badge.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #451a03; }
.stu-card .rank-badge.r2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #1e293b; }
.stu-card .rank-badge.r3 { background: linear-gradient(135deg, #d97706, #b45309); color: #fff7ed; }
.stu-card.bump { animation: bump 0.5s; }
@keyframes bump { 30% { transform: scale(1.08); } 60% { transform: scale(0.97); } }

.float-delta {
  position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
  font-size: 24px; font-weight: 900; pointer-events: none; z-index: 3;
  animation: floatUp 1.2s forwards; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
@keyframes floatUp { to { transform: translate(-50%, -46px); opacity: 0; } }

/* ---- 侧栏 ---- */
.side { width: 330px; flex: none; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.side-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; min-height: 0;
}
.rank-card { flex: none; }
.feed-card { flex: 1; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.side-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.side-head .icon { font-size: 18px; color: #fbbf24; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
}
.rank-item.me { background: rgba(99, 102, 241, 0.14); border: 1px solid rgba(99, 102, 241, 0.4); }
.rank-item .no { width: 24px; text-align: center; font-weight: 800; font-size: 14px; color: var(--txt-3); }
.rank-item.r1 .no { color: #fbbf24; }
.rank-item.r2 .no { color: #cbd5e1; }
.rank-item.r3 .no { color: #d97706; }
.rank-item .av { width: 36px; height: 36px; font-size: 14px; }
.rank-item .rn {
  flex: 1; font-size: 14px; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; word-break: break-word;
}
.rank-item .rn.long { font-size: 12.5px; }
.rank-item .rn.xlong { font-size: 11.5px; }
.rank-item .rp { font-size: 15px; font-weight: 800; color: #c7d2fe; font-variant-numeric: tabular-nums; }
.rank-item.r1 .rp { color: #fbbf24; }

.feed { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; min-height: 0; }
.feed-empty { color: var(--txt-3); font-size: 13.5px; text-align: center; padding: 26px 0; }
.feed-item {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 13.5px; color: var(--txt-2); line-height: 1.45;
  animation: viewIn 0.3s;
}
.feed-item .icon { font-size: 15px; margin-top: 2px; color: #818cf8; }
.feed-item.fd-minus .icon { color: #f87171; }
.feed-item.fd-prize .icon { color: #fbbf24; }
.feed-item.fd-draw .icon { color: #22d3ee; }
.feed-item b { color: var(--txt); font-weight: 600; }
.feed-item .fd-delta.plus { color: #4ade80; font-weight: 700; }
.feed-item .fd-delta.minus { color: #f87171; font-weight: 700; }
.feed-item small { color: var(--txt-3); font-size: 11.5px; }

/* ---- 点名转盘 ---- */
#view-roll { align-items: center; justify-content: center; gap: 26px; }
.roll-stage { position: relative; width: min(560px, 90%); }
.reel-window {
  height: 375px; overflow: hidden; position: relative;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.reel { will-change: transform; }
.reel-item {
  height: 125px; display: flex; align-items: center; gap: 18px; padding: 0 34px;
  opacity: 0.45; transition: none;
}
.reel-item .av { width: 76px; height: 76px; font-size: 28px; }
.reel-item .reel-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.reel-item .reel-name { font-size: 24px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel-item .reel-name.long { font-size: 18px; }
.reel-item .reel-name.xlong { font-size: 14.5px; }
.reel-item .reel-pts { font-size: 14px; color: var(--txt-2); }
.reel-hit { opacity: 1 !important; }
.reel-hit .reel-name { color: #fff; }
.reel-mask { position: absolute; left: 0; right: 0; height: 90px; z-index: 2; pointer-events: none; }
.reel-mask.top { top: 0; background: linear-gradient(rgba(11, 16, 32, 0.95), transparent); border-radius: 26px 26px 0 0; }
.reel-mask.bottom { bottom: 0; background: linear-gradient(transparent, rgba(11, 16, 32, 0.95)); border-radius: 0 0 26px 26px; }
.reel-pointer {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%;
  border: 3px solid rgba(129, 140, 248, 0.8);
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.18), 0 0 44px rgba(99, 102, 241, 0.5);
  pointer-events: none;
}
.reel-pointer::after {
  content: ""; position: absolute; inset: 10px;
  border-radius: 50%; border: 2px dashed rgba(199, 210, 254, 0.5);
}
.roll-ctrl { display: flex; gap: 14px; }
.roll-ctrl .btn { min-width: 220px; font-size: 18px; }
.roll-result {
  font-size: 17px; color: var(--txt-2);
  display: flex; align-items: center; gap: 10px;
  animation: viewIn 0.3s;
}
.roll-result .icon { color: #4ade80; font-size: 20px; }
.hidden { display: none !important; }

/* ---- 盲盒 ---- */
#view-draw { flex-direction: row; gap: 26px; align-items: stretch; }
.draw-left { flex: 1.1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.draw-box-stage { position: relative; width: 280px; height: 280px; display: flex; align-items: center; justify-content: center; }
.lucky-box { position: relative; z-index: 2; width: 210px; height: 180px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.box-body {
  position: absolute; left: 0; right: 0; bottom: 0; height: 122px;
  border-radius: 16px;
  background: linear-gradient(160deg, #7c3aed, #5b21b6 55%, #4c1d95);
  border: 2px solid rgba(255, 255, 255, 0.22);
  display: flex; align-items: center; justify-content: center;
}
.box-body::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.16) 46%, rgba(255, 255, 255, 0.16) 54%, transparent 58%);
  border-radius: 14px;
}
.box-lid {
  position: absolute; left: -12px; right: -12px; top: 18px; height: 52px;
  border-radius: 13px;
  background: linear-gradient(160deg, #a855f7, #7c3aed);
  border: 2px solid rgba(255, 255, 255, 0.28);
  display: flex; align-items: center; justify-content: center;
  transform-origin: 12% 100%;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.box-lid .icon { font-size: 26px; color: rgba(255, 255, 255, 0.85); }
.box-qm {
  position: absolute; font-size: 64px; font-weight: 900; color: rgba(255, 255, 255, 0.92);
  font-family: Georgia, serif; text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.box-body .icon { display: none; }
.lucky-box.shake { animation: boxShake 0.42s infinite; }
.lucky-box.shake .box-lid { transform: rotate(-4deg); }
@keyframes boxShake {
  0%, 100% { transform: rotate(0) translateY(0); }
  25% { transform: rotate(-3.5deg) translateY(-5px); }
  50% { transform: rotate(3deg) translateY(-9px); }
  75% { transform: rotate(-2deg) translateY(-4px); }
}
.lucky-box.open .box-lid { transform: translateY(-74px) rotate(-14deg); }
.box-rays {
  position: absolute; inset: -40px; z-index: 1;
  background: conic-gradient(rgba(168, 85, 247, 0.22) 0 14deg, transparent 14deg 40deg, rgba(99, 102, 241, 0.2) 40deg 54deg, transparent 54deg 80deg, rgba(168, 85, 247, 0.22) 80deg 94deg, transparent 94deg 120deg, rgba(99, 102, 241, 0.2) 120deg 134deg, transparent 134deg 160deg, rgba(168, 85, 247, 0.22) 160deg 174deg, transparent 174deg 200deg, rgba(99, 102, 241, 0.2) 200deg 214deg, transparent 214deg 240deg, rgba(168, 85, 247, 0.22) 240deg 254deg, transparent 254deg 280deg, rgba(99, 102, 241, 0.2) 280deg 294deg, transparent 294deg 320deg, rgba(168, 85, 247, 0.22) 320deg 334deg, transparent 334deg 360deg);
  border-radius: 50%; opacity: 0; transition: opacity 0.4s;
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.draw-box-stage.lit .box-rays { opacity: 1; }

.draw-btn { min-width: 300px; font-size: 19px; margin-top: 14px; }
.draw-cost { font-size: 14px; color: var(--txt-2); display: flex; align-items: center; gap: 7px; }
.draw-cost .icon { color: #fbbf24; font-size: 16px; }

.draw-right { width: 360px; flex: none; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.drawer-pick, .prize-pool {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; min-height: 0;
}
.drawer-pick { flex: 1.4; }
.prize-pool { flex: 1; }
.drawer-pick h3, .prize-pool h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.search-ipt { padding: 9px 13px; font-size: 14px; margin-bottom: 10px; }
.drawer-list { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.drawer-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1.5px solid transparent;
  cursor: pointer; transition: all 0.13s; text-align: left; min-width: 0;
}
.drawer-item:hover { background: rgba(255, 255, 255, 0.1); }
.drawer-item.sel { border-color: rgba(129, 140, 248, 0.8); background: rgba(99, 102, 241, 0.18); }
.drawer-item .av { width: 32px; height: 32px; font-size: 13px; }
.drawer-item .dn {
  flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; word-break: break-word;
}
.drawer-item .dn.long { font-size: 12px; }
.drawer-item .dn.xlong { font-size: 11px; }
.drawer-item .dp { font-size: 12px; color: var(--txt-2); font-variant-numeric: tabular-nums; }
.drawer-item .dp.low { color: #f87171; }

.prize-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.prize-row {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.prize-row .icon { font-size: 19px; color: #fbbf24; }
.prize-row .pn { flex: 1; font-size: 13.5px; font-weight: 600; }
.prize-row .pw { font-size: 12px; color: var(--txt-3); }
.prize-row .pw.out { color: #f87171; }

/* ---- 抽奖结果弹层 ---- */
.prize-mask {
  position: fixed; inset: 0; z-index: 3200;
  background: rgba(5, 8, 18, 0.72); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.prize-mask.show { opacity: 1; pointer-events: auto; }
.prize-pop {
  position: relative; width: min(460px, 92vw);
  background: linear-gradient(170deg, #1d2447, #141a36);
  border: 1px solid rgba(129, 140, 248, 0.4);
  border-radius: 26px; padding: 40px 34px 32px;
  text-align: center;
  transform: scale(0.8) translateY(24px); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 30px 80px rgba(99, 102, 241, 0.3);
  overflow: visible;
}
.prize-mask.show .prize-pop { transform: scale(1) translateY(0); }
.prize-pop h2 { font-size: 27px; margin: 18px 0 8px; }
.prize-pop > p { color: var(--txt-2); font-size: 15px; }
.prize-icon-big {
  position: relative; z-index: 2;
  width: 108px; height: 108px; margin: 0 auto;
  border-radius: 32px; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 36px rgba(124, 92, 246, 0.55);
  animation: prizeJump 0.7s 0.1s both;
}
@keyframes prizeJump { 0% { transform: scale(0.4) rotate(-14deg); } 60% { transform: scale(1.12) rotate(4deg); } 100% { transform: scale(1); } }
.prize-icon-big .icon { font-size: 54px; color: #fff; }
.prize-rays {
  position: absolute; top: -26px; left: 50%; width: 240px; height: 240px;
  transform: translateX(-50%);
  background: conic-gradient(rgba(251, 191, 36, 0.16) 0 10deg, transparent 10deg 40deg, rgba(168, 85, 247, 0.14) 40deg 50deg, transparent 50deg 80deg, rgba(251, 191, 36, 0.16) 80deg 90deg, transparent 90deg 120deg, rgba(168, 85, 247, 0.14) 120deg 130deg, transparent 130deg 160deg, rgba(251, 191, 36, 0.16) 160deg 170deg, transparent 170deg 200deg, rgba(168, 85, 247, 0.14) 200deg 210deg, transparent 210deg 240deg, rgba(251, 191, 36, 0.16) 240deg 250deg, transparent 250deg 280deg, rgba(168, 85, 247, 0.14) 280deg 290deg, transparent 290deg 320deg, rgba(251, 191, 36, 0.16) 320deg 330deg, transparent 330deg 360deg);
  border-radius: 50%; animation: spin 10s linear infinite;
  opacity: 0.9; z-index: 0;
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 68%);
  mask-image: radial-gradient(circle, #000 30%, transparent 68%);
  pointer-events: none;
}
.prize-pop h2, .prize-pop > p, .prize-pt-line, .prize-btns { position: relative; z-index: 1; }
.prize-pt-line { margin-top: 16px; font-size: 15px; color: var(--txt-2); }
.prize-pt-line b { color: #4ade80; font-size: 17px; }
.prize-btns { display: flex; gap: 12px; justify-content: center; margin-top: 26px; }

/* ---- 学生操作面板 ---- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 3100;
  background: rgba(5, 8, 18, 0.62); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  padding: 20px;
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: min(560px, 94vw); max-height: 88vh; overflow-y: auto;
  background: #161c33; border: 1px solid var(--line);
  border-radius: 24px; padding: 24px;
  transform: scale(0.94) translateY(14px); transition: transform 0.22s;
  box-shadow: var(--shadow);
}
.sheet-mask.show .sheet { transform: scale(1) translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-close { flex: none; }
.sheet-stu { display: flex; align-items: center; gap: 15px; }
.sheet-stu .av { width: 62px; height: 62px; font-size: 23px; }
.sheet-stu h3 { font-size: 21px; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.sheet-stu h3.long { font-size: 17px; }
.sheet-stu h3.xlong { font-size: 14.5px; }
.sheet-stu p { font-size: 13px; color: var(--txt-2); margin-top: 3px; }
.pts-line {
  display: flex; align-items: center; gap: 8px;
  background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 13px; padding: 11px 16px; margin-bottom: 18px;
  font-size: 14.5px; color: var(--txt-2);
}
.pts-line b { font-size: 21px; color: #c7d2fe; font-variant-numeric: tabular-nums; }
.act-group { margin-bottom: 18px; }
.act-group h4 { font-size: 13.5px; color: var(--txt-3); font-weight: 600; margin-bottom: 10px; letter-spacing: 1px; }
.act-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.act-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 13px 10px; border-radius: 14px;
  font-size: 14.5px; font-weight: 600;
  transition: transform 0.12s, filter 0.15s;
}
.act-btn:active { transform: scale(0.94); }
.act-btn small { font-size: 17px; font-weight: 800; }
.act-btn.plus { background: rgba(34, 197, 94, 0.14); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.35); }
.act-btn.plus:hover { background: rgba(34, 197, 94, 0.26); }
.act-btn.minus { background: rgba(239, 68, 68, 0.13); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.act-btn.minus:hover { background: rgba(239, 68, 68, 0.25); }
.custom-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; }
.custom-row .btn .icon { font-size: 18px; }

/* ---- 响应式 ---- */
@media (max-width: 1100px) {
  .layout { flex-direction: column; height: auto; min-height: calc(100vh - 76px); }
  .side { width: 100%; flex-direction: row; }
  .side-card { flex: 1; }
  #view-draw { flex-direction: column; }
  .draw-right { width: 100%; flex-direction: row; }
  .drawer-pick, .prize-pool { flex: 1; }
  .tabs { order: 3; }
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 18px; gap: 12px; }
  .layout { height: auto; }
  body { overflow: auto; }
  .custom-row { grid-template-columns: 1fr 1fr; }
}

/* ---- 班级选择 ---- */
.cls-pick {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 9, 22, 0.72); backdrop-filter: blur(10px);
}
.cls-pick.hidden { display: none !important; }
.cls-pick-card {
  width: min(460px, 92vw); max-height: 80vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 26px; padding: 34px 30px; text-align: center;
  box-shadow: var(--shadow); animation: up 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.cls-pick-logo {
  width: 62px; height: 62px; border-radius: 19px; margin: 0 auto 16px;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 33px; box-shadow: 0 10px 26px rgba(124, 92, 246, 0.5);
}
.cls-pick-card h2 { font-size: 22px; }
.cls-pick-sub { color: var(--txt-3); font-size: 13.5px; margin: 7px 0 20px; }
.cls-pick-list { display: flex; flex-direction: column; gap: 10px; }
.cls-opt {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  transition: all 0.15s;
}
.cls-opt:hover { border-color: rgba(129, 110, 247, 0.7); background: rgba(99, 102, 241, 0.12); transform: translateY(-1px); }
.cls-opt-ic {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  background: rgba(99, 102, 241, 0.18); color: #a5b4fc;
}
.cls-opt-main b { display: block; font-size: 16px; }
.cls-opt-main small { color: var(--txt-3); font-size: 12px; }
.cls-empty { color: var(--txt-3); font-size: 14px; padding: 18px 0; }
.cls-go-admin { color: #a5b4fc; font-size: 13.5px; text-decoration: none; }
.cls-go-admin:hover { color: #c7d2fe; }
.cls-login-btn {
  display: block; padding: 13px 16px; border-radius: 16px;
  background: var(--grad); color: #fff; font-size: 16px; font-weight: 600;
  text-decoration: none; box-shadow: 0 8px 20px rgba(124, 92, 246, 0.4);
  transition: transform 0.15s;
}
.cls-login-btn:hover { transform: translateY(-1px); }

/* ============ 浅色主题（明亮教室/班班通用） ============ */
body.light { overflow: hidden; }
body.light .glow { opacity: 0.25; }
body.light .topbar { background: rgba(255, 255, 255, 0.85); }
body.light .tabs { background: rgba(15, 23, 42, 0.05); }
body.light .tab:not(.active):hover { color: var(--txt); background: rgba(15, 23, 42, 0.06); }
body.light .tbtn { background: rgba(15, 23, 42, 0.05); color: var(--txt-2); }
body.light .tbtn:hover { color: var(--txt); background: rgba(15, 23, 42, 0.1); }
body.light .tbtn.on { color: #4f46e5; background: rgba(99, 102, 241, 0.12); border-color: rgba(99, 102, 241, 0.45); }

body.light .chip .icon { color: #6366f1; }
body.light .stu-card:hover { border-color: rgba(99, 102, 241, 0.5); }
body.light .stu-card .stu-pts { color: #4338ca; }
body.light .stu-card .stu-pts.neg { color: #dc2626; }
body.light .stu-card .rank-badge { background: rgba(15, 23, 42, 0.06); color: var(--txt-2); }
body.light .float-delta { text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8); }

body.light .rank-item { background: rgba(15, 23, 42, 0.04); }
body.light .rank-item.me { background: rgba(99, 102, 241, 0.08); }
body.light .rank-item.r1 .no { color: #d97706; }
body.light .rank-item.r2 .no { color: #94a3b8; }
body.light .rank-item .rp { color: #4338ca; }
body.light .rank-item.r1 .rp { color: #d97706; }
body.light .feed-item .icon { color: #6366f1; }
body.light .feed-item.fd-minus .icon { color: #dc2626; }
body.light .feed-item .fd-delta.plus { color: #16a34a; }
body.light .feed-item .fd-delta.minus { color: #dc2626; }

body.light .reel-window { background: rgba(15, 23, 42, 0.03); }
body.light .reel-hit .reel-name { color: var(--txt); }
body.light .reel-mask.top { background: linear-gradient(rgba(238, 241, 248, 0.96), transparent); }
body.light .reel-mask.bottom { background: linear-gradient(transparent, rgba(238, 241, 248, 0.96)); }
body.light .roll-result .icon { color: #16a34a; }

body.light .drawer-item { background: rgba(15, 23, 42, 0.04); }
body.light .drawer-item:hover { background: rgba(15, 23, 42, 0.08); }
body.light .drawer-item.sel { background: rgba(99, 102, 241, 0.1); }
body.light .drawer-item .dp.low { color: #dc2626; }
body.light .prize-row { background: rgba(15, 23, 42, 0.04); }
body.light .prize-row .pw.out { color: #dc2626; }

body.light .prize-mask { background: rgba(30, 38, 60, 0.4); }
body.light .prize-pop { background: linear-gradient(170deg, #ffffff, #f2f4fd); border-color: rgba(99, 102, 241, 0.35); }
body.light .prize-pt-line b { color: #16a34a; }

body.light .sheet-mask { background: rgba(30, 38, 60, 0.35); }
body.light .sheet { background: #fff; }
body.light .pts-line b { color: #4338ca; }
body.light .act-btn.plus { color: #15803d; }
body.light .act-btn.minus { color: #b91c1c; }

body.light .cls-pick { background: rgba(30, 38, 60, 0.38); }
body.light .cls-pick-card { background: #fff; }
body.light .cls-opt { background: rgba(15, 23, 42, 0.04); }
body.light .cls-opt:hover { background: rgba(99, 102, 241, 0.08); }
body.light .cls-opt-ic { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
body.light .cls-go-admin { color: #4f46e5; }
body.light .cls-go-admin:hover { color: #6366f1; }

/* ---- 学生墙搜索 ---- */
.wall-search { width: 230px; flex: none; }
.wall-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.wall-empty {
  grid-column: 1 / -1; text-align: center;
  color: var(--txt-3); font-size: 15px; padding: 46px 0;
}
@media (max-width: 1100px) {
  .wall-head { flex-wrap: wrap; }
  .wall-search { flex: 1; min-width: 160px; }
}

/* ---- 管理入口二次验证 ---- */
.gate-av {
  width: 56px; height: 56px; font-size: 24px;
  background: var(--grad); color: #fff; border-radius: 50%;
}
.gate-ok { width: 100%; }
