* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  width: 100%;
  background-color: #3a1078;
  background: linear-gradient(to bottom, #5135ac 50%, #3a1078 100%);
  font-family: "Merriweather", serif;
  font-weight: 400;
  font-style: normal;
  color: #fff;
  margin-bottom: 20px;
}

header {
  color: #ffb200;
}

header > h1 {
  text-align: center;
  padding: 10px;
  font-family: "Nosifer", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 60px;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#userInputDialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #3a1078;
  padding: 1.5rem;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  z-index: 1000;
  color: #3a1078;
  width: 25%;
}

form {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.dialog-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

form > p {
  text-align: center;
  font-size: 19px;
}

.fieldInput {
  padding: 10px;
  width: 100%;
}

label,
input {
  display: block;
  margin: 5px;
}

input {
  width: 95%;
  border: 2px solid #ffb200;
  height: 28px;
  border-radius: 5px;
}

#submit-btn {
  width: 120px;
  height: 35px;
  background-color: #ffb200;
  color: #3a1078;
  border-radius: 10px;
  border: 1px solid #3a1078;
  cursor: pointer;
  font-size: 18px;
}

#submit-btn:hover {
  color: #ffb200;
  background: #3a1078;
  border: 1px solid #ffb200;
  transition: ease-in 0.3s;
}

.error-msg {
  font-size: 10px;
  color: red;
  text-align: center;
  padding: 5px;
}

#userInputDialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

#table-section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

table {
  border: 2px solid #fff;
  border-collapse: collapse;
  width: 500px;
}

th,
td {
  border: 1px solid #fff;
  padding: 8px;
  text-align: left;
}

#board-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
}

.board {
  display: grid;
  height: 500px;
  width: 500px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  border: 1px solid grey;
  gap: 8px;
  padding: 8px;
  background: #4e31aa;
}

.cell {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 5rem;
  border: 1px solid grey;
  background: #3a1078;
  cursor: pointer;
  border-radius: 12px;
  font-family: "Lacquer", system-ui;
  font-weight: 700;
  font-style: normal;
}

.turn,
.winner {
  padding: 10px;
}

.reset-btns {
  display: flex;
  justify-content: center;
  align-items: center;
}

.reset-btn {
  margin: 5px;
  width: 247px;
  height: 35px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  color: #3a1078;
  border: 1px solid #3a1078;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: fixed;
  bottom: 0;
  background: #ffb200;
  width: 100%;
  padding: 5px;
  color: #3a1078;
}

small > p > a {
  color: #3a1078;
}

@media only screen and (max-width: 760px) {
  html,
  body {
    margin-bottom: 20px;
  }
  #userInputDialog {
    width: 80%;
  }
  header > h1 {
    font-size: 40px;
    margin-bottom: 10px;
  }
  form > p {
    font-size: 18px;
  }
  table {
    width: 90%;
  }
  .board {
    width: 90%;
    gap: 5px;
    padding: 5px;
    height: 400px;
  }
  .reset-btns {
    flex-direction: column;
    width: 100%;
  }
  .reset-btn {
    width: 90%;
    margin-bottom: 5px;
  }
}
