:root {
  --car-color: #ff2800;
  --window-color: #add8e6;
  --success-color: #2eff04;
  --error-color: #fd1c03;
}

html {
  background-color: #000;
  background-image: radial-gradient(ellipse at center, rgba(127, 0, 173, 0.4) 0%, black 90%);
  height: 100%;
}

*,
*:after,
*:before {
  box-sizing: border-box;
}

.wrapper {
  background-color: #000;
  background-image: radial-gradient(ellipse at center, rgba(127, 0, 173, 0.6) 0%, rgba(0, 0, 0, 0.8) 60%, black 90%);
  background-size: cover;
  border: 1px solid rgba(127, 0, 173, 0.6);
  box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
  height: 600px;
  width: 800px;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  position: absolute;
  overflow: hidden;
  -webkit-perspective: 50px;
          perspective: 50px;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
}

.sun {
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 12.5em;
  height: 12.5em;
  background: -webkit-gradient(linear, left top, left bottom, from(#f12711), to(yellow));
  background: linear-gradient(#f12711, yellow);
  box-shadow: 0 0 30px #f5af19;
}

.grid {
  background: #010101;
  height: 60em;
  -webkit-transform: scale(1.4) rotateX(90deg);
          transform: scale(1.4) rotateX(90deg);
  position: absolute;
  width: 600%;
  margin-left: -250%;
}
.grid::after {
  -webkit-animation: 2.4s dash linear infinite;
          animation: 2.4s dash linear infinite;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0px, rgba(54, 226, 248, 0.25) 0%, rgba(54, 226, 248, 0.25) 3px, rgba(0, 0, 0, 0) 0px), linear-gradient(90deg, rgba(0, 0, 0, 0) 0px, rgba(54, 226, 248, 0.5) 0%, rgba(54, 226, 248, 0.5) 3px, rgba(0, 0, 0, 0) 0px);
  background-size: 60px 60px, 60px 60px;
  background-color: rgba(2, 40, 45, 0.5);
  content: "";
  width: 10%;
  height: 100%;
  position: absolute;
  bottom: 0;
  left: 50%;
  border: 2px solid rgba(54, 226, 248, 0.25);
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
}

.car {
  -webkit-animation: 3s sway ease-in-out infinite;
          animation: 3s sway ease-in-out infinite;
  height: 180px;
  left: 50%;
  -webkit-perspective: 200px;
          perspective: 200px;
  position: absolute;
  width: 240px;
  top: 55.5%;
  margin-left: -120px;
  z-index: 2;
}
.car::before {
  -webkit-animation: 3s skew ease-in-out infinite;
          animation: 3s skew ease-in-out infinite;
  content: "";
  width: 110%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  position: absolute;
  top: 75%;
  left: 50%;
  -webkit-transform: rotateX(60deg) translateX(-50%);
          transform: rotateX(60deg) translateX(-50%);
  z-index: 0;
}

.car__bumper {
  border-radius: 10em 10em 8em 8em;
  background: #111;
  position: absolute;
  bottom: 10%;
  height: 35%;
  overflow: hidden;
  width: 90%;
  left: 5%;
}
.car__bumper::after {
  background: rgba(255, 255, 255, 0.05);
  height: 20%;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.car__back {
  border-radius: 8em 8em 4em 4em;
  background: var(--car-color);
  position: absolute;
  bottom: 25%;
  height: 35%;
  overflow: hidden;
  width: 95%;
  left: 2.5%;
}
.car__back::after {
  background: rgba(0, 0, 0, 0.2);
  height: 30%;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}
.car__back:before {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1em;
  position: absolute;
  content: "";
  height: 10%;
  top: 5%;
  left: 50%;
  width: 60%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
}

.car__light {
  background-color: red;
  background-position: -2px -2px, -8px -8px;
  background-image: radial-gradient(white 10%, transparent 11%), radial-gradient(white 10%, transparent 11%);
  border-radius: 50%;
  border: 0.1em solid #8b0000;
  box-shadow: inset 0 0 0 0.3em rgba(255, 165, 0, 0.8), 0 0 0.3em rgba(255, 0, 0, 0.8), 0 0 6px 3px #fb492b inset, 0 0 15px 1px #fb492b;
  padding-top: 14%;
  width: 15%;
  position: absolute;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  top: 50%;
  z-index: 2;
}

.car__light--small {
  background: white;
  padding-top: 9.5%;
  top: 65%;
  width: 11%;
  z-index: 3;
}

.car__light--left {
  left: 5%;
}

.car__light--small.car__light--left {
  left: 15%;
}

.car__light--right {
  right: 5%;
}

.car__light--small.car__light--right {
  right: 15%;
}

.car__plate {
  border-radius: 0.2em;
  border: 0.1em solid #333;
  box-shadow: 0 4px 2px -2px rgba(0, 0, 0, 0.6);
  height: 12.5%;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.01em;
  position: absolute;
  background: yellow;
  text-align: center;
  left: 50%;
  bottom: 15%;
  padding: 2% 0;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  width: 28%;
}

.car__roof {
  border-radius: 1em 1em 0 0;
  background-color: var(--car-color);
  background-image: -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(70%, rgba(0, 0, 0, 0.5)));
  background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.5) 70%);
  bottom: 45%;
  left: 50%;
  width: 60%;
  height: 45%;
  position: absolute;
  -webkit-transform: rotateX(50deg) translateX(-50%);
          transform: rotateX(50deg) translateX(-50%);
}
.car__roof:after {
  background: var(--window-color);
  border-radius: 1em 1em 0 0;
  position: absolute;
  content: "";
  height: 70%;
  bottom: 5%;
  left: 50%;
  width: 80%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
}
.car__roof:before {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1em;
  position: absolute;
  content: "";
  height: 10%;
  top: 5%;
  left: 50%;
  width: 80%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
}

.car__grill {
  background-color: #222;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.1em, #111), color-stop(0.1em, transparent));
  background-image: linear-gradient(#111 0.1em, transparent 0.1em);
  background-size: 100% 0.2em;
  border-radius: 0.5em;
  position: absolute;
  height: 50%;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 80%;
  z-index: 1;
}

.car__emblem {
  border: 1px solid white;
  height: 0.85em;
  width: 0.85em;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%) rotate(45deg);
          transform: translate(-50%, -50%) rotate(45deg);
}
.car__emblem::after {
  content: "";
  position: absolute;
  width: 0.3em;
  height: 0.3em;
  background: white;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}

.car__wheel {
  -webkit-animation: wheels 3s ease-in-out infinite;
          animation: wheels 3s ease-in-out infinite;
  border-radius: 0.4em;
  position: absolute;
  height: 30%;
  bottom: 0;
  background: #010101;
  width: 22%;
}
.car__wheel::after, .car__wheel::before {
  animation: 1s dash linear infinite reverse;
  width: 10%;
  height: 100%;
  content: "";
  position: absolute;
  background-color: rgba(255, 255, 255, 0.025);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0px, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.025) 2px, rgba(0, 0, 0, 0) 0px);
  background-size: 4px 6px;
  top: 0;
}
.car__wheel::after {
  left: 10%;
}
.car__wheel::before {
  right: 10%;
}

.car__wheel--left {
  -webkit-animation-delay: -1.5s;
          animation-delay: -1.5s;
  left: 2.5%;
}

.car__wheel--right {
  right: 2.5%;
}

.car__mirror {
  border-radius: 0.3em;
  position: absolute;
  top: 30%;
  background: var(--car-color);
  width: 1.5em;
  height: 1em;
}
.car__mirror::after {
  border-radius: 0.1em;
  content: "";
  position: absolute;
  left: 0.1em;
  right: 0.1em;
  top: 0.1em;
  bottom: 0.1em;
  background: var(--window-color);
}
.car__mirror::before {
  background-color: inherit;
  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.1)), to(rgba(0, 0, 0, 0.2)));
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));
  content: "";
  width: 2em;
  height: 0.5em;
  top: 90%;
  left: 80%;
  position: absolute;
  -webkit-transform: rotate(30deg);
          transform: rotate(30deg);
  z-index: 0;
}

.car__mirror--left {
  left: 5%;
}

.car__mirror--right {
  right: 5%;
  -webkit-transform: scaleX(-1);
          transform: scaleX(-1);
}

.diamond {
  -webkit-animation: 8s fly-forward linear infinite;
          animation: 8s fly-forward linear infinite;
  color: white;
  border: 1px solid currentColor;
  box-shadow: 0 0 20px currentColor;
  height: 0.85em;
  width: 0.85em;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%) rotate(45deg);
          transform: translate(-50%, -50%) rotate(45deg);
}
.diamond:nth-of-type(4) {
  -webkit-animation-delay: -4s;
          animation-delay: -4s;
}
.diamond:nth-of-type(5) {
  -webkit-animation-delay: -5s;
          animation-delay: -5s;
}
.diamond:nth-of-type(6) {
  -webkit-animation-delay: -6s;
          animation-delay: -6s;
}
.diamond:nth-of-type(7) {
  -webkit-animation-delay: -7s;
          animation-delay: -7s;
}
.diamond:nth-of-type(8) {
  -webkit-animation-delay: -8s;
          animation-delay: -8s;
}

.circle {
  -webkit-animation: 8s fly-forward-circle linear infinite;
          animation: 8s fly-forward-circle linear infinite;
  -webkit-animation-delay: 5.5s;
          animation-delay: 5.5s;
  border-radius: 50%;
  color: var(--error-color);
  border: 1px solid currentColor;
  box-shadow: 0 0 20px currentColor;
  height: 0.85em;
  width: 0.85em;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: scale(0) translate(-50%, -50%) rotate(45deg);
          transform: scale(0) translate(-50%, -50%) rotate(45deg);
}

.car__exhaust {
  background: black;
  border: 0.2em solid rgba(255, 255, 255, 0.2);
  bottom: 12.5%;
  position: absolute;
  border-radius: 50%;
  height: 1.25em;
  width: 1.25em;
}
.car__exhaust::after {
  background: inherit;
  border: inherit;
  position: absolute;
  content: "";
  height: inherit;
  width: inherit;
  top: -0.2em;
  border-radius: inherit;
}

.car__exhaust--left {
  left: 12.5%;
}
.car__exhaust--left::after {
  left: 100%;
}

.car__exhaust--right {
  right: 12.5%;
}
.car__exhaust--right::after {
  right: 100%;
}

.score {
  position: absolute;
  border-radius: 0.25em;
  top: 2em;
  right: 2em;
  width: 12em;
  height: 2em;
  background: #222;
  border: 1px solid white;
}
.score::after {
  -webkit-animation: 8s health steps(4) infinite;
          animation: 8s health steps(4) infinite;
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
  content: "";
  border-radius: 0.1em;
  box-shadow: 0 0 10px currentColor;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  color: var(--success-color);
  background: currentColor;
  width: 20%;
}

@-webkit-keyframes dash {
  to {
    background-position: 0% 100%;
  }
}

@keyframes dash {
  to {
    background-position: 0% 100%;
  }
}
@-webkit-keyframes sway {
  0%,
  100% {
    -webkit-transform: translateX(-40%) rotateZ(-4deg) rotateY(-0.5deg);
            transform: translateX(-40%) rotateZ(-4deg) rotateY(-0.5deg);
  }
  50% {
    -webkit-transform: translateX(40%) rotateZ(4deg) rotateY(0.5deg);
            transform: translateX(40%) rotateZ(4deg) rotateY(0.5deg);
  }
}
@keyframes sway {
  0%,
  100% {
    -webkit-transform: translateX(-40%) rotateZ(-4deg) rotateY(-0.5deg);
            transform: translateX(-40%) rotateZ(-4deg) rotateY(-0.5deg);
  }
  50% {
    -webkit-transform: translateX(40%) rotateZ(4deg) rotateY(0.5deg);
            transform: translateX(40%) rotateZ(4deg) rotateY(0.5deg);
  }
}
@-webkit-keyframes skew {
  0%,
  100% {
    -webkit-transform: skew(-50deg) rotateX(60deg) translateX(-60%);
            transform: skew(-50deg) rotateX(60deg) translateX(-60%);
  }
  50% {
    -webkit-transform: skew(50deg) rotateX(60deg) translateX(-40%);
            transform: skew(50deg) rotateX(60deg) translateX(-40%);
  }
}
@keyframes skew {
  0%,
  100% {
    -webkit-transform: skew(-50deg) rotateX(60deg) translateX(-60%);
            transform: skew(-50deg) rotateX(60deg) translateX(-60%);
  }
  50% {
    -webkit-transform: skew(50deg) rotateX(60deg) translateX(-40%);
            transform: skew(50deg) rotateX(60deg) translateX(-40%);
  }
}
@-webkit-keyframes health {
  0% {
    width: 20%;
  }
  50% {
    width: 100%;
  }
  79% {
    color: var(--success-color);
    opacity: 1;
  }
  80% {
    color: var(--error-color);
    opacity: 0;
  }
  81% {
    opacity: 1;
  }
  82% {
    opacity: 0;
  }
  83% {
    opacity: 1;
  }
  84% {
    color: var(--error-color);
    width: 100%;
    opacity: 0;
  }
  90% {
    color: var(--success-color);
    width: 20%;
    opacity: 1;
  }
  100% {
    width: 20%;
  }
}
@keyframes health {
  0% {
    width: 20%;
  }
  50% {
    width: 100%;
  }
  79% {
    color: var(--success-color);
    opacity: 1;
  }
  80% {
    color: var(--error-color);
    opacity: 0;
  }
  81% {
    opacity: 1;
  }
  82% {
    opacity: 0;
  }
  83% {
    opacity: 1;
  }
  84% {
    color: var(--error-color);
    width: 100%;
    opacity: 0;
  }
  90% {
    color: var(--success-color);
    width: 20%;
    opacity: 1;
  }
  100% {
    width: 20%;
  }
}
@-webkit-keyframes fly-forward {
  0% {
    -webkit-transform: scale(0) translate(-50%, -50%) rotate(0deg);
            transform: scale(0) translate(-50%, -50%) rotate(0deg);
  }
  22% {
    color: white;
  }
  23% {
    color: var(--success-color);
  }
  100% {
    -webkit-transform: scale(4) translate3D(-50%, -50%, 200px) rotate(560deg);
            transform: scale(4) translate3D(-50%, -50%, 200px) rotate(560deg);
  }
}
@keyframes fly-forward {
  0% {
    -webkit-transform: scale(0) translate(-50%, -50%) rotate(0deg);
            transform: scale(0) translate(-50%, -50%) rotate(0deg);
  }
  22% {
    color: white;
  }
  23% {
    color: var(--success-color);
  }
  100% {
    -webkit-transform: scale(4) translate3D(-50%, -50%, 200px) rotate(560deg);
            transform: scale(4) translate3D(-50%, -50%, 200px) rotate(560deg);
  }
}
@-webkit-keyframes fly-forward-circle {
  0% {
    -webkit-transform: scale(0) translate(-50%, -50%) rotate(0deg);
            transform: scale(0) translate(-50%, -50%) rotate(0deg);
  }
  100% {
    -webkit-transform: scale(2) translate3D(-50%, -50%, 200px) rotate(560deg);
            transform: scale(2) translate3D(-50%, -50%, 200px) rotate(560deg);
  }
}
@keyframes fly-forward-circle {
  0% {
    -webkit-transform: scale(0) translate(-50%, -50%) rotate(0deg);
            transform: scale(0) translate(-50%, -50%) rotate(0deg);
  }
  100% {
    -webkit-transform: scale(2) translate3D(-50%, -50%, 200px) rotate(560deg);
            transform: scale(2) translate3D(-50%, -50%, 200px) rotate(560deg);
  }
}
@-webkit-keyframes wheels {
  50% {
    -webkit-transform: translateY(-20%);
            transform: translateY(-20%);
  }
}
@keyframes wheels {
  50% {
    -webkit-transform: translateY(-20%);
            transform: translateY(-20%);
  }
}