/* =========================================================================
   offline.css —— 下线遮罩 + 后台管理页样式
   -------------------------------------------------------------------------
   色板取自设计稿：底色 #d8bddc / 深紫 #691f74 / 顶部横条 4.1126%
   ========================================================================= */

:root {
  --a2off-bg: #d8bddc;
  --a2off-ink: #691f74;
  --a2off-accent: #a05cbf;
  --a2off-bar: 4.1126%;
}

/* ═══════════════════════════════════════════════════════════════════════
   1. 下线遮罩（盖在播放器页面上）
   ═══════════════════════════════════════════════════════════════════════ */

#a2OfflineOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: var(--a2off-bg);
  /* 顶部深紫横条：和播放器页面的背景层保持同一套视觉语言 */
  background-image: linear-gradient(
    to bottom,
    var(--a2off-ink) 0,
    var(--a2off-ink) var(--a2off-bar),
    transparent var(--a2off-bar),
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: var(--a2off-ink);
  font: 400 16px/1.6 "Inter", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

#a2OfflineOverlay .a2off__card { max-width: 30em; }

#a2OfflineOverlay .a2off__badge {
  display: inline-block;
  margin-bottom: 22px;
  padding: 7px 20px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.14em;
}

#a2OfflineOverlay .a2off__msg {
  margin: 0 0 10px;
  font-size: clamp(20px, 5.2vw, 30px);
  font-weight: 600;
  line-height: 1.45;
}

#a2OfflineOverlay .a2off__eta {
  margin: 0;
  font-size: clamp(13px, 3.4vw, 16px);
  opacity: 0.72;
}

body.is-offline { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════════
   2. 后台管理页
   ═══════════════════════════════════════════════════════════════════════ */

body.a2adm {
  margin: 0;
  min-height: 100vh;
  background: var(--a2off-bg);
  color: var(--a2off-ink);
  font: 400 15px/1.65 "Inter", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.a2adm__wrap {
  max-width: 580px;
  margin: 0 auto;
  padding: 40px 22px 80px;
}

.a2adm__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.16em;
  opacity: 0.7;
}
.a2adm__brand::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.a2adm h1 { margin: 0 0 4px; font-size: 26px; font-weight: 700; }
.a2adm__sub { margin: 0 0 28px; font-size: 14px; opacity: 0.68; }

.a2adm__card {
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 40px -26px rgba(105, 31, 116, 0.5);
}
.a2adm__card h2 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.a2adm__card h2 .step {
  display: inline-block;
  width: 20px; height: 20px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--a2off-ink);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  vertical-align: 1px;
}
.a2adm__card p.hint { margin: 0 0 16px; font-size: 13px; line-height: 1.6; opacity: 0.62; }

/* 状态 */
.a2adm__state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 13px;
  background: #f4eef6;
  font-size: 17px;
  font-weight: 700;
}
.a2adm__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #2e9e5b;
  box-shadow: 0 0 0 4px rgba(46, 158, 91, 0.16);
  flex: none;
}
.is-down .a2adm__state { background: #fdeeec; color: #a33224; }
.is-down .a2adm__dot { background: #c0392b; box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.16); }

/* 按钮 */
.a2adm__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.btn {
  flex: 1 1 150px;
  padding: 13px 18px;
  border: 2px solid var(--a2off-ink);
  border-radius: 12px;
  background: transparent;
  color: var(--a2off-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease, color .18s ease, opacity .18s ease;
}
.btn:hover { background: rgba(105, 31, 116, .08); }
.btn:active { transform: scale(.975); }
.btn:focus-visible { outline: 3px solid var(--a2off-accent); outline-offset: 2px; }
.btn[disabled] { opacity: .38; cursor: not-allowed; }
.btn--primary { background: var(--a2off-ink); color: #fff; }
.btn--primary:hover { background: #571a61; }
.btn--danger { border-color: #c0392b; color: #c0392b; }
.btn--danger:hover { background: rgba(192, 57, 43, .08); }

/* 直接在最终样式上编辑 —— 所见即所得 */
.a2adm__stage {
  padding: 30px 18px;
  border-radius: 14px;
  text-align: center;
  background-color: var(--a2off-bg);
  background-image: linear-gradient(
    to bottom,
    var(--a2off-ink) 0,
    var(--a2off-ink) var(--a2off-bar),
    transparent var(--a2off-bar),
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.a2adm__stage .a2off__badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 16px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.a2adm__edit {
  display: block;
  margin: 0 auto 6px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  cursor: text;
  outline: none;
}
.a2adm__edit--eta { font-size: 13px; font-weight: 400; opacity: .75; }
.a2adm__edit:hover { background: rgba(255, 255, 255, .45); }
.a2adm__edit:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(105, 31, 116, .22);
}

/* 代码块 */
.a2adm__code {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #2a1b30;
  color: #f0e4f4;
  font: 400 12.5px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre;
  overflow: auto;
  max-height: 340px;
}

/* 提示条 */
.a2adm__note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  background: #f6f0f8;
  font-size: 13px;
  line-height: 1.6;
}
.a2adm__note--warn { background: #fdf3e3; }
.a2adm__note code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(105, 31, 116, .1);
  font-size: 12.5px;
}

/* 步骤编号列表 */
.a2adm__steps {
  margin: 0;
  padding-left: 1.35em;
  font-size: 13.5px;
  line-height: 1.85;
}
.a2adm__steps li { margin-bottom: 2px; }

/* Toast */
.a2adm__toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 12px);
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--a2off-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 99;
}
.a2adm__toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 一键页 */
body.a2gadget .a2adm__wrap { max-width: 420px; padding-top: 72px; text-align: center; }
body.a2gadget .a2gadget__icon { font-size: 46px; line-height: 1; margin-bottom: 14px; }
body.a2gadget .btn { font-size: 18px; padding: 20px; flex: 1 1 100%; }
body.a2gadget .a2gadget__result { margin-top: 20px; font-size: 15px; font-weight: 600; min-height: 1.6em; }

/* ═══════════════════════════════════════════════════════════════════════
   3. 一键开关（后台主卡片）
   ═══════════════════════════════════════════════════════════════════════ */

.a2adm__card.is-off {
  background: #fdeeec;
  box-shadow: 0 18px 40px -26px rgba(163, 50, 36, .55);
}
.a2adm__card.is-unknown { background: #f7f3fa; }

.a2adm__switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.a2adm__switch-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.a2adm__switch-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.a2adm__switch-sub {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: .68;
}
.a2adm__card.is-off .a2adm__switch-title { color: #a33224; }

.a2adm__mini {
  flex: none;
  padding: 7px 13px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  opacity: .75;
  transition: opacity .18s ease, background .18s ease;
}
.a2adm__mini:hover { opacity: 1; background: rgba(105, 31, 116, .07); }
.a2adm__mini:disabled { opacity: .35; cursor: not-allowed; }

/* 开关卡片里的两个大按钮，比普通按钮更高更醒目 */
.a2adm__card.is-unknown .a2adm__switch-title { opacity: .7; }

/* 小屏：按钮竖排铺满 */
@media (max-width: 430px) {
  .a2adm__btns .btn { flex: 1 1 100%; }
  .a2adm__switch { flex-direction: column; align-items: stretch; }
  .a2adm__mini { align-self: flex-end; }
}
