:root {
  --c-active: #5680ff;
  --c-active-inner: #FFFFFF;
  --c-default: #D2D6E9;
  --c-default-dark: #C7CBDF;
  --c-black: #1B1B22;
}

.btn {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: 1px solid #8e37ff;
  position: relative;
  background: var(--c-active-inner);
  color: rgb(59, 59, 59);
  outline: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 21px;
  font-weight: 600;
  display: block;
  width: 132px;
  text-align: center;
  border-radius: 7px;
  margin: 0 auto;
  padding: 12px 0;
}
.btn span {
  position: relative;
  z-index: 1;
}
.btn svg {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  fill: var(--c-active);
}
.btn svg circle {
  transition: transform var(--duration, 0.5s) ease-out;
}
.btn svg circle.top-left {
  transform: translate(var(--spacing, -16px), var(--spacing, -40px));
}
.btn svg circle.middle-bottom {
  transform: translate(var(--spacing, 8px), var(--spacing, 40px));
}
.btn svg circle.top-right {
  transform: translate(var(--spacing, 40px), var(--spacing, -40px));
}
.btn svg circle.right-bottom {
  transform: translate(var(--spacing, 4px), var(--spacing, 40px));
}
.btn svg circle.left-bottom {
  transform: translate(var(--spacing, -40px), var(--spacing, 40px));
}
.btn:hover {
  --spacing: 0;
  --duration: .5s;
  color: #FFFFFF;
  border: 1px solid #FFFFFF;
}
*:before, *:after {
  box-sizing: inherit;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', sans-serif;
    user-select: none;
}
#game {
    position: absolute;
    text-align: center;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
}
#menu {
    position: absolute;
    margin-top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}
#level {
    z-index: 1;
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    overflow-x: hidden;
    display: none;
}
#menu-heading {
    border: 1px solid #fff;
    border-radius: 20px;
    position: relative;
    text-align: center;
    background-color: rgba(0, 255, 255, 0.5);
    font-family: 'Water Splash', sans-serif;
    font-size: 30px;
    color: #535353;
    margin: 12px 10%;
    padding: 8px;
}
#particles-js {
    background: rgb(115, 187, 255);
    height: 100vh;
}
.test-tube {
    position: absolute;
    height: 130px;
    width: 40px;
    border: 2px solid rgb(150,150,150);
    border-radius: 2px 2px 20px 20px;
    background-position: 0 10px;
    overflow: hidden;
    transition: 1s linear;
    transform: rotate(0deg);
}
@keyframes glassAnim {
    0%,100% {transform: scale(1);}
    50% {transform: scale(1.5);}
}

.colors {
    position: absolute;
    left: 0;
    height: 30px;
    width: 40px;
}

#won {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100vw;
    text-align: center;
    font-size: 60px;
    font-weight: 900;
}

#white-bg {
    position: absolute;
    left: 0;
    top: 10px;
    width: 40px;
    height: 10px;
    background-color: rgb(115, 187, 255);
    z-index: 1000;
    transition: 1s;
}

#colorful-bg {
    position: absolute;
    width: 100%;
    height: 0;
    z-index: 1000;
    transition: 1s;
}

#restart {
    left: 0;
}

#home {
    right: 0;
}

.game-buttons {
    position: fixed;
    top: calc(100vh - 50px);
    height: 50px;
    width: calc(75px + 75 * (100vw - 280px) / 920);
    font-size: 25px;
    font-weight: 600;
    text-align: center;
    line-height: 30px;
    background-color: lightgreen;
    border-radius: 10px 10px 0 0;
}

#lvl-heading {
    border: 1px solid #fff;
    position: absolute;
    top: 0;
    left: 0;
    height: 50px;
    width: 100vw;
    background-color: rgba(0, 255, 255, 0.5);
    border-radius: 0 0 25px 25px;
    font-size: calc(20px + 20 * ((100vw - 280px) / 920));
    font-weight: 800;
    line-height: 50px;
    text-align: center;
    letter-spacing: 5px;
}

#moves {
    border: 1px solid #5680ff;
    background: rgb(0, 255, 255);
    position: fixed;
    top: calc(100vh - 70px);
    width: calc(75px + 75 * (100vw - 280px) / 920);
    left: 0;
    text-align: center;
    border-radius: 10px;
    font-size: 20px;
}

#rules-btn {
    position: fixed;
    left: calc(100vw - 200px);
    top: calc(100vh - 50px);
    height: 50px;
    width: 200px;
    background-color: lightgreen;
    border-radius: 20px 0 0 20px;
    text-align: center;
    font-size: 25px;
    font-weight: 500;
}

#rules-page {
    display: none;
    z-index: 1000;
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    transition: 0.5s linear;
}

#rules {
    border: 1px solid rgb(255, 255, 255);
    position: absolute;
    top: 100px;
    left: 50px;
    height: calc(100vh - 200px);
    width: calc(100vw - 100px);
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

#rules-heading {
    position: absolute;
    top: 10px;
    left: 0;
    height: 30px;
    width: 100%;
    font-size: 30px;
    font-weight: 800;
    text-align: center;
}

#rules-text {
    position: absolute;
    top: 70px;
    left: 5%;
    width: 90%;
    font-size: 20px;
    height: calc(100vh - 200px - 150px);
    overflow-x: hidden;
}

#back {
    position: absolute;
    top: calc(100% - 120px + 65px + 10px);
    height: 45px;
    width: 100px;
    left: calc(100% - 100px);
    background-color: lightgreen;
    font-size: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 0 0 10px 0;
}

#alert-button:hover {
    background-color: rgb(150,255,150);
}
.credit {
    text-align: center;
    font-size: calc(8px + 10 * ((100vw - 280px) / 920));
}
#cr2 {
  margin-top: 50px;
  display: none;
}
@media only screen and (min-width: 280px) {
    .game-buttons {
      font-size: calc(12px + 13 * ((100vw - 280px) / 920));
    }
    #moves {
      font-size: calc(10px + 8 * ((100vw - 280px) / 920));
    }
}
@media only screen and (max-width: 440px) {
    #rules-btn, .game-buttons {
      top: calc(100vh - 70px);      
    }
    #moves {
      top: calc(100vh - 90px); 
    }
}
@media only screen and (min-width: 780px) {
    #moves {
      top: calc(100vh - 80px);
    }
}
@media only screen and (max-width: 440px) {
  #rules-btn, .game-buttons {
      top: calc(100vh - 90px);      
    }
    #moves {
      top: calc(100vh - 105px); 
    }
  body {
    height: 120vh;
  }
  #particles-js {
    height: 120vh;
  }
  #game {
    height: 120vh;
  }
  #menu {
    height: 120vh;
  }
  #level {
    height: 120vh
  }
  #rules-page {
    height: 120vh
  }
}
