h1 {
  margin: 32px 0 20px;
  font-size: 46px;
}

#link-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
}

#link-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 155px;
  height: 48px;
  border: 1px solid #e4e2ff;
  border-radius: 10px;
  margin-bottom: 24px;

  color: #e4e2ff;
  font-size: 18px;
  text-decoration: none;

  opacity: 0;
}

#link-bar a:hover {
  background-color: #e4e2ff;
  color: #0c0d16;
}

#link-bar a:active {
  background-color: #c9c7e5;
  color: #0c0d16;
}

#flag-format {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 36px;

  opacity: 0;
}

code {
  padding: 2px 4px;
  border-radius: 5px;

  color: #e4e2ff;
  background-color: #2f3458;

  font-family: monospace;
}

#flag-format code {
  font-size: 21px;
}

#game-container {
  width: 737px;
  height: 360px;
  padding: 0 20px;
  margin: 0 auto 60px;
  border: 1px solid #dbebfb;
  border-radius: 20px;

  position: relative;

  background-color: #0c0d16;
  color: #e4e2ff;

  opacity: 0;
}

#game-error {
  display: none;
}

h2 {
  font-size: 32px;
  margin: 30px 0 40px;

  opacity: 0;
}

#grid-container {
  display: grid;
  grid-template-columns: repeat(116, 2fr);

  position: absolute;
  top: 106px;

  opacity: 0;
}

.grid-box {
  width: 5px;
  height: 10px;
  border: 0.1px solid #93a0ac;
}

.grid-box-right {
  background-color: rgb(0, 162, 0);
}

.grid-box-wrong {
  background-color: rgb(100, 100, 100);
}

.grid-box-focus {
  background-color: chartreuse;
}

#arrow-btn-container {
  width: 150px;
  margin: 10px auto;
  height: 100px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#arrow-btn-container>div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.arrow-btn {
  background-color: #0c0d16;
  border: none;

  width: 36px;
  height: 36px;

  display: grid;
  align-content: center;
  justify-content: center;

  cursor: pointer;

  opacity: 0;
}

.arrow-btn:focus {
  outline: none;
}

.arrow-btn svg {
  width: 36px;
  height: 36px;
}

#function-btn-container {
  margin: 20px 0;
  text-align: center;
}

.function-btn {
  opacity: 0;
}

.function-btn, .function-btn:enabled:focus {
  height: 32px;
  padding: 0 30px;
  margin: 0 20px;
  border: 1px solid #dbebfb;
  border-radius: 16px;

  color: #e4e2ff;
  background-color: #0c0d16;
  font-size: 17px;
  font-family: inherit;
  cursor: pointer;
  outline: 0;
}

.function-btn:enabled:hover {
  background-color: #e4e2ff;
  color: #0c0d16;   
}

.function-btn:enabled:active {
  background-color: #c9c7e5;
  color: #0c0d16;
}

.function-btn:disabled {
  color: rgb(150, 150, 150);
  border-color: rgb(150, 150, 150);
  cursor: not-allowed;
}

#contact-info {
  opacity: 0;
}

#contact-info code {
  font-size: 17px;
}

/* || animation */
@keyframes fade-in-left {
  0% {
    opacity: 0;
    transform: translateX(-24px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in-right {
  0% {
    opacity: 0;
    transform: translateX(24px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in-top {
  0% {
    opacity: 0;
    transform: translateY(-24px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in-bottom {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.fade-in-top {
  animation: fade-in-top 0.6s ease-in-out forwards;
}

.fade-in-bottom {
  animation: fade-in-bottom 0.6s ease-in-out forwards;
}

.fade-in-right {
  animation: fade-in-right 0.6s ease-in-out forwards;
}

.fade-in-left {
  animation: fade-in-left 0.6s ease-in-out forwards;
}

.game-grid-container {
  animation: game-grid-container 0.9s ease-in forwards;
}

@keyframes game-grid-container {
  0% {
    opacity: 0;
    width: 2085px;
    height: 195px;
    left: -675px;
    top: 41px;
  }
  100% {
    opacity: 1;
    width: 695px;
    height: 65px;
    left: 20px;
    top: 106px;
  }
}

@media (max-width: 991px) {
  #game-body {
    display: none;
  }

  #game-error {
    display: block;
  }

  #game-container {
    width: 100%;
    height: 150px;
  }

  h2 {
    margin: 20px 0 18px;

    opacity: 1;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: 34px;
  }

  #link-bar {
    gap: 16px;
  }

  #link-bar a {
    width: 90px;
  }

  #link-bar a span {
    display: none;
  }

  #flag-format {
    font-size: 18px;
  }

  #flag-format code {
    font-size: 19px;
  }

  #game-container {
    width: 80%;
  }

  h2 {
    font-size: 26px;
  }
}

@media (max-width: 575px) {
  h1 {
    font-size: 26px;
  }

  #link-bar a {
    width: 60px;
  }

  #flag-format {
    font-size: 16px;
  }

  #flag-format code {
    font-size: 17px;
  }

  #game-container {
    width: 60%;
    height: 120px;
    border-radius: 12px;

    overflow-y: scroll;
  }

  h2 {
    margin: 16px 0 12px;

    font-size: 20px;
  }

  p {
    font-size: 14px;
  }

  #contact-info code {
    font-size: 15px;
  }
}