/* 计算页：服务器状态弹层 */
:root {
  --sm-ok: #0d9c75;
  --sm-warn: #c26a10;
}

/* ---- 状态条（醒目入口） ---- */
.statusbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(13, 156, 117, .24);
  background: linear-gradient(120deg, rgba(224, 248, 239, .95), rgba(244, 252, 250, .8));
  color: #0d5c47;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.statusbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 130% at 0% 50%, rgba(13, 156, 117, .12), transparent 62%);
  pointer-events: none;
}
.statusbar:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 156, 117, .4);
  box-shadow: 0 14px 30px -24px rgba(13, 92, 71, .8);
}
.statusbar:active { transform: translateY(0) scale(.995); }

.statusbar__dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0d9c75;
  flex: none;
}
.statusbar__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(13, 156, 117, .4);
  animation: sbPulse 1.9s ease-out infinite;
}
@keyframes sbPulse {
  0% { transform: scale(.55); opacity: .9; }
  75% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.statusbar__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.statusbar__text b { font-size: 13.5px; letter-spacing: .01em; }
.statusbar__text em { font-style: normal; font-size: 11.5px; color: #4f7f72; }

.statusbar__go {
  position: relative;
  z-index: 1;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(13, 156, 117, .25);
  font-size: 12px;
  font-weight: 700;
  color: #0d8f6b;
  white-space: nowrap;
  transition: background-color .18s ease, transform .18s ease;
}
.statusbar:hover .statusbar__go { background: #fff; transform: translateX(2px); }

.statusbar.is-off {
  border-color: rgba(194, 106, 16, .3);
  background: linear-gradient(120deg, rgba(255, 245, 231, .95), rgba(255, 251, 245, .8));
  color: #7a4a10;
}
.statusbar.is-off::after {
  background: radial-gradient(70% 130% at 0% 50%, rgba(194, 106, 16, .12), transparent 62%);
}
.statusbar.is-off .statusbar__dot { background: #f0a13a; }
.statusbar.is-off .statusbar__dot::after { border-color: rgba(240, 161, 58, .45); animation: none; }
.statusbar.is-off .statusbar__text em { color: #96683a; }
.statusbar.is-off .statusbar__go {
  border-color: rgba(194, 106, 16, .28);
  color: #b57418;
}

/* 工作台 / 后台：整块状态条 */
.statusbar--block { margin: 0 0 16px; }

/* 登录卡片内的状态条 */
.login__card .statusbar { margin: 14px 0 4px; }

/* 深色主题适配 */
html[data-theme="dark"] .statusbar {
  background: linear-gradient(120deg, rgba(14, 54, 44, .78), rgba(18, 28, 38, .68));
  border-color: rgba(13, 156, 117, .38);
  color: #bfe9da;
}
html[data-theme="dark"] .statusbar__text em { color: #8fb6a9; }
html[data-theme="dark"] .statusbar__go {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(13, 156, 117, .32);
  color: #7fd8b8;
}
html[data-theme="dark"] .statusbar.is-off {
  background: linear-gradient(120deg, rgba(56, 40, 16, .78), rgba(28, 26, 22, .68));
  border-color: rgba(240, 161, 58, .38);
  color: #f0d3a8;
}
html[data-theme="dark"] .statusbar.is-off .statusbar__text em { color: #c2a077; }
html[data-theme="dark"] .statusbar.is-off .statusbar__go {
  border-color: rgba(240, 161, 58, .32);
  color: #f0b968;
}

html[data-theme="dark"] .smodal__card {
  background: rgba(23, 30, 44, .95);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8);
}
html[data-theme="dark"] .smodal__head h3 { color: #eef2f8; }
html[data-theme="dark"] .smodal__head p { color: #93a0b8; }
html[data-theme="dark"] .smodal__x {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .12);
  color: #c8d2e4;
}
html[data-theme="dark"] .st-row {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .st-row__name { color: #e8edf7; }
html[data-theme="dark"] .st-row__meta { color: #93a0b8; }
html[data-theme="dark"] .st-row__badge { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .smodal__stamp { color: #93a0b8; }
html[data-theme="dark"] .smodal__btn--ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
  color: #dbe3f0;
}

/* ---- 弹层 ---- */
.smodal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s ease, visibility 0s linear .26s;
}
.smodal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .26s ease;
}
.smodal__mask {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 38, .3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.smodal__card {
  position: relative;
  width: min(420px, 100%);
  padding: 20px 20px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 30px 70px -30px rgba(15, 30, 60, .55);
  transform: translateY(16px) scale(.965);
  transition: transform .36s cubic-bezier(.2, .85, .25, 1);
}
.smodal.is-open .smodal__card { transform: none; }

.smodal__head { display: flex; align-items: flex-start; }
.smodal__head h3 { margin: 0; font-size: 17px; letter-spacing: .02em; color: #101a2e; }
.smodal__head p { margin: 4px 0 0; font-size: 11px; color: #8892a8; }
.smodal__x {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(20, 45, 90, .12);
  background: rgba(255, 255, 255, .8);
  color: #5c6880;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}
.smodal__x:hover { background: #fff; transform: rotate(90deg); }

.smodal__list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 14px; }

.st-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 45, 90, .08);
  background: rgba(255, 255, 255, .7);
  opacity: 0;
  transform: translateY(8px);
}
.smodal.is-open .st-row {
  animation: stIn .38s cubic-bezier(.2, .85, .25, 1) forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 90ms);
}
@keyframes stIn { to { opacity: 1; transform: none; } }

.st-row__dot { width: 9px; height: 9px; border-radius: 50%; background: #c3cad8; flex: none; transition: background-color .22s ease, box-shadow .22s ease; }
.st-row__name { font-size: 13px; font-weight: 600; color: #1c2a44; }
.st-row__meta { margin-top: 3px; font-size: 11px; color: #8b95aa; }
.st-row__badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #8b95aa;
  background: rgba(20, 45, 90, .06);
  transition: color .22s ease, background-color .22s ease;
}
.st-row__badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.st-row.is-on .st-row__dot { background: var(--sm-ok); box-shadow: 0 0 0 4px rgba(13, 156, 117, .13); }
.st-row.is-on .st-row__badge { color: var(--sm-ok); background: rgba(13, 156, 117, .12); }
.st-row.is-off .st-row__dot { background: var(--sm-warn); box-shadow: 0 0 0 4px rgba(194, 106, 16, .13); }
.st-row.is-off .st-row__badge { color: var(--sm-warn); background: rgba(194, 106, 16, .12); }

.smodal__foot { display: flex; align-items: center; gap: 8px; }
.smodal__stamp { font-size: 11px; color: #96a0b4; }
.smodal__btn {
  margin-left: auto;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #0d9c75;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .18s ease, transform .18s ease;
}
.smodal__btn:hover { filter: brightness(1.06); }
.smodal__btn:active { transform: scale(.97); }
.smodal__btn--ghost {
  margin-left: 0;
  background: rgba(255, 255, 255, .8);
  border-color: rgba(20, 45, 90, .14);
  color: #3a4864;
}
.smodal__btn--ghost:hover { background: #fff; }

/* ---- 使用规则 / 免责声明 ---- */
.termsBody {
  margin: 14px 0 12px;
  max-height: 44vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  font-size: 12.5px;
  line-height: 1.85;
  color: #45506a;
}
.termsBody p { margin: 0; }
.termsBody b { color: #c8402f; }
html[data-theme="dark"] .termsBody { color: #b9c6dd; }
html[data-theme="dark"] .termsBody b { color: #ff8f9f; }
.termsAgree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: #5a6580;
  cursor: pointer;
}
.termsAgree input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #0d9c75;
  flex: none;
}
html[data-theme="dark"] .termsAgree { color: #93a0b8; }
.smodal__btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- 使用规则条（计算页 / 代理页） ---- */
.rulesBar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(200, 64, 47, .26);
  background: rgba(200, 64, 47, .06);
  color: #a03628;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.rulesBar em { margin-left: auto; font-style: normal; font-weight: 700; white-space: nowrap; }
.rulesBar:hover { background: rgba(200, 64, 47, .1); border-color: rgba(200, 64, 47, .4); }
html[data-theme="dark"] .rulesBar {
  color: #ffb0a8;
  background: rgba(255, 107, 138, .07);
  border-color: rgba(255, 107, 138, .3);
}
html[data-theme="dark"] .rulesBar:hover { background: rgba(255, 107, 138, .12); }

@media (max-width: 420px) {
  .smodal { padding: 14px; }
  .smodal__card { border-radius: 18px; padding: 17px 15px 14px; }
}
