* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f5f7fb;
  color: #1f2329;
}
.hidden { display: none !important; }
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1b4fd8, #3370ff 55%, #6ea0ff);
}
.login-card {
  width: 380px;
  background: #fff;
  border-radius: 12px;
  padding: 28px 28px 22px;
  box-shadow: 0 16px 40px rgba(16, 40, 90, .22);
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.sub { margin: 0 0 18px; color: #646a73; font-size: 13px; }
label { display: block; margin: 10px 0 6px; font-size: 13px; color: #646a73; }
input, select, button {
  width: 100%;
  height: 40px;
  border: 1px solid #d0d3d9;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
}
button {
  margin-top: 16px;
  border: 0;
  background: #3370ff;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
button.ghost {
  width: auto;
  height: 32px;
  margin: 0;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}
button.tiny {
  width: auto;
  height: 28px;
  margin: 0 6px 0 0;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
}
button.tiny.plain { background: #eff4ff; color: #3370ff; }
button.tiny.ok { background: #2ea36b; }
button.tiny.warn { background: #d83931; }
button:hover { filter: brightness(1.05); }
.hint { font-size: 12px; color: #8f959e; margin: 12px 0 0; }
.error { color: #d83931; font-size: 13px; min-height: 18px; }
.event-pick button { margin-top: 8px; background: #1f2329; }
header {
  background: #1f4fbf;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header span { margin-left: 12px; font-size: 13px; opacity: .85; }
.header-actions { display: flex; gap: 8px; }
.header-select {
  margin-left: 12px;
  width: 240px;
  height: 32px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.3);
}
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  min-width: 90px;
  text-align: center;
}
.timer.warn { color: #ffb020; }
.timer.danger { color: #ff6b63; animation: blink .8s step-end infinite; }
@keyframes blink { 50% { opacity: .35; } }
.next-hint { font-size: 13px; opacity: .8; margin-right: auto; margin-left: 16px; }
.board {
  min-height: 100vh;
  background: #0b1220;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 28px 36px 36px;
}
.board-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  color: #8fb0ff;
  font-size: 16px;
}
#board-event { font-size: 18px; font-weight: 600; color: #fff; }
#board-clock { font-variant-numeric: tabular-nums; font-size: 28px; color: #fff; letter-spacing: 1px; }
.board-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 24px;
}
.board-label { color: #8fb0ff; letter-spacing: 2px; font-size: 14px; margin-bottom: 12px; }
#board-title { font-size: 42px; line-height: 1.3; font-weight: 700; }
#board-meta { margin: 16px 0 28px; color: #c5d0e0; font-size: 18px; }
#board-timer { font-size: 96px; font-weight: 800; letter-spacing: 4px; }
.board-next { border-left: 1px solid rgba(255,255,255,.12); padding-left: 24px; }
.up-item { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.up-item b { display: block; font-size: 20px; margin-bottom: 6px; }
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.toolbar select, .toolbar input[type="search"] { width: 180px; }
.toolbar input[type="search"] { width: 220px; }
#stat { color: #646a73; font-size: 13px; }
main { padding: 0 20px 32px; }
.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(31,35,41,.06);
}
.card h3 { margin: 0 0 8px; font-size: 16px; }
.meta { color: #646a73; font-size: 13px; margin-bottom: 10px; }
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #eef0f4;
}
.file-row:first-child { border-top: 0; }
.file-name { font-size: 14px; }
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 12px;
  background: #f0f2f5;
  color: #646a73;
}
.tag.pending { background: #fff3e0; color: #c45c00; }
.tag.received { background: #e8f3ff; color: #3370ff; }
.tag.ready { background: #e6f6ed; color: #2ea36b; }
.tag.playing { background: #ffe8e6; color: #d83931; }
.tag.rejected { background: #f0f0f0; color: #8f959e; }
.empty { text-align: center; color: #8f959e; padding: 60px 0; }
.overlay {
  position: fixed;
  inset: 0;
  background: #111;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.overlay-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  color: #fff;
  background: #1f2329;
}
.overlay iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #000;
}
.card-actions { margin-top: 8px; }
.file-remark { display: block; margin-top: 4px; font-size: 12px; color: #d83931; }
.project-fallback {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #1d2b4a, #0b1220 70%);
}
.fallback-card {
  width: min(720px, 90vw);
  color: #fff;
  text-align: left;
}
.fallback-card h2 { margin: 0 0 12px; font-size: 36px; line-height: 1.3; }
.fallback-card p { color: #c5d0e0; font-size: 16px; }
.fallback-card a {
  display: inline-block;
  margin-top: 12px;
  color: #fff;
  background: #3370ff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  background: #1f2329;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  max-width: 360px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
@media (max-width: 900px) {
  .board-body { grid-template-columns: 1fr; }
  #board-title { font-size: 28px; }
  #board-timer { font-size: 56px; }
}
