:root {
  --font-family: Uni Sans CAPS;
  --font-weight: 900;
  --font-style: normal;
  --font-size: 10em;
  --font-color: #fff;

  --timer-background: #181818;
  --timer-border-radius: 100vmax;
  --timer-spacing: .25em;
  --timer-padding: 0 .75em;
  --timer-minimum-width: 2.5em;

  --animation-scaled-size: 2.5;
}

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight);
  font-style: var(--font-style);
  font-size: var(--font-size);
  color: var(--font-color);
  overflow: hidden;
  height: 100vh;
}

.container {
  position: absolute;
  bottom: var(--timer-spacing);
  left: var(--timer-spacing);
  height: fit-content;
  transition: all 1s ease;
  overflow: hidden;
  transform: scale(1);

  animation: container-on var(--animation-duration) ease forwards;
}

.timer-wrapper {
  background: var(--timer-background);
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: var(--timer-minimum-width);
  padding: var(--timer-padding);
  border-radius: var(--timer-border-radius);
}

.container.center {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container.center-animation {
  animation: container-center var(--animation-duration) ease forwards;
}

.container.off-animation {
  animation: container-off var(--animation-duration) ease forwards;
}

@keyframes container-center {
  0% {
    top: unset;
    opacity: 1;
    transform: scale(1);
  }
  25% {
    bottom: -150px;
    opacity: 0;
    transform: scale(1);
  }
  75% {
    bottom: -150px;
    opacity: 0;
    transform: scale(1);
  }
  100% {
    top: unset;
    opacity: 1;
    transform: scale(var(--animation-scaled-size));
  }  
}

@keyframes container-off {
  0% {
    top: unset;
    opacity: 1;
    transform: scale(var(--animation-scaled-size));
  }
  25% {
    bottom: -150px;
    opacity: 0;
    transform: scale(var(--animation-scaled-size));
  }
  100% {
    bottom: -150px;
    opacity: 0;
    transform: scale(var(--animation-scaled-size));
  }
}

@keyframes container-on {
  0% {
    bottom: -150px;
    opacity: 0;
  }
  50% {
    top: unset;
    opacity: 1;
  }
  100% {
    top: unset;
    opacity: 1;
  }
}