* {
  box-sizing: border-box;
  --colorGreen: #00a448;
  --colorBlue: #0d468f;
  --colorRed: #e73233; 
  --colorYellow: #f69f21;
}
.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  grid-template-rows: 300px 300px 300px;
}
@media only screen and (min-width: 768px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media only screen and (min-width: 1200px) {
  .grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media only screen and (min-width: 1440px) {
  .grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

.box {
  align-self: center;
  justify-self: center;
  height: 250px;
  width: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 4px 8px 16px rgba(0,0,0,0.1);
}
.bg--dark {
  background-color: #2c3e50;
}

/* Dot-Dot-Dot */
.dot-dot-dot {
  grid-area: List;
  padding: 1.5rem 1.5rem;
  font-size: 1.5rem;
  color: gray;
  width: 300px;
}
.dot-dot-dot::after {
  content: '\2026';
  font-size: 1.5rem;
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  animation: dot-dot-dot steps(4, end) 2s infinite;
  width: 0px;
}
@keyframes dot-dot-dot {
  to {
    width: 1.25em;
  }
}

/* Rotating Triangles */
.box.box-kinetic {
  background-color: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 250px;
  width: 250px;
  margin: 2rem;
}
.kinetic {
  position: relative;
  height: 100px;
  width: 100px;
}
.kinetic::after, .kinetic::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0; 
  width: 0;
  height: 0;
  border: 50px solid transparent;
  border-bottom-color: #fff;
  animation: rotateA 2.5s linear infinite 0.5s;
}
.kinetic::before {
  transform: rotate(90deg);
  animation: rotateB 2.5s linear infinite;
}
@keyframes rotateA {
  0%,
  25% { transform: rotate(0deg); }
  50%, 75% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}
@keyframes rotateB {
  0%, 25% { transform: rotate(90deg); }
  50%, 75% { transform: rotate(270deg); }
  100% { transform: rotate(450deg); }
}

/* Bouncing Balls */
.bouncer {
  display: flex;
  justify-content: space-around;
  margin-top: 100px;
  width: 100px;
  height: 20px;
}
.bouncer div {
  width: 20px;
  height: 20px;
  background-color: #2c3e50;
  border-radius: 50%;
  animation: bouncer .5s cubic-bezier(.19, .57, .3, .98) infinite alternate;
}
.bouncer div:nth-child(2) {
  animation-delay: .1s;
  opacity: .8;
}
.bouncer div:nth-child(3) {
  animation-delay: .2s;
  opacity: .6;
}
.bouncer div:nth-child(4) {
  animation-delay: .3s;
  opacity: .4;
}
@keyframes bouncer {
  from { transform: translateY(0);}
  to { transform: translateY(-100px);}
}

/* Sqare to Spiral Animation */
.box.square2star {
  background-color: #2c3e50;
  height: 250px;
  width: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.square {
  position: absolute;
  height: 160px;
  width: 160px;
  border: 1px solid #fff;
}
.square2star div:nth-child(1) {
  animation: rotate1 5s ease-in-out infinite;
}
@keyframes rotate1 {
  50% {
    transform: rotate(0deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(2) {
  animation: rotate2 5s ease-in-out infinite;
}
@keyframes rotate2 {
  50% {
    transform: rotate(10deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(3) {
  animation: rotate3 5s ease-in-out infinite;
}
@keyframes rotate3 {
  50% {
    transform: rotate(20deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(4) {
  animation: rotate4 5s ease-in-out infinite;
}
@keyframes rotate4 {
  50% {
    transform: rotate(30deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(5) {
  animation: rotate5 5s ease-in-out infinite;
}
@keyframes rotate5 {
  50% {
    transform: rotate(40deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(6) {
  animation: rotate6 5s ease-in-out infinite;
}
@keyframes rotate6 {
  50% {
    transform: rotate(50deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(7) {
  animation: rotate7 5s ease-in-out infinite;
}
@keyframes rotate7 {
  50% {
    transform: rotate(60deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(8) {
  animation: rotate8 5s ease-in-out infinite;
}
@keyframes rotate8 {
  50% {
    transform: rotate(70deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(9) {
  animation: rotate9 5s ease-in-out infinite;
}
@keyframes rotate9 {
  50% {
    transform: rotate(80deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(10) {
  animation: rotate10 5s ease-in-out infinite;
}
@keyframes rotate10 {
  50% {
    transform: rotate(90deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(11) {
  animation: rotate11 5s ease-in-out infinite;
}
@keyframes rotate11 {
  50% {
    transform: rotate(100deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(12) {
  animation: rotate12 5s ease-in-out infinite;
}
@keyframes rotate12 {
  50% {
    transform: rotate(110deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(13) {
  animation: rotate13 5s ease-in-out infinite;
}
@keyframes rotate13 {
  50% {
    transform: rotate(120deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(14) {
  animation: rotate14 5s ease-in-out infinite;
}
@keyframes rotate14 {
  50% {
    transform: rotate(130deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(15) {
  animation: rotate15 5s ease-in-out infinite;
}
@keyframes rotate15 {
  50% {
    transform: rotate(140deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(16) {
  animation: rotate16 5s ease-in-out infinite;
}
@keyframes rotate16 {
  50% {
    transform: rotate(150deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(17) {
  animation: rotate17 5s ease-in-out infinite;
}
@keyframes rotate17 {
  50% {
    transform: rotate(160deg);
    height: 40px;
    border-radius: 50%;
  }
}
.square2star div:nth-child(18) {
  animation: rotate18 5s ease-in-out infinite;
}
@keyframes rotate18 {
  50% {
    transform: rotate(170deg);
    height: 40px;
    border-radius: 50%;
  }
}

/* Rotating Circles */
.box-circles {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 200px;
  width: 200px;
  padding: 2.4rem;
  transform: rotate(42deg) skewY(-27deg);
}
.circle {
  box-sizing: content-box;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border: solid 8px #2c3e50;
  border-top: 8px solid #9FADBD;
  border-radius: 50%;
  animation: rotate 3s ease-in-out infinite;
}
@keyframes rotate {
  100% {transform: rotate(360deg)}
}

/* Soundwave */
.box.soundwave {
  background-color: #2c3e50;
}
.obj {
  width: 6px;
  height: 40px;
  background-color: #fff;
  margin: 0 3px;
  border-radius: 10px;
  animation: soundwave .8s infinite;
}
.obj:nth-child(2) { animation-delay: .1s;}
.obj:nth-child(3) { animation-delay: .2s;}
.obj:nth-child(4) { animation-delay: .3s;}
.obj:nth-child(5) { animation-delay: .4s;}
.obj:nth-child(6) { animation-delay: .5s;}
.obj:nth-child(7) { animation-delay: .6s;}
.obj:nth-child(8) { animation-delay: .7s;}

@keyframes soundwave {
  0% { height: 0;}
  50% { height: 40px; }
  100% { height: 0; }
}

/* Flippin Squares */
.box.squares {
  position: relative;
  perspective: 200px;
}
.box.squares div {
  position: absolute;
  top: 75px;
  left: 75px;
  height: 50px;
  width: 50px;
  background-color: var(--colorBlue);
  animation: flippin2Squares 4s linear infinite;
  transform-origin: bottom right;
}
.box.squares div:nth-child(2) {
  animation-delay: -2s;
  opacity: 0.9;
}
@keyframes flippin2Squares {
  0% { transform: rotateX(0) rotateY(0);}
  25% { transform: rotateX(0) rotateY(180deg); background-color: var(--colorGreen);}
  50% { transform: rotateX(180deg) rotateY(180deg); background-color: var(--colorRed);}
  75% { transform: rotateX(180deg) rotateY(0); background-color: var(--colorYellow);}
  100% { transform: rotateX(0) rotateY(0);}
}

/* Bright Light Circle */
.box--inner {
  position: relative;
  width: 120px;
  height: 120px;
  animation: animateBackgroundColor 10s infinite;
}
@keyframes animateBackgroundColor {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.box--inner span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(calc(-18deg * var(--i)));
}
.box--inner span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #f69f21;
  box-shadow: 0 0 10px #f69f21,
              0 0 20px #f69f21,
              0 0 40px #f69f21;              ;
  animation: animate 2s linear infinite;
  animation-delay: calc(-0.1s * var(--i));
}
@keyframes animate {
  0% { transform: scale(1); }
  80%, 100% { transform: scale(0); }
}

/* Newton's Cradle of Boxes*/
.cube {
  width: 20px;
  height: 20px;
  margin-right: 5px;
}
.cube-1 {
  background-color: #8cc271;
  animation: ping-left 1s infinite;
}
.cube-2 {
  background-color: #69beeb;
}
.cube-3 {
  background-color: #f5aa39;
}
.cube-4 {
  background-color: #e9643b;
  animation: ping-right 1s infinite .5s;
}

@keyframes ping-left {
  40% { transform: translateX(-30px); }
  50% { transform: translateX(0); }
}
@keyframes ping-right {
  40% { transform: translateX(30px); }
  50% { transform: translateX(0); }
}


/* * { outline: 2px dotted red }
* * { outline: 2px dotted green }
* * * { outline: 2px dotted orange }
* * * * { outline: 2px dotted blue }
* * * * * { outline: 1px solid red }
* * * * * * { outline: 1px solid green }
* * * * * * * { outline: 1px solid orange }
* * * * * * * * { outline: 1px solid blue } */