/* ===== 全站 UI 细节统一（纯增强，不改变各页面布局与业务逻辑） ===== */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* 文本选中色：琥珀金，与主题一致 */
::selection {
  background: rgba(245, 158, 11, 0.35);
  color: #fff;
}

/* 全站统一滚动条（深色系） */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}
*::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #374151 rgba(255, 255, 255, 0.04);
}

/* 所有可点元素统一手型 */
button, [role="button"], label[for], summary {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 按钮/卡片按压反馈 */
button:active {
  transform: scale(0.98);
}

/* 键盘焦点可见性（鼠标点击不显示） */
:focus-visible {
  outline: 2px solid rgba(245, 158, 11, 0.7);
  outline-offset: 2px;
}

/* 输入框悬浮微亮（各页面已有聚焦态，这里补悬浮态） */
input:hover:not([type="checkbox"]):not([type="radio"]),
textarea:hover,
select:hover {
  border-color: rgba(156, 163, 175, 0.6);
}

/* 裸输入框兜底：Tailwind preflight 让输入框继承页面白色文字，
   但背景仍是浏览器默认白色，白字白底看不见。
   只作用于没有显式样式的输入框；已有 Tailwind 类的输入框
   因 important:true 会覆盖这里的值，不受影响。 */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="email"],
textarea {
  background-color: rgba(31, 41, 55, 0.85);
  border: 1px solid rgba(107, 114, 128, 0.5);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  color: #F9FAFB;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="search"]::placeholder,
input[type="url"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: #9CA3AF;
}

/* 表单控件与过渡元素统一缓动 */
input, textarea, select, button, .card {
  transition-property: background-color, border-color, box-shadow, color, transform;
  transition-duration: 0.18s;
  transition-timing-function: ease;
}

/* 图片默认抗锯齿缩放 */
img {
  image-rendering: auto;
}
