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

body {
  background: #346;
}

main {
  margin: 24px auto 0 auto;
  overflow: hidden;
  position: relative;
  width: 520px;
  height: 520px;
}

.container {
  animation: rotContainer 16s steps(1) infinite;
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0) rotateX(50deg) translateY(-34.5px) rotateZ(45deg);
  transform-style: preserve-3d;
  width: 1035px;
  height: 1035px;
}

.tile {
  background-color: #f8f8f8;
  width: 69px;
  height: 69px;
  transform: translateZ(2px);
  transform-origin: 50% 100%;
  will-change: transform;
}

.tile-anim > .tile {
  animation: flip 0.5s linear forwards;
}
.tile-anim > .tile:nth-of-type(1) {
  animation-delay: 0.66s;
}
.tile-anim > .tile:nth-of-type(2) {
  animation-delay: 0.72s;
}
.tile-anim > .tile:nth-of-type(3) {
  animation-delay: 0.84s;
}
.tile-anim > .tile:nth-of-type(4) {
  animation-delay: 0.78s;
}
.tile-anim > .tile:nth-of-type(5) {
  animation-delay: 0.86s;
}
.tile-anim > .tile:nth-of-type(6) {
  animation-delay: 0.96s;
}
.tile-anim > .tile:nth-of-type(7) {
  animation-delay: 0.84s;
}
.tile-anim > .tile:nth-of-type(8) {
  animation-delay: 0.86s;
}
.tile-anim > .tile:nth-of-type(9) {
  animation-delay: 0.74s;
}
.tile-anim > .tile:nth-of-type(10) {
  animation-delay: 0.66s;
}
.tile-anim > .tile:nth-of-type(11) {
  animation-delay: 0.72s;
}
.tile-anim > .tile:nth-of-type(12) {
  animation-delay: 0.72s;
}
.tile-anim > .tile:nth-of-type(13) {
  animation-delay: 0.9s;
}
.tile-anim > .tile:nth-of-type(14) {
  animation-delay: 1.02s;
}
.tile-anim > .tile:nth-of-type(15) {
  animation-delay: 0.84s;
}
.tile-anim > .tile:nth-of-type(16) {
  animation-delay: 1s;
}
.tile-anim > .tile:nth-of-type(17) {
  animation-delay: 0.7s;
}
.tile-anim > .tile:nth-of-type(18) {
  animation-delay: 0.9s;
}
.tile-anim > .tile:nth-of-type(19) {
  animation-delay: 0.7s;
}
.tile-anim > .tile:nth-of-type(20) {
  animation-delay: 1.08s;
}
.tile-anim > .tile:nth-of-type(21) {
  animation-delay: 1.08s;
}
.tile-anim > .tile:nth-of-type(22) {
  animation-delay: 0.9s;
}
.tile-anim > .tile:nth-of-type(23) {
  animation-delay: 0.82s;
}
.tile-anim > .tile:nth-of-type(24) {
  animation-delay: 1.12s;
}
.tile-anim > .tile:nth-of-type(25) {
  animation-delay: 1s;
}
.tile-anim > .tile:nth-of-type(26) {
  animation-delay: 0.9s;
}
.tile-anim > .tile:nth-of-type(27) {
  animation-delay: 0.98s;
}
.tile-anim > .tile:nth-of-type(28) {
  animation-delay: 0.78s;
}
.tile-anim > .tile:nth-of-type(29) {
  animation-delay: 1s;
}
.tile-anim > .tile:nth-of-type(30) {
  animation-delay: 1.08s;
}
.tile-anim > .tile:nth-of-type(31) {
  animation-delay: 1.14s;
}
.tile-anim > .tile:nth-of-type(32) {
  animation-delay: 1.1s;
}
.tile-anim > .tile:nth-of-type(33) {
  animation-delay: 0.88s;
}
.tile-anim > .tile:nth-of-type(34) {
  animation-delay: 0.88s;
}
.tile-anim > .tile:nth-of-type(35) {
  animation-delay: 0.86s;
}
.tile-anim > .tile:nth-of-type(36) {
  animation-delay: 1.1s;
}
.tile-anim > .tile:nth-of-type(37) {
  animation-delay: 1.22s;
}
.tile-anim > .tile:nth-of-type(38) {
  animation-delay: 1.04s;
}
.tile-anim > .tile:nth-of-type(39) {
  animation-delay: 0.92s;
}
.tile-anim > .tile:nth-of-type(40) {
  animation-delay: 1.1s;
}
.tile-anim > .tile:nth-of-type(41) {
  animation-delay: 1.06s;
}
.tile-anim > .tile:nth-of-type(42) {
  animation-delay: 0.96s;
}
.tile-anim > .tile:nth-of-type(43) {
  animation-delay: 1.08s;
}
.tile-anim > .tile:nth-of-type(44) {
  animation-delay: 1.26s;
}
.tile-anim > .tile:nth-of-type(45) {
  animation-delay: 1.22s;
}
.tile-anim > .tile:nth-of-type(46) {
  animation-delay: 0.94s;
}
.tile-anim > .tile:nth-of-type(47) {
  animation-delay: 1s;
}
.tile-anim > .tile:nth-of-type(48) {
  animation-delay: 0.96s;
}
.tile-anim > .tile:nth-of-type(49) {
  animation-delay: 1.06s;
}
.tile-anim > .tile:nth-of-type(50) {
  animation-delay: 1.3s;
}
.tile-anim > .tile:nth-of-type(51) {
  animation-delay: 1.28s;
}
.tile-anim > .tile:nth-of-type(52) {
  animation-delay: 1.36s;
}
.tile-anim > .tile:nth-of-type(53) {
  animation-delay: 1.06s;
}
.tile-anim > .tile:nth-of-type(54) {
  animation-delay: 1.14s;
}
.tile-anim > .tile:nth-of-type(55) {
  animation-delay: 1.18s;
}
.tile-anim > .tile:nth-of-type(56) {
  animation-delay: 1.04s;
}
.tile-anim > .tile:nth-of-type(57) {
  animation-delay: 1.12s;
}
.tile-anim > .tile:nth-of-type(58) {
  animation-delay: 1.18s;
}
.tile-anim > .tile:nth-of-type(59) {
  animation-delay: 1.06s;
}
.tile-anim > .tile:nth-of-type(60) {
  animation-delay: 1.36s;
}
.tile-anim > .tile:nth-of-type(61) {
  animation-delay: 1.28s;
}
.tile-anim > .tile:nth-of-type(62) {
  animation-delay: 1.26s;
}
.tile-anim > .tile:nth-of-type(63) {
  animation-delay: 1.1s;
}
.tile-anim > .tile:nth-of-type(64) {
  animation-delay: 1.24s;
}
.tile-anim > .tile:nth-of-type(65) {
  animation-delay: 1.36s;
}
.tile-anim > .tile:nth-of-type(66) {
  animation-delay: 1.2s;
}
.tile-anim > .tile:nth-of-type(67) {
  animation-delay: 1.26s;
}
.tile-anim > .tile:nth-of-type(68) {
  animation-delay: 1.5s;
}
.tile-anim > .tile:nth-of-type(69) {
  animation-delay: 1.4s;
}
.tile-anim > .tile:nth-of-type(70) {
  animation-delay: 1.44s;
}
.tile-anim > .tile:nth-of-type(71) {
  animation-delay: 1.3s;
}
.tile-anim > .tile:nth-of-type(72) {
  animation-delay: 1.46s;
}
.tile-anim > .tile:nth-of-type(73) {
  animation-delay: 1.38s;
}
.tile-anim > .tile:nth-of-type(74) {
  animation-delay: 1.28s;
}
.tile-anim > .tile:nth-of-type(75) {
  animation-delay: 1.44s;
}
.tile-anim > .tile:nth-of-type(76) {
  animation-delay: 1.46s;
}
.tile-anim > .tile:nth-of-type(77) {
  animation-delay: 1.58s;
}
.tile-anim > .tile:nth-of-type(78) {
  animation-delay: 1.6s;
}
.tile-anim > .tile:nth-of-type(79) {
  animation-delay: 1.44s;
}
.tile-anim > .tile:nth-of-type(80) {
  animation-delay: 1.34s;
}
.tile-anim > .tile:nth-of-type(81) {
  animation-delay: 1.3s;
}
.tile-anim > .tile:nth-of-type(82) {
  animation-delay: 1.46s;
}
.tile-anim > .tile:nth-of-type(83) {
  animation-delay: 1.48s;
}
.tile-anim > .tile:nth-of-type(84) {
  animation-delay: 1.4s;
}
.tile-anim > .tile:nth-of-type(85) {
  animation-delay: 1.66s;
}
.tile-anim > .tile:nth-of-type(86) {
  animation-delay: 1.46s;
}
.tile-anim > .tile:nth-of-type(87) {
  animation-delay: 1.48s;
}
.tile-anim > .tile:nth-of-type(88) {
  animation-delay: 1.4s;
}
.tile-anim > .tile:nth-of-type(89) {
  animation-delay: 1.62s;
}
.tile-anim > .tile:nth-of-type(90) {
  animation-delay: 1.54s;
}
.tile-anim > .tile:nth-of-type(91) {
  animation-delay: 1.7s;
}
.tile-anim > .tile:nth-of-type(92) {
  animation-delay: 1.48s;
}
.tile-anim > .tile:nth-of-type(93) {
  animation-delay: 1.72s;
}
.tile-anim > .tile:nth-of-type(94) {
  animation-delay: 1.58s;
}
.tile-anim > .tile:nth-of-type(95) {
  animation-delay: 1.62s;
}
.tile-anim > .tile:nth-of-type(96) {
  animation-delay: 1.6s;
}
.tile-anim > .tile:nth-of-type(97) {
  animation-delay: 1.6s;
}
.tile-anim > .tile:nth-of-type(98) {
  animation-delay: 1.58s;
}
.tile-anim > .tile:nth-of-type(99) {
  animation-delay: 1.7s;
}
.tile-anim > .tile:nth-of-type(100) {
  animation-delay: 1.58s;
}
.tile-anim > .tile:nth-of-type(101) {
  animation-delay: 1.68s;
}
.tile-anim > .tile:nth-of-type(102) {
  animation-delay: 1.44s;
}
.tile-anim > .tile:nth-of-type(103) {
  animation-delay: 1.54s;
}
.tile-anim > .tile:nth-of-type(104) {
  animation-delay: 1.58s;
}
.tile-anim > .tile:nth-of-type(105) {
  animation-delay: 1.8s;
}
.tile-anim > .tile:nth-of-type(106) {
  animation-delay: 1.76s;
}
.tile-anim > .tile:nth-of-type(107) {
  animation-delay: 1.54s;
}
.tile-anim > .tile:nth-of-type(108) {
  animation-delay: 1.74s;
}
.tile-anim > .tile:nth-of-type(109) {
  animation-delay: 1.82s;
}
.tile-anim > .tile:nth-of-type(110) {
  animation-delay: 1.76s;
}
.tile-anim > .tile:nth-of-type(111) {
  animation-delay: 1.56s;
}
.tile-anim > .tile:nth-of-type(112) {
  animation-delay: 1.86s;
}
.tile-anim > .tile:nth-of-type(113) {
  animation-delay: 1.86s;
}
.tile-anim > .tile:nth-of-type(114) {
  animation-delay: 1.68s;
}
.tile-anim > .tile:nth-of-type(115) {
  animation-delay: 1.56s;
}
.tile-anim > .tile:nth-of-type(116) {
  animation-delay: 1.82s;
}
.tile-anim > .tile:nth-of-type(117) {
  animation-delay: 1.86s;
}
.tile-anim > .tile:nth-of-type(118) {
  animation-delay: 1.62s;
}
.tile-anim > .tile:nth-of-type(119) {
  animation-delay: 1.72s;
}
.tile-anim > .tile:nth-of-type(120) {
  animation-delay: 1.68s;
}
.tile-anim > .tile:nth-of-type(121) {
  animation-delay: 1.98s;
}
.tile-anim > .tile:nth-of-type(122) {
  animation-delay: 1.86s;
}
.tile-anim > .tile:nth-of-type(123) {
  animation-delay: 1.64s;
}
.tile-anim > .tile:nth-of-type(124) {
  animation-delay: 1.84s;
}
.tile-anim > .tile:nth-of-type(125) {
  animation-delay: 1.82s;
}
.tile-anim > .tile:nth-of-type(126) {
  animation-delay: 1.66s;
}
.tile-anim > .tile:nth-of-type(127) {
  animation-delay: 1.96s;
}
.tile-anim > .tile:nth-of-type(128) {
  animation-delay: 1.96s;
}
.tile-anim > .tile:nth-of-type(129) {
  animation-delay: 1.76s;
}
.tile-anim > .tile:nth-of-type(130) {
  animation-delay: 1.94s;
}
.tile-anim > .tile:nth-of-type(131) {
  animation-delay: 1.94s;
}
.tile-anim > .tile:nth-of-type(132) {
  animation-delay: 2s;
}
.tile-anim > .tile:nth-of-type(133) {
  animation-delay: 1.76s;
}
.tile-anim > .tile:nth-of-type(134) {
  animation-delay: 1.94s;
}
.tile-anim > .tile:nth-of-type(135) {
  animation-delay: 2.06s;
}
.tile-anim > .tile:nth-of-type(136) {
  animation-delay: 1.9s;
}
.tile-anim > .tile:nth-of-type(137) {
  animation-delay: 2.12s;
}
.tile-anim > .tile:nth-of-type(138) {
  animation-delay: 2.08s;
}
.tile-anim > .tile:nth-of-type(139) {
  animation-delay: 2.02s;
}
.tile-anim > .tile:nth-of-type(140) {
  animation-delay: 2.1s;
}
.tile-anim > .tile:nth-of-type(141) {
  animation-delay: 2s;
}
.tile-anim > .tile:nth-of-type(142) {
  animation-delay: 1.96s;
}
.tile-anim > .tile:nth-of-type(143) {
  animation-delay: 2.14s;
}
.tile-anim > .tile:nth-of-type(144) {
  animation-delay: 1.86s;
}
.tile-anim > .tile:nth-of-type(145) {
  animation-delay: 1.9s;
}
.tile-anim > .tile:nth-of-type(146) {
  animation-delay: 2.12s;
}
.tile-anim > .tile:nth-of-type(147) {
  animation-delay: 2.16s;
}
.tile-anim > .tile:nth-of-type(148) {
  animation-delay: 1.98s;
}
.tile-anim > .tile:nth-of-type(149) {
  animation-delay: 1.98s;
}
.tile-anim > .tile:nth-of-type(150) {
  animation-delay: 2.2s;
}
.tile-anim > .tile:nth-of-type(151) {
  animation-delay: 2s;
}
.tile-anim > .tile:nth-of-type(152) {
  animation-delay: 1.98s;
}
.tile-anim > .tile:nth-of-type(153) {
  animation-delay: 2.06s;
}
.tile-anim > .tile:nth-of-type(154) {
  animation-delay: 1.98s;
}
.tile-anim > .tile:nth-of-type(155) {
  animation-delay: 2.12s;
}
.tile-anim > .tile:nth-of-type(156) {
  animation-delay: 1.96s;
}
.tile-anim > .tile:nth-of-type(157) {
  animation-delay: 2.02s;
}
.tile-anim > .tile:nth-of-type(158) {
  animation-delay: 1.98s;
}
.tile-anim > .tile:nth-of-type(159) {
  animation-delay: 1.96s;
}
.tile-anim > .tile:nth-of-type(160) {
  animation-delay: 2s;
}
.tile-anim > .tile:nth-of-type(161) {
  animation-delay: 2.18s;
}
.tile-anim > .tile:nth-of-type(162) {
  animation-delay: 2.3s;
}
.tile-anim > .tile:nth-of-type(163) {
  animation-delay: 2.02s;
}
.tile-anim > .tile:nth-of-type(164) {
  animation-delay: 2.12s;
}
.tile-anim > .tile:nth-of-type(165) {
  animation-delay: 2.08s;
}
.tile-anim > .tile:nth-of-type(166) {
  animation-delay: 2.1s;
}
.tile-anim > .tile:nth-of-type(167) {
  animation-delay: 2.14s;
}
.tile-anim > .tile:nth-of-type(168) {
  animation-delay: 2.28s;
}
.tile-anim > .tile:nth-of-type(169) {
  animation-delay: 2.2s;
}
.tile-anim > .tile:nth-of-type(170) {
  animation-delay: 2.18s;
}
.tile-anim > .tile:nth-of-type(171) {
  animation-delay: 2.14s;
}
.tile-anim > .tile:nth-of-type(172) {
  animation-delay: 2.06s;
}
.tile-anim > .tile:nth-of-type(173) {
  animation-delay: 2.36s;
}
.tile-anim > .tile:nth-of-type(174) {
  animation-delay: 2.2s;
}
.tile-anim > .tile:nth-of-type(175) {
  animation-delay: 2.42s;
}
.tile-anim > .tile:nth-of-type(176) {
  animation-delay: 2.38s;
}
.tile-anim > .tile:nth-of-type(177) {
  animation-delay: 2.36s;
}
.tile-anim > .tile:nth-of-type(178) {
  animation-delay: 2.48s;
}
.tile-anim > .tile:nth-of-type(179) {
  animation-delay: 2.26s;
}
.tile-anim > .tile:nth-of-type(180) {
  animation-delay: 2.5s;
}
.tile-anim > .tile:nth-of-type(181) {
  animation-delay: 2.5s;
}
.tile-anim > .tile:nth-of-type(182) {
  animation-delay: 2.52s;
}
.tile-anim > .tile:nth-of-type(183) {
  animation-delay: 2.52s;
}
.tile-anim > .tile:nth-of-type(184) {
  animation-delay: 2.26s;
}
.tile-anim > .tile:nth-of-type(185) {
  animation-delay: 2.18s;
}
.tile-anim > .tile:nth-of-type(186) {
  animation-delay: 2.28s;
}
.tile-anim > .tile:nth-of-type(187) {
  animation-delay: 2.56s;
}
.tile-anim > .tile:nth-of-type(188) {
  animation-delay: 2.38s;
}
.tile-anim > .tile:nth-of-type(189) {
  animation-delay: 2.38s;
}
.tile-anim > .tile:nth-of-type(190) {
  animation-delay: 2.3s;
}
.tile-anim > .tile:nth-of-type(191) {
  animation-delay: 2.36s;
}
.tile-anim > .tile:nth-of-type(192) {
  animation-delay: 2.24s;
}
.tile-anim > .tile:nth-of-type(193) {
  animation-delay: 2.42s;
}
.tile-anim > .tile:nth-of-type(194) {
  animation-delay: 2.34s;
}
.tile-anim > .tile:nth-of-type(195) {
  animation-delay: 2.28s;
}
.tile-anim > .tile:nth-of-type(196) {
  animation-delay: 2.52s;
}
.tile-anim > .tile:nth-of-type(197) {
  animation-delay: 2.62s;
}
.tile-anim > .tile:nth-of-type(198) {
  animation-delay: 2.5s;
}
.tile-anim > .tile:nth-of-type(199) {
  animation-delay: 2.34s;
}
.tile-anim > .tile:nth-of-type(200) {
  animation-delay: 2.52s;
}
.tile-anim > .tile:nth-of-type(201) {
  animation-delay: 2.68s;
}
.tile-anim > .tile:nth-of-type(202) {
  animation-delay: 2.34s;
}
.tile-anim > .tile:nth-of-type(203) {
  animation-delay: 2.62s;
}
.tile-anim > .tile:nth-of-type(204) {
  animation-delay: 2.36s;
}
.tile-anim > .tile:nth-of-type(205) {
  animation-delay: 2.52s;
}
.tile-anim > .tile:nth-of-type(206) {
  animation-delay: 2.66s;
}
.tile-anim > .tile:nth-of-type(207) {
  animation-delay: 2.74s;
}
.tile-anim > .tile:nth-of-type(208) {
  animation-delay: 2.5s;
}
.tile-anim > .tile:nth-of-type(209) {
  animation-delay: 2.52s;
}
.tile-anim > .tile:nth-of-type(210) {
  animation-delay: 2.44s;
}
.tile-anim > .tile:nth-of-type(211) {
  animation-delay: 2.58s;
}
.tile-anim > .tile:nth-of-type(212) {
  animation-delay: 2.58s;
}
.tile-anim > .tile:nth-of-type(213) {
  animation-delay: 2.64s;
}
.tile-anim > .tile:nth-of-type(214) {
  animation-delay: 2.64s;
}
.tile-anim > .tile:nth-of-type(215) {
  animation-delay: 2.54s;
}
.tile-anim > .tile:nth-of-type(216) {
  animation-delay: 2.54s;
}
.tile-anim > .tile:nth-of-type(217) {
  animation-delay: 2.66s;
}
.tile-anim > .tile:nth-of-type(218) {
  animation-delay: 2.76s;
}
.tile-anim > .tile:nth-of-type(219) {
  animation-delay: 2.72s;
}
.tile-anim > .tile:nth-of-type(220) {
  animation-delay: 2.62s;
}
.tile-anim > .tile:nth-of-type(221) {
  animation-delay: 2.78s;
}
.tile-anim > .tile:nth-of-type(222) {
  animation-delay: 2.68s;
}
.tile-anim > .tile:nth-of-type(223) {
  animation-delay: 2.52s;
}
.tile-anim > .tile:nth-of-type(224) {
  animation-delay: 2.7s;
}
.tile-anim > .tile:nth-of-type(225) {
  animation-delay: 2.9s;
}

@keyframes rotContainer {
  from {
    transform: translate3d(-50%, -50%, 0) rotateX(50deg) translateY(-34.5px) rotateZ(45deg);
  }
  25% {
    transform: translate3d(-50%, -50%, 0) rotateX(50deg) translateY(-34.5px) rotateZ(135deg) translateY(-69px);
  }
  50% {
    transform: translate3d(-50%, -50%, 0) rotateX(50deg) translateY(-34.5px) rotateZ(225deg) translateY(-69px);
  }
  75% {
    transform: translate3d(-50%, -50%, 0) rotateX(50deg) translateY(-34.5px) rotateZ(315deg);
  }
  to {
    transform: translate3d(-50%, -50%, 0) rotateX(50deg) translateY(-34.5px) rotateZ(405deg);
  }
}
@keyframes flip {
  from {
    background-color: #f8f8f8;
    transform: translateZ(2px) rotateX(0);
  }
  45% {
    background-color: #a5a5a5;
  }
  90% {
    background-color: #f8f8f8;
    transform: translateZ(2px) rotateX(-190deg);
  }
  95% {
    transform: translateZ(2px) rotateX(-185deg);
  }
  to {
    transform: translateZ(2px) rotateX(-180deg);
  }
}