*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  display: grid;
  place-items: center;
  min-height: 100vh;
}

/* message */
.message {
  padding: 1.75rem;
  width: calc(8.4375rem * 3 + 0.75rem * 2);
  background-color: lightblue;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 2.5rem;
}

/* board, cells */
.tictactoe-game {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: #0a0a0a;
  gap: 0.75rem;
}

.cell {
  width: 8.4375rem;
  height: 8.4375rem;
  background-color: #fff;
  cursor: pointer;
}

/* .circle, .cross */
.circle::before,
.cross::before,
.circle-hover::before,
.cross-hover::before {
  content: "\274C";
  font-size: 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.circle::before,
.circle-hover::before {
  content: "\26AB";
}

.circle-hover::before,
.cross-hover::before {
  opacity: 0.3;
  filter: grayscale(100%);
}

/* .overlay */
.overlay {
  max-height: 0px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: #f3f3f3;
  overflow: hidden;
}

.overlay h1 {
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #343434, #ffffff, #111);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btns-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: none;
  outline: none;
  color: #f3f3f3;
  font-size: 1.5rem;
  background-size: 200% auto;
  transition: all 0.5s ease-in-out;
  cursor: pointer;
}

.btn:hover {
  background-position: right;
}

.btn-restart {
  background-image: linear-gradient(
    to right,
    #314755 0%,
    #26a0da 51%,
    #314755 100%
  );
}

.btn-quit {
  background-image: linear-gradient(
    to right,
    #d31027 0%,
    #5c0711 51%,
    #ea384d 100%
  );
}

.overlay.active {
  max-height: 100vh;
}

.highlight {
  background-color: lightblue;
}
