body {
  background-color: var(--primary-color);
  margin: 0;
  padding: 0;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background-color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.75rem;
  color: white;
  text-align: left;
  width: 960px;
  font-weight: normal;
  margin-bottom: 8px;
  margin-top: 32px;
}

h3 {
  font-size: 1.25rem;
  color: var(--quinary-color);
  text-align: left;
  width: 960px;
  font-weight: bold;
  margin-bottom: 0px;
  margin-top: 8px;
}

p {
  font-size: 1.125rem;
  margin-bottom: 15px;
  text-align: justify;
  width: 960px;
  color: white;
}

p,
h2,
h3 {
  width: 100%;
  max-width: 960px;
}

#project-details {
  width: 100%;
  max-width: 960px;
  align-items: center;
  display: flex;
  flex-direction: column;
}

#project-details p {
  text-align: center;
  margin-top: 0px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tag.cplusplus {
  background-color: #1e54ab;
}

.tag.vs {
  background-color: #2f99db;
}

.tags-container .tag {
  width: auto;
  display: inline-block;
  text-align: center;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: filter 0.3s ease;
}

.tags-container .tag:hover {
  filter: brightness(1.2);
  cursor: pointer;
}

#game-board {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 5px;
  background-color: #fafafa;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  position: relative;
  width: 100%;
  border: 12px solid white;
  max-width: 600px;
}

#status {
  font-size: 1.5rem;
  color: white;
  margin-top: 10px;
  margin-bottom: 10px;
}

#reset-btn {
  padding: 12px 48px;
  padding-left: 24px;
  font-size: 0.9rem;
  font-weight: bold;
  background-color: var(--quaternary-color);
  color: var(--darker-grey);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s ease, box-shadow 0.3s,
    color 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  position: relative;
}

#reset-btn:hover {
  background-color: var(--dark-grey);
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
  color: white;
}

#reset-btn::before {
  content: "";
  position: absolute;
  right: 18px;
  width: 20px;
  height: 20px;
  top: 10px;
  background-image: url("../../img/restart_icon.webp");
  background-size: contain;
  background-repeat: no-repeat;
  filter: invert(90%);
  transition: filter 0.3s ease;
}

#reset-btn span {
  z-index: 1;
}

#reset-btn:hover {
  background-color: var(--dark-grey);
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
  color: white;
}

#reset-btn:hover::before {
  filter: invert(0%);
}

#reset-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.4);
}

#start-selection button {
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
}

#start-selection button:hover {
  background-color: #ddd;
}

#start-selection {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  color: white;
}

#start-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

#start-selection label {
  font-size: 1.2rem;
  color: white;
}

#first-player-toggle {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 50px;
  height: 25px;
  background-color: #ccc;
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

#first-player-toggle:before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

#first-player-toggle:checked {
  background-color: var(--quaternary-color);
}

#first-player-toggle:checked:before {
  transform: translateX(25px);
}

.cell {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  background-color: var(--dark-grey);
  border: 4px solid white;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s ease;
}

.cell:hover {
  background-color: var(--darker-grey);
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.cell .mark {
  animation: scaleIn 0.3s ease forwards;
  font-size: 3rem;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.cell.X .mark {
  color: #ff5733;
}

.cell.O .mark {
  color: #33aaff;
}
