@use 'element-plus/theme-chalk/src/dark/css-vars.scss' as *;
@use 'layout/layout.scss' as *;
@use 'common.scss' as *;

@font-face {
  font-family: 'SourceHanSansCN-Regular';
  src: url('~@/assets/font/SourceHanSansCN-Regular.otf') format('opentype');
}

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

html {
  height: 100vh;
  width: 100vw;
}

#app,
body {
  margin: 0;
  height: 100%;
  width: 100%;
  border-radius: var(--elp-border-radius-16);
}

body {
  font-family: SourceHanSansCN-Regular, sans-serif;
  color: var(--elp-text-color-primary);
  font-size: var(--elp-font-size-base);
  padding: 2px;
  overflow: hidden;
}

#app {
  border-radius: var(--elp-border-radius-large);
  box-shadow: 0 -5px 16px 5px rgba(0, 0, 0, .04), 0px 8px 20px rgba(0, 0, 0, .08);;
  overflow: hidden;
}

*::-webkit-scrollbar-thumb {
  border-radius: 6px;
}

*:hover::-webkit-scrollbar-thumb {
  background: var(--elp-color-info-light-5);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--elp-color-info-light-3);
}

::-webkit-scrollbar-track {
  opacity: 0;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
  animation-duration: 0.25s;
}

/* 进入dark模式和退出dark模式时，两个图像的位置顺序正好相反 */
.dark::view-transition-old(root) {
  z-index: 999;
}
.dark::view-transition-new(root) {
  z-index: 1;
}

::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 999;
}
