@font-face {
  font-family: Comfortaa;
  src: url(./Comfortaa.ttf);
}

/* CSS Vars */
:root {
  --c0: #512BC7;
  --c1: #2900C0;
  --c2: #40F99B;
  --c3: #F5FBEF;
  --c4: #E85D75;

  --icon-red: hsl(0,75%,64%);
  --icon-red-orange: hsl(10,75%,64%);
  --icon-orange: hsl(30,75%,64%);
  --icon-gold: hsl(50,75%,64%);
  --icon-green: hsl(80,75%,64%);
  --icon-blue: hsl(190,75%,64%);
  --icon-pink: hsl(310,75%,64%);

  --shadow-color: #0004;
  --box-shadow: 2px 2px 7px var(--shadow-color);

  --bg-gradient: linear-gradient(165deg, var(--c0), var(--c1));
  --tri-gradient: linear-gradient(-65deg, var(--c2), var(--c3), var(--c4));
  --tri-gradient-light: linear-gradient(-65deg, var(--c2) -150%, var(--c3) 50%, var(--c4) 150%);
  --transparent-gradient: linear-gradient(165deg, #bbba -50%, var(--c0) 110%);
}

/* HTML & Body */
html {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #2900C0;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--c3);
  overflow-x: hidden;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Comfortaa, sans-serif;
  line-height: 1.3;
}

body {
  position: absolute;
  inset: 0;
  overflow: auto;
  overflow-x: hidden;
}

/* Headers */
h1 {
  font-size: 54px;
}
h3 {
  background: var(--transparent-gradient);
  color: var(--c3);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #fffa;
  margin-block-start: 1rem;
  margin-block-end: 1rem;
}

/* Content Box */
.content-box {
  padding: 1rem;
  border-radius: 1rem;
  background-color: var(--c0);
}

/* Anchor Tag */
a,
a:visited {
  color: inherit;
  text-decoration-color: #fff8;
  text-underline-offset: 2px;
}

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

.btn, button, input[type=text], input[type=number] {
  text-align: center;
  display: inline-block;
  background-color: var(--c0);
  color: inherit;
  font-family: inherit;
  border-radius: 0.5rem;
  line-height: 1.5;
  padding: 7px 10px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #0004;
  outline: none;
}

input::placeholder {
  color: #999;
}

input[type=text], input[type=number] {
  cursor: text;
}

.btn:hover, button:hover,
.btn:focus, button:focus,
.btn.outline, button.outline {
  border: 1px solid #fff4;
}

/* Game UI */
.game-ui, .game-label {
  --border-radius: 0.5rem;
  outline: none;
  margin: 0;
  box-sizing: border-box;
  height: 40px;
  font-size: 13px;
  padding: 7px 10px;
  background-color: var(--c0);
  background: var(--bg-gradient);
  border-radius: var(--border-radius);
}
.game-label {
  border: 1px solid #fff4;
}
.game-ui.disabled,
.game-ui:disabled,
.game-label.disabled {
  filter: grayscale(0.8);
}
.game-ui, .pulse {
  --border-radius: 0.5rem;
  --pulse-color: var(--c3);
  box-sizing: border-box;
  position: relative;
  border-radius: var(--border-radius);
  border: 1px solid #0004;
}
.pulse:hover, .pulse:focus,
.game-ui:hover, .game-ui:focus {
  border: 1px solid var(--c3);
  outline: none;
  animation-name: pulse;
  animation-duration: 1.2s;
  animation-play-state: running;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

/* Adds uniform margins and centers on parent */
.margins {
  margin: 0 auto;
  padding: 1rem;
  max-width: 720px;
}

/* Centers all content */
.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Text Gradient */
.text-gradient {
  width: fit-content;
  background: var(--tri-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Inline Spinner */
.icofont-custom-spinner {
  display: inline-flex;
  font-size: 17px;
  width: 17px;
  height: 17px;
  overflow: hidden;
}
.icofont-custom-spinner::before {
  content: "\eff5";
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  animation-name: spin;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-play-state: running;
  animation-timing-function: linear;
}

/* Global icon coloring */
.icofont-undo.colored {
  color: var(--icon-red);
}
.icofont-save.colored {
  color: var(--icon-green);
}
.icofont-coins.colored {
  color: var(--icon-gold);
}
.icofont-star.colored {
  color: var(--c2);
}
.icofont-paint.colored {
  color: var(--icon-orange);
}
.icofont-exit.colored {
  color: var(--icon-red-orange);
}
.icofont-game.colored {
  color: var(--icon-pink);
}
.icofont-ui-home.colored {
  color: var(--icon-blue);
}
.icofont-picture.colored {
  color: var(--icon-blue);
}
.icofont-dna-alt-1.colored {
  color: var(--icon-pink);
}
.icofont-ui-check.colored {
  color: var(--icon-green);
}
.icofont-tag.colored {
  color: var(--c3);
}
.icofont-money.colored {
  color: var(--icon-gold);
}

/* w3m-modal */
w3m-modal {
  --w3m-color-fg-accent: #512BC7;
  --w3m-color-overlay: #2900C044;
}

/* No Text Select Class */
.no-select, *[class^=text-gradient] {
  user-select: none;
  -moz-user-select: none;
}

/* Custom Scrollbar */
body:not(.classic-scroll) :not(.classic-scroll)::-webkit-scrollbar,
body:not(.classic-scroll)::-webkit-scrollbar {
  width: 12px;
  height: 12px;
  box-sizing: content-box;
  background-color: var(--c0);
  border: 1px solid #0002;
  border-radius: 6px;
}
body:not(.classic-scroll) :not(.classic-scroll)::-webkit-scrollbar-corner,
body:not(.classic-scroll)::-webkit-scrollbar-corner {
  background-color: var(--c0);
}

body:not(.classic-scroll) :not(.classic-scroll)::-webkit-scrollbar-thumb,
body:not(.classic-scroll)::-webkit-scrollbar-thumb {
  background-color: #fff5;
  border: 2px solid #0000;
  border-radius: 6px;
  background-clip: padding-box;
}

body:not(.classic-scroll) :not(.classic-scroll)::-webkit-scrollbar-thumb:hover,
body:not(.classic-scroll)::-webkit-scrollbar-thumb:hover {
  background-color: #fffa;
}

body:not(.classic-scroll) :not(.classic-scroll)::-webkit-scrollbar-track,
body:not(.classic-scroll)::-webkit-scrollbar-track {
  border-radius: 3px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--pulse-color);
  }
  50% {
    box-shadow: 0 0 0 4px var(--pulse-color);
  }
  100% {
    box-shadow: 0 0 0 0 var(--pulse-color);
  }
}

@keyframes spin {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}