@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  width: 100vw;
  min-height: 100vh;
  padding: 20px 40px;
  font-family: "Poppins", sans-serif;
  background: #0575e6;
  background: linear-gradient(to right, #0575e6, #021b79);
}
button {
  outline: none;
  border: none;
  font-family: "Poppins", sans-serif;
}

#board {
  display: grid;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: 700;
  grid-template-columns: repeat(3, minmax(8vw, 100px));
  grid-template-rows: repeat(3, minmax(8vw, 100px));
}

.cell {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.1rem;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.4);
}

.cell:hover {
  cursor: default;
}

#board:not(.locked) .cell:empty:hover {
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.28);
}

.main-title {
  position: sticky;
  top: 0;
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  padding: 10px;
  color: white;
}

.sub-title {
  font-size: 1.4rem;
  font-weight: 500;
  color: white;
}

.btn-container {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
}

.btn {
  background-color: rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 1.45rem;
  font-weight: 700;
  padding: 15px 40px;
  border-radius: 30px;
  transition: background-color 0.3s ease;
}

.btn:hover {
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.5);
}

.player-setup-container,
.ai-setup-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 25px 50px;
  border-radius: 30px;
  background-color: rgba(0, 0, 0, 0.25);
}

.player-setup-container label {
  font-size: 1.4rem;
  font-weight: 600;
}

.player-name-inp {
  width: 180px;
  outline: none;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  padding: 10px 20px;
  box-shadow: 0 0 0 0 white;
  transition: 0.3s ease;
}

.player-name-inp:focus {
  box-shadow: 0 0 30px -10px white;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.mark-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  padding: 20px;
  width: 50px;
  height: 50px;
  color: white;
  font-weight: 600;
  background: none;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s ease;
}

.mark-btn.selected {
  background-color: white;
  color: black;
}

#setup-page,
#game-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.player-names-cont {
  display: flex;
  flex-direction: row;
  gap: 30px;
}

.players-setup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

#start-game-btn {
  padding: 15px 60px;
  font-size: 1.4rem;
  font-weight: 800;
  background: white;
  color: black;
  box-shadow: 0 0 0 -5px white;
  transition: box-shadow 0.3s ease;
}

#start-game-btn:hover {
  box-shadow: 0 0 50px -15px white;
}

@keyframes disappear {
  from {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }
  to {
    transform: translateY(250px);
    filter: blur(50px);
    opacity: 0;
  }
}

@keyframes appear {
  from {
    transform: translateY(250px);
    filter: blur(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }
}

.disappear {
  animation: disappear 0.4s ease forwards;
}

.appear {
  animation: appear 0.4s ease forwards;
}

.popup {
  position: fixed;
  bottom: 10%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 80px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 1.3rem;
  background-color: var(--bg-color);
  animation: popup-appear 0.4s ease;
  transition: transform 0.4s ease;
}

@keyframes popup-appear {
  from {
    transform: translateY(400px);
  }
  to {
    transform: translateY(0);
  }
}

.popup.disappear {
  transform: translateY(400px);
}

.ai-btn {
  background-color: transparent;
  border: 1px solid white;
}

.ai-btn.selected {
  background-color: white;
  color: black;
}
