//@import '/node_modules/element-plus/dist/index.css';
@import "/node_modules/hover.css";
@import "variable.scss";
@import "anim";
@import 'element-plus/theme-chalk/dark/css-vars';


:root {
  --color-background: #E6E8EB;
  --color-main-bg: #E6E8EB;
  --color-second-bg: rgb(240, 242, 244);

  --color-item-bg: rgb(228, 230, 232);
  --color-item-hover: white;
  //--color-item-active: rgb(75, 110, 175);
  --color-item-active: rgb(253, 246, 236);
  --color-item-border: rgb(226, 226, 226);

  --color-header-bg: white;
  --color-tooltip-bg: white;
  --color-tooltip-shadow: #bbbbbb;
  --color-font-1: rgb(75, 85, 99);
  --color-font-2: rgb(46, 46, 46);
  --color-font-3: black;
  --color-font-active-1: white;
  --color-font-active-2: whitesmoke;
  --color-main-active: rgb(12, 140, 233);
  --toolbar-width: 700rem;
  //--toolbar-width: 50vw;

  --color-gray: gray;

  --color-scrollbar: rgb(147, 173, 227);
}

html.dark {
  //--color-main-bg: rgba(0, 5, 24, 1);
  //--color-main-bg: rgba(17,24,39, 1);
  --color-background: transparent;
  --color-main-bg: rgba(14, 18, 23, 1);
  //--color-main-bg: rgba(30,31,34, 1);
  --color-second-bg: rgb(43,45,48);
  --color-second-bg: rgb(30,31,34);

  --color-item-bg: rgb(43,45,48);
  --color-item-hover: rgb(67,69,74);
  --color-item-active: rgb(84,84,84);
  --color-item-border: rgb(41, 41, 41);

  --color-header-bg: rgb(51, 51, 51);
  --color-tooltip-bg: #252525;
  --color-tooltip-shadow: #3b3b3b;
  --color-font-1: rgba(249, 250, 251, 0.8);
  --color-font-2: rgba(255, 255, 255, 0.8);
  --color-font-3: white;

  --color-gray: #bebebe;

  --color-scrollbar:  rgb(59, 87, 138);
  --color-scrollbar:  rgb(77,78,81);
  --color-scrollbar:  rgb(92,93,94);
}

$anim-time: 0.3s;
.anim {
  transition: background $anim-time, color $anim-time;
}

html, body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  color: $font-color;
  font-family: $font-family;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  width: 100%;
  height: 100%;
}

a {
  color: $main;
  text-decoration: none;
}

.base-textarea {
  flex: 1;
  font-family: $font-family;
  font-size: 18rem;
  outline: none;
  border: 1px solid transparent;
  border-radius: 6rem;
  padding: 8rem 10rem;
  transition: all .3s;
  min-height: 20rem;
  width: 100%;
  box-sizing: border-box;

  &:focus {
    border: 1px solid var(--color-main-active);
  }

  &[readonly] {
    cursor: not-allowed;
    opacity: .7;
  }
}

::-webkit-scrollbar {
  width: 8rem;
  height: 10rem;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 2rem;
}

::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar);
  border-radius: 10rem;
}


/* 火狐美化滚动条 */
* {
  scrollbar-color: var(--color-scrollbar) #f3f4f9;
  /* 滑块颜色  滚动条背景颜色 */
  scrollbar-width: thin;
  /* 滚动条宽度有三种：thin、auto、none */
}

footer {
  box-sizing: content-box;
  height: $footer-height;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: $space;
}

.pointer {
  cursor: pointer;
}

.flex {
  display: flex;
}

.gap10 {
  gap: 10rem;
}

.justify-content-between {
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-page-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: $space;
  box-sizing: border-box;

  header {
    min-height: 50rem;
    padding: 10rem $space;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16rem;
    color: var(--color-font-3);

    .left {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 10rem;
    }

    .title {
      max-width: 70%;
    }

    .right {
      word-break: keep-all;
    }
  }

  .scroll {
    padding: 0 $space;
    flex: 1;
    overflow: auto;
  }
}

.common-list-item {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-item-bg);
  color: var(--color-font-1);
  font-size: 18rem;
  border-radius: 8rem;
  display: flex;
  justify-content: space-between;
  transition: all .3s;
  padding: 10rem;
  gap: 20rem;
  border: 1px solid var(--color-item-border);

  .volume {
    opacity: 0;
  }

  &:hover {
    background: var(--color-item-hover);

    .volume {
      opacity: 1;
    }
  }

  &.active {
    background: var(--color-item-active);

    .volume {
      color: #E6A23C;
    }

    .phonetic, .item-sub-title {
      color: var(--color-gray) !important;
    }
  }

  .item-title {
    display: flex;
    align-items: center;
    gap: 8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
    color: var(--color-font-1);

    .word {
      font-size: 20rem;
      display: flex;
    }

    .phonetic {
      font-size: 14rem;
      color: gray;
    }
  }
}

.item-sub-title {
  font-size: 16rem;
  color: gray;
}

.text-shadow {
  color: transparent !important;
  text-shadow: #b0b0b0 0 0 8rem;
  user-select: none;
}