html, body {
  margin: 0 20px;
  padding: 0;
  overflow: auto; /* Changed from 'scroll' to 'auto' to avoid unnecessary scrollbars */
  text-align: center;
  font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  background-color: #e5e6df;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  min-height: 100vh;
  letter-spacing: 1px;
  flex-direction: column;
  width: -webkit-fill-available;
}

h1 {
  font-size: 2.5rem; 
  font-weight: 700; 
  margin-top: 50px; 
  margin-bottom: 20px; 
  padding: 0 20px;
}

p {
  font-size: 1rem; 
  font-weight: 400; 
  margin: 0 auto 30px; 
  padding: 40px 20px; 
  max-width: 600px; 
}

* {
  box-sizing: border-box;
}

form {
  margin: 25px 0;
  border-radius: 100%;
  cursor: pointer;
  height: 450px;
  position: relative;
  width: 450px;
}
form * {
  cursor: pointer;
}
[type='radio'] {
  display: none;
  left: 100%;
  position: absolute;
}
[type='reset'] {
  display: none;
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 6;
}
li {
  margin: 0;
  padding: 0;
  height: 450px;
  width: 450px;
}
label {
  display: block;
  height: 100%;
  width: 100%;
}
ul {
  -webkit-animation: scale 7s infinite steps(20);
          animation: scale 7s infinite steps(20);
  left: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 5;
}
.eight {
  border-radius: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 4;
  transform: rotate(-12deg);
}
.eight__backdrop {
  background: radial-gradient(circle at 5% 5%, #666, #222 50%), #222;
  border-radius: 100%;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
.eight__number {
  align-items: center;
  background: #fff;
  border-radius: 100%;
  display: flex;
  font-size: 125px;
  height: 50%;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
}
.eight__window {
  background: radial-gradient(transparent, #000);
  border: 10px double #555;
  border-radius: 100%;
  height: calc(50% + 20px);
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(50% + 20px);
}
.eight__fascia {
  height: 450px;
  position: relative;
  width: 450px;
}
span {
  background: #00f;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 1px 1px 0 #bfbfbf;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45%;
  height: 45%;
  transform-origin: 50% 25%;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  -webkit-animation-duration: 10s;
          animation-duration: 10s;
  -webkit-animation-timing-function: linear;
          animation-timing-function: linear;
  -webkit-animation-iteration-count: infinite;
          animation-iteration-count: infinite;
  -webkit-animation-name: floaty;
          animation-name: floaty;
  z-index: 2;
}
span:nth-of-type(even) {
  -webkit-clip-path: polygon(0 100%, 50% 20%, 100% 100%);
  align-items: flex-end;
  clip-path: polygon(0 100%, 50% 20%, 100% 100%);
  padding-bottom: 5%;
  top: 40%;
}
span:nth-of-type(odd) {
  -webkit-clip-path: polygon(0 0, 50% 80%, 100% 0);
  align-items: flex-start;
  clip-path: polygon(0 0, 50% 80%, 100% 0);
  padding-top: 5%;
  top: 60%;
}
[type='radio']:checked + span {
  opacity: 1;
  transition: opacity 1s 1.7s;
}
[type='radio']:checked ~ .eight,
[type='radio']:checked ~ .eight__backdrop {
  -webkit-animation: shake 0.25s 4;
          animation: shake 0.25s 4;
}
[type='radio']:checked ~ .eight .eight__fascia {
  transform: translate(0, -100%);
  transition: transform 0.25s 1.25s ease;
}
[type='radio']:checked ~ [type='reset'] {
  display: block;
}
[type='radio']:checked ~ .eight__mask {
  display: block;
}
[type='radio']:checked ~ .eight .eight__backdrop {
  -webkit-animation: shake 0.15s 4;
          animation: shake 0.15s 4;
}
@-webkit-keyframes scale {
  to {
    transform: translateY(-100%);
  }
}
@keyframes scale {
  to {
    transform: translateY(-100%);
  }
}
@-webkit-keyframes floaty {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(-50%, -50%) translate(-2%, 2%) rotate(2deg);
  }
  50% {
    transform: translate(-50%, -50%) translate(2%, -2%) rotate(-2deg);
  }
  75% {
    transform: translate(-50%, -50%) translate(1%, 1%) rotate(1deg);
  }
}
@keyframes floaty {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(-50%, -50%) translate(-2%, 2%) rotate(2deg);
  }
  50% {
    transform: translate(-50%, -50%) translate(2%, -2%) rotate(-2deg);
  }
  75% {
    transform: translate(-50%, -50%) translate(1%, 1%) rotate(1deg);
  }
}
@-webkit-keyframes shake {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-20px, 10px);
  }
  75% {
    transform: translate(120px, -30px);
  }
}
@keyframes shake {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-20px, 10px);
  }
  75% {
    transform: translate(120px, -30px);
  }
}

@media (max-width: 600px) {
  body {
    align-items: flex-start;
        width: auto;
  }

  h1, form,{
    margin-left: auto;
    margin-right: auto;
  }
  p {
    margin: 20px;
  }
}
