/* 易启·弹幕 EasyBarrage —— 设计基线：8px 栅格 / 圆角 8-6px / 单一强调色 */
:root {
  --accent: #3B82F6;
  --accent-press: #2563EB;

  --dark-bg: #0F1419;
  --dark-panel: #151B22;
  --dark-panel-2: #1B232C;
  --dark-line: #232E3A;
  --dark-text: #F5F7FA;
  --dark-dim: rgba(245, 247, 250, 0.55);
  --dark-dim-2: rgba(245, 247, 250, 0.32);

  --light-bg: #FFFFFF;
  --light-text: #1A1A1A;
  --light-dim: #6B7280;
  --light-line: #ECEEF2;

  --r-card: 8px;
  --r-btn: 6px;
  --sp: 8px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Source Han Sans SC",
    "Noto Sans SC", "PingFang SC", -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font-family: inherit; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  background: var(--dark-panel-2);
  color: var(--dark-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
  user-select: none;
}
.btn:hover { background: #223040; }
.btn:active { transform: translateY(0.5px); }
.btn[disabled] { opacity: .38; cursor: not-allowed; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-press); }
.btn.ghost { background: transparent; border-color: var(--dark-line); color: var(--dark-dim); }
.btn.ghost:hover { background: rgba(255, 255, 255, .04); color: var(--dark-text); }
.btn.on { background: rgba(59, 130, 246, .16); border-color: rgba(59, 130, 246, .5); color: #93B8FA; }
.btn svg { width: 15px; height: 15px; flex: none; }

/* ---------- 弹层 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 12, .62);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.mask.open { display: flex; }

.modal {
  width: min(560px, calc(100vw - 48px));
  max-height: min(76vh, 720px);
  background: var(--dark-panel);
  border: 1px solid var(--dark-line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--dark-line);
}
.modal-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
}
.modal-body { padding: 16px 20px; overflow: auto; }
.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--dark-line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.x-btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0; border-radius: 6px;
  background: transparent;
  color: var(--dark-dim);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.x-btn:hover { background: rgba(255,255,255,.06); color: var(--dark-text); }

/* ---------- 轻提示 ---------- */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  z-index: 90;
  pointer-events: none;
}
.toast {
  padding: 9px 16px;
  border-radius: 6px;
  background: rgba(20, 26, 33, .96);
  border: 1px solid var(--dark-line);
  color: var(--dark-text);
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
  animation: toast-in .18s ease-out;
  max-width: 80vw;
}
.toast.warn { border-color: rgba(245, 158, 11, .5); color: #FCD34D; }
.toast.err { border-color: rgba(239, 68, 68, .5); color: #FCA5A5; }
.toast.light { background: #1A1A1A; border-color: #1A1A1A; color: #fff; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.24); }
::-webkit-scrollbar-track { background: transparent; }
