* {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  padding: 0;
}
a {
  text-decoration: none;
  color: #222;
}
a:hover {
  color: #666;
}
header {
  text-align: center;
  margin: 30px 0;
  width: 100%;
}
footer {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container {
  padding: 0 20px;
  display: flex;
  flex: 1;
  position: absolute;
  flex-direction: column;
  top: 50%;
  left: 50%;
  margin-top: -293px;
  margin-left: -240px;
}
.elements {
  display: grid;
  grid-template-rows: repeat(3, 100px);
  grid-row-gap: 50px;
  max-width: 500px;
  box-sizing: border-box;
  padding: 20px;
  margin: 0 auto;
  border-radius: 10px;
  background: #222;
}
.elements-row {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-gap: 50px;
}
.element {
  display: grid;
  z-index: 11;
  border-radius: 5px;
}
.element1 {
  background: yellow;
}
.element2 {
  background: orange;
}
.element3 {
  background: red;
}
.element4 {
  grid-column-start: 2;
  grid-column-end: 2;
  background: purple;
}
.element5 {
  background: blue;
}
.element6 {
  background: green;
}
.element7 {
  background: teal;
}