*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow-y: auto;
  scrollbar-width: none;
  scrollbar-color: rgba(var(--scrollbar-rgb), 0.7) transparent;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei UI",
    "Noto Sans SC", sans-serif;
  background: var(--page-bg);
  caret-color: transparent;
}

body,
.search-input {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--scrollbar-rgb), 0.7) transparent;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body::-webkit-scrollbar,
.search-input::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body::-webkit-scrollbar-track,
.search-input::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb,
.search-input::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(var(--scrollbar-rgb), 0.78), rgba(var(--scrollbar-strong-rgb), 0.7));
  border: 2px solid rgba(var(--glass-rgb), 0.04);
  border-radius: 999px;
  background-clip: padding-box;
}

body::-webkit-scrollbar-thumb:hover,
.search-input::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(var(--scrollbar-rgb), 0.9), rgba(var(--scrollbar-strong-rgb), 0.82));
}

body::-webkit-scrollbar-corner,
.search-input::-webkit-scrollbar-corner {
  background: transparent;
}

body::before {
  display: none;
}

body::after {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

#wallpaper-container {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.01);
  filter: var(--wallpaper-filter);
}

#wallpaper-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-scrollbar {
  position: fixed;
  top: 10px;
  right: 2px;
  bottom: 10px;
  z-index: 12;
  width: 8px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.page-scrollbar.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.page-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 1px;
  width: 6px;
  min-height: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--scrollbar-rgb), 0.82), rgba(var(--scrollbar-strong-rgb), 0.74));
  box-shadow: 0 0 0 1px rgba(var(--glass-rgb), 0.04);
  cursor: pointer;
  transition: background 0.18s ease, opacity 0.18s ease;
}

.page-scrollbar:hover .page-scrollbar-thumb,
.page-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(var(--scrollbar-rgb), 0.96), rgba(var(--scrollbar-strong-rgb), 0.86));
}
