/* 全局平滑滚动与字体设置 */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  overflow-x: hidden; /* 防止水平溢出 */
}

/* === 自定义滚动条样式 - 更细腻、现代 === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  border: 2px solid transparent; /* 增加边距感 */
  background-clip: content-box;
}
.dark ::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.5);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.8);
  background-clip: content-box;
}

/* 隐藏移动端滚动条但保留滚动功能 (Custom Utility Class) */
.hide-scrollbar-mobile::-webkit-scrollbar {
  display: none; 
}
.hide-scrollbar-mobile {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Glassmorphism Utilities */
.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.dark .glass {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 针对 iOS 底部安全区域的优化 */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}