:root {
  --background: #191919;
  --element: #2b2b2b;
  --border: #ffffff1a;
  --accent: #ff6200;
  --text: #e6e6e6;
  --text-secondary: #a6a6a6;
  --text-muted: #666666;
}

@font-face {
  font-family: ChivoMono;
  src: url("/fonts/ChivoMono.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: Outfit;
  src: url("/fonts/Outfit.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--background);
  color: var(--text);
  font-size: 14px;
  font-family: Outfit;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-color: var(--text-secondary) transparent;

  &::-webkit-scrollbar {
    width: 4px;
  }

  &::-webkit-scrollbar-track {
    background: var(--background);
  }

  &::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
  }
}

button,
input {
  font-family: Outfit;
  font-size: 14px;
}

a {
  text-decoration: none;
  color: var(--text);
}

[hidden] {
  display: none !important;
}

@keyframes load-progress {
  from {
    width: 0;
  }

  to {
    width: 90%;
  }
}

@keyframes load-done {
  from {
    width: 90%;
    opacity: 1;
  }

  60% {
    width: 100%;
    opacity: 1;
  }

  to {
    width: 100%;
    opacity: 0;
  }
}

.chart-container::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
}

html[data-loading="start"] .chart-container::after {
  opacity: 1;
  animation: load-progress 8s cubic-bezier(0.1, 0.6, 0.2, 1) forwards;
}

html[data-loading="done"] .chart-container::after {
  animation: load-done 0.45s ease-out forwards;
}
