* {
  box-sizing: border-box;
}
:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #f5f7fb;
  background: #0a0d14;
  --mouse-x: 50vw;
  --mouse-y: 50vh;
  --gradient-x: 50%;
  --gradient-y: 50%;
  /* CONFIGURABLE: 0.5 cuts the movement distance exactly in half */
  --scale-ratio: 1.0;
  /* CONFIGURABLE: Sets the dynamic size of the flooded gradient bloom */
  --gradient-radius: 35vw;
  /* CONFIGURABLE: Sets the position of the transparent clipping on the gradient */
  --transparent-start-percent: 95%;
  /* CONFIGURABLE: Sets the blur amount of glass elements */
  --glass-blur: 6px;
  /* CONFIGURABLE: Sets the border radius of glass elements */
  --glass-border: 16px;
}
html, body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(
      circle var(--gradient-radius) at
        calc(var(--mouse-x, 0vw) * var(--scale-ratio))
        calc(var(--mouse-y, 0vh) * var(--scale-ratio)),
      rgba(80, 100, 180, 0.16),
      transparent var(--transparent-start-percent)
    ),
    #0a0d14;
  width: calc(100% - 40px);
}
html {
  padding: 0;
  width: 100%;
  min-height: 50vh;
}
@property --gradient-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 50%;
}
@property --gradient-y {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 50%;
}
body.doAnimate {
  background:
    radial-gradient(
      circle var(--gradient-radius) at var(--gradient-x) var(--gradient-y),
      rgba(80, 100, 180, 0.24),
      transparent var(--transparent-start-percent)
    ),
    #0a0d14;
  animation: bg-animation 14s ease-in-out infinite;
}
@keyframes bg-animation {
  0% {
    --gradient-x: 35%;
    --gradient-y: 35%;
  }
  25% {
    --gradient-x: 64%;
    --gradient-y: 35%;
  }
  50% {
    --gradient-x: 65%;
    --gradient-y: 65%;
  }
  75% {
    --gradient-x: 35%;
    --gradient-y: 65%;
  }
  100% {
    --gradient-x: 35%;
    --gradient-y: 35%;
  }
}
/* Animated Background */
@keyframes move {
    100% {
        transform: translate3d(0, 0, 1px) rotate(360deg);
    }
}
body.doAnimate .background, body.RNGAnimate .background {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: transparent;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
body:not(.doAnimate):not(.RNGAnimate) .background {
  display: none;
}
.background span {
    width: 50vmin;
    height: 50vmin;
    border-radius: 50vmin;
    backface-visibility: hidden;
    position: absolute;
    animation: move;
    animation-duration: 9;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.background span:nth-child(0) {
    color: rgba(80, 100, 180, 0.24);
    top: 55%;
    left: 57%;
    animation-duration: 371s;
    animation-delay: -128s;
    transform-origin: -23vw -11vh;
    box-shadow: 100vmin 0 12.725821346414932vmin currentColor;
}
.background span:nth-child(1) {
  color: rgb(16, 49, 183, 0.24);
    top: 90%;
    left: 31%;
    animation-duration: 171s;
    animation-delay: -22s;
    transform-origin: 10vw -16vh;
    box-shadow: 100vmin 0 12.533803810521071vmin currentColor;
}
.background span:nth-child(2) {
    color: rgb(80, 132, 180, 0.24);
    top: 12%;
    left: 18%;
    animation-duration: 38s;
    animation-delay: -309s;
    transform-origin: 9vw 12vh;
    box-shadow: 100vmin 0 12.784960177052286vmin currentColor;
}
.background span:nth-child(3) {
  color: rgb(46, 56, 96, 0.24);
    top: 10%;
    left: 53%;
    animation-duration: 269s;
    animation-delay: -159s;
    transform-origin: -18vw 24vh;
    box-shadow: 100vmin 0 12.907292512566787vmin currentColor;
}
.background span:nth-child(4) {
  color: rgb(112, 139, 245, 0.24);
    top: 16%;
    left: 79%;
    animation-duration: 400s;
    animation-delay: -192s;
    transform-origin: -12vw -14vh;
    box-shadow: 100vmin 0 13.007974013476193vmin currentColor;
}
.background span:nth-child(5) {
  color: rgb(30, 37, 67, 0.24);
    top: 56%;
    left: 51%;
    animation-duration: 300s;
    animation-delay: -206s;
    transform-origin: 0vw -20vh;
    box-shadow: 100vmin 0 13.02724917997487vmin currentColor;
}



/* Glass */
.glass {
  box-shadow:
    0 4px 6px rgba(0,0,0,0.1),
    inset 0 1px 2px rgba(255,255,255,0.6);
  background: rgba(255,200,200,0.15);
  backdrop-filter:
    blur(var(--glass-blur)) 
    saturate(105%) 
    brightness(90%);
  border-radius: var(--glass-border);
}
.glass-frosted {
  box-shadow:
    2px 3px 4px rgba(0,0,0,0.15),
    inset 1px 1px 2px rgba(200,200,200,0.6),
    inset -1px -1px 2px rgba(200,175,175,0.4),
    inset 0 1px 2px rgba(0,0,0,0.2);
  background: rgba(125,125,125,0.15);
  backdrop-filter:
    blur(var(--glass-blur)) 
    saturate(250%) 
    brightness(95%);
  border-radius: var(--glass-border);
}
.glass-btn-one {
  box-shadow:
    1px 1px 2px rgba(0,0,0,0.15),
    inset 1px 1px 2px rgba(200,200,200,0.15);
  background: rgba(75,75,75,0.25);
  backdrop-filter: 
    blur(var(--glass-blur)) 
    saturate(150%) 
    brightness(95%);
  outline: 1px solid rgb(207, 207, 207,0.2);
}
.glass-modal {
  box-shadow:
    2px 3px 4px rgba(0,0,0,0.15),
    inset 1px 1px 2px rgba(200,200,200,0.6),
    inset -1px -1px 2px rgba(200,175,175,0.4),
    inset 0 1px 2px rgba(0,0,0,0.2);
  background: rgb(100, 100, 100,0.25);
  border-radius: var(--glass-border);
}
/* Not using Yet; class created to save btn styles */
.glass-btn-two {
  box-shadow:
    1px 1px 2px rgba(0,0,0,0.15),
    inset 1px 1px 2px rgba(200,200,200,0.15);
  background: rgba(0,0,0,0.25);
  backdrop-filter: 
    blur(var(--glass-blur)) 
    saturate(150%) 
    brightness(95%);
  border-radius: var(--glass-border);
}



/* Main */
.calculator {
  width: min(620px, 100%);

  padding: 32px;

  border: 1px solid #252b38;
  border-radius: 20px;

  background: #11151e;
  background: rgba(17,21,30,0.5);
  backdrop-filter:
    blur(2px) 
    brightness(1.25) 
    saturate(225%) 
    hue-rotate(30deg);

  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35);
}
.header {
  margin-bottom: 28px;
}
.eyebrow {
  color: #8c9cff;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 0.14em;
}
h1 {
  margin: 7px 0 7px;

  font-size: 34px;
  letter-spacing: -0.04em;
}
p {
  margin: 0;

  color: #8992a3;

  font-size: 14px;
}
.inputs {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 16px;
}
label > span,
.result > span {
  display: block;

  margin-bottom: 8px;

  color: #aab2c1;

  font-size: 13px;
  font-weight: 700;
}
.money-input {
  display: flex;
  align-items: center;

  height: 56px;

  padding: 0 15px;

  border: 1px solid #303747;
  border-radius: 12px;

  background: #0b0f17;

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.money-input:focus-within {
  border-color: #7180ff;

  box-shadow:
    0 0 0 3px rgba(113, 128, 255, 0.12);
}
.money-input > span {
  color: #70798b;

  font-size: 18px;
  font-weight: 700;
}
input {
  width: 100%;

  border: 0;
  outline: 0;

  padding-left: 7px;

  background: transparent;

  color: #f5f7fb;

  font: inherit;

  font-size: 18px;
  font-weight: 650;
}
input::placeholder {
  color: #414958;
}

/* Remove number input arrows */
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.results {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 16px;

  margin-top: 20px;
}
.result {
  padding: 20px;

  border: 1px solid #2b3241;
  border-radius: 14px;

  background: #0b0f17;
}
.result > span {
  margin-bottom: 7px;
}
.result strong {
  font-size: 32px;

  letter-spacing: -0.04em;
}
button {
  width: 100%;

  height: 48px;

  margin-top: 18px;

  border: 1px solid #303747;
  border-radius: 11px;

  background: #191f2b;

  color: #d8dce5;

  font: inherit;

  font-size: 14px;
  font-weight: 750;

  cursor: pointer;

  transition:
    background 0.2s,
    transform 0.1s;
}
button:hover {
  background: #202737;
}
button:active {
  transform: scale(0.99);
}



/* Settings */
.settings-btn {
  --side-spacing: calc(1vh + 2vw);
  --min-btn-size: 25px;
  --btn-size: calc(2.5vw + 2.5vh);
  position: fixed;
  top: var(--side-spacing);
  right: var(--side-spacing);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-radius: 100%;
  overflow: clip;
  width: var(--btn-size);
  height: var(--btn-size);
  min-width: var(--min-btn-size);
  min-height: var(--min-btn-size);
}
.settings-btn:hover .fa-solid {
  animation: gearSpin 1s ease 0s 1;
}
.settings-btn, .settings-btn .fa-solid {
  cursor: pointer;
}
@keyframes gearSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Mobile */
@media (max-width: 560px) {

  .calculator {
    padding: 24px 18px;
  }

  .inputs,
  .results {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 30px;
  }
}