/* 自由に編集してみてください */
body {
  margin: 0;
  box-sizing: border-box;
}

a {
  display: inline-block;
  text-align: center;
  width: 20px;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  background: #000;
  color: #fff;
  position: relative;
  outline: none;
  overflow: hidden;
}

a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  transform: skewX(-25deg);
}

a:hover {
  opacity: 0.7;
}

a:hover::before {
  animation: shine 0.7s;
}

a:active {
  opacity: 0.5;
}

section {
  width: 500px;
  margin: 15px auto 0;
  padding: 40px;
  border: 1px solid gray;
}

h1 {
  font-size: 32px;
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 24px;
}

.button {
  display: flex;
}

.button + .button {
  margin-top: 12px;
}

.button.row {
  flex-direction: row;
}

.button.column {
  flex-direction: column;
}

.button.row-reverse {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.button.column-reverse {
  flex-direction: column-reverse;
}

.button > a:nth-child(3) {
  animation: margin 4s infinite linear alternate;
}

@keyframes margin {
  25% {
    margin-left: 15%;
  }
  50% {
    margin-left: 30%;
  }
  75% {
    margin-left: 45%;
  }
  100% {
    margin-left: 60%;
  }
}

@keyframes shine {
  100% {
    left: 125%;
  }
}
