:root {
  --c1: #05fcd3;
  --c2: #00adff;
  --c3: #7459f9;
  --c4: #f92f2f;
  --c5: #b50f0f;
  --surface: #fffeff;
  --on-surface: #636571;
  --outline: #000001;
  --background: #112;
  --v: 1;
}

.thermostat {
  height: 24vmin;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1vmin;
  position: relative;
  place-items: center;
}

.liquid {
  position: absolute;
  inset: 0;
  border-radius: 10vmin;
  overflow: hidden;
  isolation: isolate;
}
.liquid .bg {
  position: absolute;
  inset: 0;
}
.liquid .bg:before, .liquid .bg:after {
  content: "";
  position: absolute;
  inset: 0;
  --gp: calc(100% - var(--progress));
  background: linear-gradient(to bottom, var(--c5) calc(5% - var(--gp)), var(--c4) calc(25% - var(--gp)), var(--c3) calc(50% - var(--gp)), var(--c2) calc(75% - var(--gp)), var(--c1) calc(100% - var(--gp)));
  transform: translateY(calc(100% - var(--progress)));
  -webkit-animation: wave 1s linear infinite;
          animation: wave 1s linear infinite;
  transition: all 0.3s linear;
  filter: saturate(0.65);
}
.liquid .bg:after {
  transform: scaleX(-1) translateY(calc(100% - var(--progress)));
  opacity: 0;
  --o: 0.6;
  -webkit-animation-delay: 0.55s;
          animation-delay: 0.55s;
}

@-webkit-keyframes wave {
  from {
    opacity: var(--o, 1);
    -webkit-clip-path: polygon(100% 100%, 0% 100%, 0% 27.83%, 7.14% 28.61%, 14.29% 28.98%, 21.43% 28.9%, 28.57% 28.4%, 35.71% 27.49%, 42.86% 26.22%, 50% 24.65%, 57.14% 22.86%, 64.29% 20.95%, 71.43% 19%, 78.57% 17.12%, 85.71% 15.4%, 92.86% 13.92%, 100% 12.77%);
            clip-path: polygon(100% 100%, 0% 100%, 0% 27.83%, 7.14% 28.61%, 14.29% 28.98%, 21.43% 28.9%, 28.57% 28.4%, 35.71% 27.49%, 42.86% 26.22%, 50% 24.65%, 57.14% 22.86%, 64.29% 20.95%, 71.43% 19%, 78.57% 17.12%, 85.71% 15.4%, 92.86% 13.92%, 100% 12.77%);
  }
  25% {
    -webkit-clip-path: polygon(100% 100%, 0% 100%, 0% 17.77%, 7.14% 16.02%, 14.29% 14%, 21.43% 11.82%, 28.57% 9.58%, 35.71% 7.4%, 42.86% 5.38%, 50% 3.63%, 57.14% 2.23%, 64.29% 1.26%, 71.43% 0.76%, 78.57% 0.76%, 85.71% 1.26%, 92.86% 2.23%, 100% 3.63%);
            clip-path: polygon(100% 100%, 0% 100%, 0% 17.77%, 7.14% 16.02%, 14.29% 14%, 21.43% 11.82%, 28.57% 9.58%, 35.71% 7.4%, 42.86% 5.38%, 50% 3.63%, 57.14% 2.23%, 64.29% 1.26%, 71.43% 0.76%, 78.57% 0.76%, 85.71% 1.26%, 92.86% 2.23%, 100% 3.63%);
  }
  50% {
    -webkit-clip-path: polygon(100% 100%, 0% 100%, 0% 2.21%, 7.14% 1.34%, 14.29% 0.93%, 21.43% 1.01%, 28.57% 1.58%, 35.71% 2.6%, 42.86% 4.03%, 50% 5.8%, 57.14% 7.81%, 64.29% 9.97%, 71.43% 12.16%, 78.57% 14.28%, 85.71% 16.22%, 92.86% 17.88%, 100% 19.19%);
            clip-path: polygon(100% 100%, 0% 100%, 0% 2.21%, 7.14% 1.34%, 14.29% 0.93%, 21.43% 1.01%, 28.57% 1.58%, 35.71% 2.6%, 42.86% 4.03%, 50% 5.8%, 57.14% 7.81%, 64.29% 9.97%, 71.43% 12.16%, 78.57% 14.28%, 85.71% 16.22%, 92.86% 17.88%, 100% 19.19%);
  }
  to {
    opacity: var(--o, 1);
    -webkit-clip-path: polygon(100% 100%, 0% 100%, 0% 31.33%, 7.14% 32.11%, 14.29% 32.48%, 21.43% 32.4%, 28.57% 31.9%, 35.71% 30.99%, 42.86% 29.72%, 50% 28.15%, 57.14% 26.36%, 64.29% 24.45%, 71.43% 22.5%, 78.57% 20.62%, 85.71% 18.9%, 92.86% 17.42%, 100% 16.27%);
            clip-path: polygon(100% 100%, 0% 100%, 0% 31.33%, 7.14% 32.11%, 14.29% 32.48%, 21.43% 32.4%, 28.57% 31.9%, 35.71% 30.99%, 42.86% 29.72%, 50% 28.15%, 57.14% 26.36%, 64.29% 24.45%, 71.43% 22.5%, 78.57% 20.62%, 85.71% 18.9%, 92.86% 17.42%, 100% 16.27%);
  }
}

@keyframes wave {
  from {
    opacity: var(--o, 1);
    -webkit-clip-path: polygon(100% 100%, 0% 100%, 0% 27.83%, 7.14% 28.61%, 14.29% 28.98%, 21.43% 28.9%, 28.57% 28.4%, 35.71% 27.49%, 42.86% 26.22%, 50% 24.65%, 57.14% 22.86%, 64.29% 20.95%, 71.43% 19%, 78.57% 17.12%, 85.71% 15.4%, 92.86% 13.92%, 100% 12.77%);
            clip-path: polygon(100% 100%, 0% 100%, 0% 27.83%, 7.14% 28.61%, 14.29% 28.98%, 21.43% 28.9%, 28.57% 28.4%, 35.71% 27.49%, 42.86% 26.22%, 50% 24.65%, 57.14% 22.86%, 64.29% 20.95%, 71.43% 19%, 78.57% 17.12%, 85.71% 15.4%, 92.86% 13.92%, 100% 12.77%);
  }
  25% {
    -webkit-clip-path: polygon(100% 100%, 0% 100%, 0% 17.77%, 7.14% 16.02%, 14.29% 14%, 21.43% 11.82%, 28.57% 9.58%, 35.71% 7.4%, 42.86% 5.38%, 50% 3.63%, 57.14% 2.23%, 64.29% 1.26%, 71.43% 0.76%, 78.57% 0.76%, 85.71% 1.26%, 92.86% 2.23%, 100% 3.63%);
            clip-path: polygon(100% 100%, 0% 100%, 0% 17.77%, 7.14% 16.02%, 14.29% 14%, 21.43% 11.82%, 28.57% 9.58%, 35.71% 7.4%, 42.86% 5.38%, 50% 3.63%, 57.14% 2.23%, 64.29% 1.26%, 71.43% 0.76%, 78.57% 0.76%, 85.71% 1.26%, 92.86% 2.23%, 100% 3.63%);
  }
  50% {
    -webkit-clip-path: polygon(100% 100%, 0% 100%, 0% 2.21%, 7.14% 1.34%, 14.29% 0.93%, 21.43% 1.01%, 28.57% 1.58%, 35.71% 2.6%, 42.86% 4.03%, 50% 5.8%, 57.14% 7.81%, 64.29% 9.97%, 71.43% 12.16%, 78.57% 14.28%, 85.71% 16.22%, 92.86% 17.88%, 100% 19.19%);
            clip-path: polygon(100% 100%, 0% 100%, 0% 2.21%, 7.14% 1.34%, 14.29% 0.93%, 21.43% 1.01%, 28.57% 1.58%, 35.71% 2.6%, 42.86% 4.03%, 50% 5.8%, 57.14% 7.81%, 64.29% 9.97%, 71.43% 12.16%, 78.57% 14.28%, 85.71% 16.22%, 92.86% 17.88%, 100% 19.19%);
  }
  to {
    opacity: var(--o, 1);
    -webkit-clip-path: polygon(100% 100%, 0% 100%, 0% 31.33%, 7.14% 32.11%, 14.29% 32.48%, 21.43% 32.4%, 28.57% 31.9%, 35.71% 30.99%, 42.86% 29.72%, 50% 28.15%, 57.14% 26.36%, 64.29% 24.45%, 71.43% 22.5%, 78.57% 20.62%, 85.71% 18.9%, 92.86% 17.42%, 100% 16.27%);
            clip-path: polygon(100% 100%, 0% 100%, 0% 31.33%, 7.14% 32.11%, 14.29% 32.48%, 21.43% 32.4%, 28.57% 31.9%, 35.71% 30.99%, 42.86% 29.72%, 50% 28.15%, 57.14% 26.36%, 64.29% 24.45%, 71.43% 22.5%, 78.57% 20.62%, 85.71% 18.9%, 92.86% 17.42%, 100% 16.27%);
  }
}
@-webkit-keyframes b1 {
  from {
    --x: 50%;
    --y: 60%;
    opacity: 0;
  }
  50% {
    --x: 60%;
    --y: 45%;
    opacity: 1;
    transform: scale(1.1);
  }
  to {
    --x: 50%;
    --y: 30%;
    opacity: 0;
  }
}
@keyframes b1 {
  from {
    --x: 50%;
    --y: 60%;
    opacity: 0;
  }
  50% {
    --x: 60%;
    --y: 45%;
    opacity: 1;
    transform: scale(1.1);
  }
  to {
    --x: 50%;
    --y: 30%;
    opacity: 0;
  }
}
@-webkit-keyframes b2 {
  from {
    --x: 50%;
    --y: 80%;
    opacity: 0;
  }
  50% {
    --x: 10%;
    --y: 55%;
    opacity: 1;
    transform: scale(1.1);
  }
  to {
    --x: 60%;
    --y: 30%;
    opacity: 0;
  }
}
@keyframes b2 {
  from {
    --x: 50%;
    --y: 80%;
    opacity: 0;
  }
  50% {
    --x: 10%;
    --y: 55%;
    opacity: 1;
    transform: scale(1.1);
  }
  to {
    --x: 60%;
    --y: 30%;
    opacity: 0;
  }
}
@supports (background: paint(houdini)) {
  .bubbles {
    position: absolute;
    inset: 0;
  }
  .bubbles:before {
    content: "";
    position: absolute;
    inset: 0;
    --x: 50%;
    --y: 80%;
    background: radial-gradient(0.2vmin at var(--x) var(--y), rgba(255, 255, 255, 0.8) 4vmin, transparent 4vmin, transparent) center center no-repeat, radial-gradient(0.3vmin at calc(var(--x) * 1.9) calc(var(--y) * 1.9), rgba(255, 255, 255, 0.8) 4vmin, transparent 4vmin, transparent) center center no-repeat;
    mix-blend-mode: soft-light;
    -webkit-animation: b2 linear 3.5s infinite;
            animation: b2 linear 3.5s infinite;
  }
  .bubbles:after {
    content: "";
    position: absolute;
    inset: 0;
    --x: 30%;
    --y: 60%;
    background: radial-gradient(0.2vmin at var(--x) var(--y), rgba(255, 255, 255, 0.8) 4vmin, transparent 4vmin, transparent) center center no-repeat, radial-gradient(0.3vmin at calc(var(--x) * 1.2) calc(var(--y) * 1.5), rgba(255, 255, 255, 0.8) 4vmin, transparent 4vmin, transparent) center center no-repeat;
    mix-blend-mode: soft-light;
    -webkit-animation: b1 linear 6s infinite;
            animation: b1 linear 6s infinite;
  }
}
.glass {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
   border-radius: 10vmin;
}

.glass-container {
  height: 24vmin;
  width: 6vmin;
  border-radius: 10vmin;
  position: relative;
  border: 0.1vmin solid rgba(255, 255, 255, 0.2);
  box-shadow: -1px 0.1vmin 0 1px rgba(255, 255, 255, 0.5), 1px 0.1vmin 0 1px rgba(255, 255, 255, 0.2);
}
.glass-container:before {
  border-radius: 10vmin;
  content: "";
  position: absolute;
  --size: 2vmin;
  inset: calc(var(--size) * -1);
  border-left: var(--size) solid rgba(255, 255, 255, 0.5);
  border-right: var(--size) solid rgba(128, 128, 128, 0.2);
  filter: blur(0.5vmin);
}

.glass-reflection {
  pointer-events: none;
  mix-blend-mode: overlay;
  position: absolute;
  border-radius: 10vmin;
  overflow: hidden;
  inset: 0;
}
.glass-reflection:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)) no-repeat, linear-gradient(to right, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1)) no-repeat;
  background-size: 0.5vmin 19vmin, 1.8vmin 21vmin;
  background-position: 1vmin 3vmin, 3vmin 2vmin;
  filter: blur(0.4vmin);
}
.glass-reflection:after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(4vmin 14vmin at 1vmin 20%, rgba(255, 255, 255, 0.3) 10%, transparent 50%, transparent), radial-gradient(2vmin 2vmin at 2vmin 5%, rgba(255, 255, 255, 0.9), transparent, transparent), radial-gradient(7vmin 7vmin at 2vmin 5%, rgba(255, 255, 255, 0.9), transparent, transparent);
}

.device {
  background: transparent;
  border-radius: 4vmin;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  --progress: 100%;
}
