@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  height: 100vh;
  display: flex;
  padding-bottom: 100px;
  background-color: #1a0d2e;
}

.game-container {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 10vh;
  align-items: center;
  color: #ededed;
}

#score {
  margin-top: 20px;
  font-size: 24px;
  text-align: center;
  margin-bottom: 20px;
}

#grid-container {
  display: grid;
  grid-template-columns: repeat(4, 100px);
  gap: 10px;
}

.game-container h1 {
  position: relative;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.5;
  text-shadow: 5px 5px #883ffc;
  padding: 10px;
}

.tile {
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  background-color: #eee4da;
  border-radius: 10px;
}

.tile-2 {
  background-color: #eee4da;
  color: #776e65;
}
.tile-4 {
  background-color: #ede0c8;
  color: #776e65;
}
.tile-8 {
  background-color: #f2b179;
  color: #ededed;
}
.tile-16 {
  background-color: #f59563;
  color: #ededed;
}
.tile-32 {
  background-color: #f67c5f;
  color: #ededed;
}
.tile-64 {
  background-color: #f65e3b;
  color: #ededed;
}
.tile-128 {
  background-color: #edcf72;
  color: #ededed;
}
.tile-256 {
  background-color: #edcc61;
  color: #ededed;
}
.tile-512 {
  background-color: #edc850;
  color: #ededed;
}
.tile-1024 {
  background-color: #edc53f;
  color: #ededed;
}
.tile-2048 {
  background-color: #edc22e;
  color: #ededed;
}

#message-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1a0d2e;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 2;
}

#message {
  font-size: 32px;
  color: #ededed;
  margin-bottom: 20px;
}

#retry-button {
  padding: 10px 20px;
  font-size: 20px;
  font-family: inherit;
  background-color: #8f7a66;
  color: #ededed;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background-color: #1a0d2e;
  transition: transform 0.5s ease-in-out;
}

.header.hide-header {
  transform: translateY(-100%);
  transition: transform 0.5s ease-out;
}

.converter {
  margin-top: 10vh;
  display: flex;
  text-align: center;
  justify-content: center;
  padding-top: 80px;
}

.logo {
  position: relative;
  font-size: 25px;
  color: #ededed;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.navbar a {
  font-size: 18px;
  color: #ededed;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.navbar {
  position: relative;
  display: flex;
  justify-content: right;
  flex-wrap: wrap;
  row-gap: 12px;
  column-gap: 35px;
}

.navbar a:hover,
.navbar a.active {
  color: #883ffc;
}

.game-container h1::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #1a0d2e;
  animation: showRight 1s ease forwards;
  animation-delay: 0.4s;
}

.game-container::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #1a0d2e;
  animation: showRight 3s ease forwards;
}

@keyframes showRight {
  100% {
    width: 0%;
  }
}

.proj-drop {
  position: relative;
  display: inline-block;
}

.proj-items {
  padding: 6px;
  border-radius: 5px;
  background-color: #2b1057;
}

.proj-item {
  white-space: nowrap;
}

.drop-area {
  position: absolute;
  display: none;
}

.proj-drop:hover .drop-area {
  display: block;
  padding-top: 6px;
}

.header.hide-header {
  transform: translateY(-100%);
  transition: transform 0.5s ease-in-out;
}

.footer {
  font-size: 24px;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  padding-right: 30px;
  padding-bottom: 25px;
  text-align: right;
  color: #ededed;
  text-decoration: none;
}

.github a:hover,
.github a.active {
  color: #883ffc;
}

.github a {
  transition: 0.3s;
  color: #ededed;
  width: 25;
}

.github-btn {
  background-color: #361664;
  height: 50px;
  width: 50px;
  border-radius: 50%;
  border-color: transparent;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: #ededed;
  -webkit-transition: all 0.3 ease-in-out;
  transition: all 0.3 ease-in-out;
}

@media (max-width: 900px) {
  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .navbar {
    position: fixed;
    left: -100%;
    top: 70px;
    gap: 0;
    flex-direction: column;
    background-color: #1a0d2e;
    width: 100%;
    text-align: center;
    transition: 0.3s;
  }

  .nav-item {
    margin: 16px 0;
  }

  .navbar.active {
    left: 0;
  }

  .proj-drop:hover .drop-area {
    display: block;
  }

  .drop-area {
    position: absolute;
    display: none;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    padding-top: 6px;
    background-color: #1a0d2e;
  }

  .proj-items {
    padding: 6px;
    border-radius: 5px;
    background-color: #2b1057;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .proj-item {
    white-space: nowrap;
  }
}
