@mixin light {
  /* color */
  --white: white;
  --black: rgb(48, 48, 48);
  --gray: rgb(250, 250, 250);
  --primary: #009688;
  --secondary: #f3f3f3;
  --inactive: #BDBDBD;
  --primary-hover-color: #4DB6AC;
  --bar-color: rgba(0, 0, 0, 0.1);
  --hover-color: #E0E0E0;
  --secondary-hover-color: #E0E0E0;

  /* shadow */
  --shadow: #BDBDBD 0 0 10px;
  --primary-shadow: #009688 0 0 10px;
  --card-shadow: #BDBDBD 0 0 10px;
  --emoji-shadow: #FFCC80 0 0 30px;

  /* stroke */
  --border-in-light: 1px solid rgb(222, 222, 222);
}

@mixin dark {
  /* color */
  --white: rgb(30, 30, 30);
  --black: rgb(187, 187, 187);
  --gray: rgb(21, 21, 21);
  --primary: #006064;
  --secondary: rgb(27 38 42);
  --primary-hover-color: #0097A7;
  --inactive: #757575;
  --hover-color: #424242;
  --secondary-hover-color: #006064;

  --shadow: #424242 0 0 10px;
  --primary-shadow: #006064 0 0 10px;
  --card-shadow: #424242 0 0 10px;
  --emoji-shadow: #E65100 0 0 15px;

  --bar-color: rgba(255, 255, 255, 0.1);

  --border-in-light: 1px solid rgba(255, 255, 255, 0.192);
}

.light {
  @include light;
}

.dark {
  @include dark;
}

.mask {
  filter: invert(0.8);
}

:root {
  @include light;

  --window-width: 100%;
  --window-height: 100%;
  --sidebar-width: 300px;
  --window-content-width: calc(100% - var(--sidebar-width));
  --message-max-width: 80%;
  --full-height: 100%;
}

@media only screen and (max-width: 600px) {
  :root {
    --window-width: 100vw;
    --window-height: var(--full-height);
    --sidebar-width: 100vw;
    --window-content-width: var(--window-width);
    --message-max-width: 100%;
  }

  .no-mobile {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    @include dark;
  }
}

html {
  height: var(--full-height);
}

body {
  background-color: var(--gray);
  color: var(--black);
  margin: 0;
  padding: 0;
  height: var(--full-height);
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  font-family: "Poppins", "Noto Sans SC", "SF Pro SC", "SF Pro Text", "SF Pro Icons",
    "PingFang SC", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

::-webkit-scrollbar {
  --bar-width: 5px;
  width: var(--bar-width);
  height: var(--bar-width);
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--bar-color);
  border-radius: 20px;
  background-clip: content-box;
  border: 1px solid transparent;
}

select {
  border: var(--border-in-light);
  padding: 8px 10px;
  border-radius: 10px;
  appearance: none;
  cursor: pointer;
  background-color: var(--white);
  color: var(--black);
  text-align: center;
}

input {
  text-align: center;
}

input[type="checkbox"] {
  cursor: pointer;
  background-color: var(--white);
  color: var(--black);
  appearance: none;
  border: var(--border-in-light);
  border-radius: 5px;
  height: 16px;
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

input[type="checkbox"]:checked::after {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  content: " ";
  border-radius: 2px;
}

input[type="range"] {
  appearance: none;
  border: var(--border-in-light);
  border-radius: 10px;
  padding: 5px 15px 5px 10px;
  background-color: var(--white);
  color: var(--black);

  &::before {
    content: attr(value);
    font-size: 12px;
  }
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  height: 8px;
  width: 20px;
  background-color: var(--primary);
  border-radius: 10px;
  cursor: pointer;
  transition: all ease 0.3s;
  margin-left: 5px;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scaleY(1.2);
  width: 24px;
}

input[type="number"],
input[type="password"],
input[type="text"] {
  appearance: none;
  border-radius: 10px;
  border: var(--border-in-light);
  height: 32px;
  box-sizing: border-box;
  background: var(--white);
  color: var(--black);
  padding: 0 10px;
  max-width: 50%;
}

div.math {
  overflow-x: auto;
}

.modal-mask {
  z-index: 9999;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba($color: #000000, $alpha: 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

pre {
  position: relative;

  &:hover .copy-code-button {
    pointer-events: all;
    transform: translateX(0px);
    opacity: 0.5;
  }

  .copy-code-button {
    position: absolute;
    right: 10px;
    cursor: pointer;
    padding: 0px 5px;
    background-color: var(--black);
    color: var(--white);
    border: var(--border-in-light);
    border-radius: 10px;
    transform: translateX(10px);
    pointer-events: none;
    opacity: 0;
    transition: all ease 0.3s;

    &:after {
      content: "copy";
    }

    &:hover {
      opacity: 1;
    }
  }
}