/* 深色模式变量覆盖 */
body.dark {
  --bg: #0e1117;
  --bg-soft: #151a23;
  --panel: #1a202c;
  --panel-2: #212836;
  --border: #2a3142;
  --border-strong: #3a4456;
  --text: #e6eaf2;
  --text-dim: #8b95a8;
  --green: #3ddc84;
  --green-d: #2bb96b;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --amber: #f59e0b;
  --red: #ef4444;
  --cyan: #06b6d4;
  --console-bg: #060a10;
  --console-text: #e2e8f0;
}

/* 深色模式下输入框反色 */
body.dark input,
body.dark textarea,
body.dark select {
  background: #0c1016 !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
}
body.dark input::placeholder,
body.dark textarea::placeholder {
  color: #4a5468 !important;
}

/* 主题切换按钮 */
.theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
  cursor: pointer; font-family: inherit;
  transition: all .18s;
}
.theme-btn:hover {
  background: rgba(16,185,129,.1);
  border-color: rgba(16,185,129,.4);
  transform: rotate(15deg);
}

/* ============ 登录 / 注册页 深色 ============ */
body.dark {
  background: radial-gradient(circle at 50% 0%, #0a2018 0%, #0e1117 60%) !important;
  color: #e6eaf2 !important;
}
body.dark .login-card,
body.dark .modal-card {
  background: #1a202c !important;
  border-color: #2a3142 !important;
}
body.dark .login-title,
body.dark .modal-head h3,
body.dark .question-text {
  color: #e6eaf2 !important;
}
body.dark .login-sub,
body.dark .field-label,
body.dark .modal-tip,
body.dark .login-footer,
body.dark .question-tip {
  color: #8b95a8 !important;
}
body.dark .field input {
  background: #0c1016 !important;
  color: #e6eaf2 !important;
  border-color: #2a3142 !important;
}
body.dark .field input::placeholder { color: #5a6479 !important; }
body.dark .field input:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,.15) !important;
}
body.dark .modal-head { border-bottom-color: #2a3142 !important; }
body.dark .modal-foot { background: #151a23 !important; border-top-color: #2a3142 !important; }
body.dark .btn-no { background: #2a3142 !important; color: #e6eaf2 !important; }
body.dark .btn-cancel { background: transparent !important; color: #8b95a8 !important; border-color: #2a3142 !important; }
body.dark .login-footer { border-top-color: #2a3142 !important; }

/* hidden 属性绝对生效，防止被 display 覆盖 */
[hidden] { display: none !important; }
