* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", sans-serif;
  background: #eef2f7;
  color: #222;
}
.wrap { max-width: 960px; margin: 24px auto; padding: 0 16px; text-align: center; }
.title { margin-bottom: 8px; }
.hint { color: #666; font-size: 14px; margin-bottom: 12px; }
.paste-section { margin-bottom: 8px; }
textarea {
  width: 100%;
  max-width: 720px;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}
.btns { margin: 12px 0; flex-wrap: wrap; display: flex; justify-content: center; gap: 8px; }
.btns button,
.toolbar button {
  padding: 8px 16px;
  border: 0;
  border-radius: 4px;
  background: #2471a3;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.btns button:disabled,
.toolbar button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: #1a6b3c; }
.btn-tool { background: #5d6d7e; font-size: 13px; padding: 7px 12px; }
.msg { min-height: 24px; color: #c0392b; font-size: 14px; }
.result-section { margin-top: 16px; }
.result-section.hidden { display: none; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  border: 1px solid #ddd;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}
th { background: #dfe6ee; }
tr.row-ok { background: #fff; }
tr.row-error { background: #fdecea; color: #922b21; }
tr.row-wait { background: #fef9e7; }
tr.row-pending { background: #fafafa; }
.code-cell { cursor: pointer; user-select: none; min-width: 100px; }
.code-cell.has-code { color: #1a5276; font-weight: 600; }
.code-cell.has-code:hover { background: #eaf2f8; }
.code-waiting {
  color: #2471a3;
  font-style: normal;
  animation: pulseWait 1.4s ease-in-out infinite;
}
.code-waiting .dots {
  display: inline-block;
  width: 1.2em;
  text-align: left;
}
@keyframes pulseWait {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes dotBlink {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}
.code-waiting .dots::after {
  content: "...";
  animation: dotCycle 1.5s steps(4, end) infinite;
}
@keyframes dotCycle {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}
.code-pending { color: #888; }
.mail-cell { cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.2s;
}
.toast.hidden { opacity: 0; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }
.modal-box {
  background: #fff; width: min(640px, 92vw); max-height: 80vh; overflow: auto;
  padding: 20px; border-radius: 8px; text-align: left; position: relative;
}
.modal-close { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 24px; cursor: pointer; }
#modalBody { white-space: pre-wrap; word-break: break-word; }
