* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Bungee", Arial, Helvetica, sans-serif;
  scrollbar-width: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #a3b18a;
  position: relative;
  inset: 0;
  padding: 40px 0;
}

.main {
  width: 90%;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  gap: 45px;
  padding: 45px 0;
  background-color: #dad7cd;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  border-radius: 15px;
}

.board {
  width: 85%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: space-between;
}

.cells {
  width: 30%;
  height: 30%;
  border-radius: 15px;
  background-color: #588157;
  border: none;
  color: white;
  font-size: 55px;
  box-shadow: 0 4px 6px 1px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
  border-bottom: 6px rgba(0, 0, 0, 0.4) inset;
}

.cells:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 10px 2px rgba(0, 0, 0, 0.15);
}

.overlay {
  position: fixed;
  top: 0;
  background-color: rgba(0, 0, 0, 0.5);
  width: 100%;
  min-height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  overflow-y: scroll;
}

.overlay-panel {
  position: absolute;
  top: 0;
  width: 100%;
  min-height: 100%;
  padding: 50px;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.result {
  background-color: #dad7cd;
  width: 90%;
  max-width: 700px;
  padding: 75px 0px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 50px;
  align-items: center;
  border-radius: 45px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}
.result-head {
  font-size: 3rem;
}

.result-msg {
  font-size: 1.5rem;
}

.play-again {
  width: 150px;
  height: 80px;
  font-size: 1.5rem;
  border: none;
  border-radius: 15px;
  background-color: #588157;
  color: white;
  box-shadow: 0 4px 6px 1px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
  position: relative;
  border-bottom: 6px rgba(0, 0, 0, 0.4) inset;
}

.play-again:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 10px 2px rgba(0, 0, 0, 0.15);
}

@media (max-width: 800px) {
  .result-head {
    font-size: 2.5rem;
  }
  .result-msg {
    font-size: 1.25rem;
  }
}

@media (max-width: 540px) {
  .result-head {
    font-size: 1.7rem;
  }
  .result-msg {
    font-size: 1rem;
  }
}

@media (max-width: 350px) {
  .title {
    font-size: 25px;
  }
  .message {
    font-size: 15px;
  }
  .cells {
    font-size: 35px;
  }
  .result-head {
    font-size: 1.25rem;
  }
  .result-msg {
    font-size: 0.75rem;
  }
}
