:root {
  --container-color: #ffffff;
  --text-color: #222222;
  --background-color: #f8f8f8;
  --accent-color: linear-gradient(140deg, #065143, #9ad4d6);
}
/* --- css reset --- */

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

/* mobile defaults */
body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  display: grid;
  place-items: center;
}

/*utility classes*/

.container {
  width: 90%;
  max-width: 700px;
  border-radius: 20px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: var(--container-color);
}

.flex {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.frosted {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.highlight {
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 1);
}

.board-locked {
  pointer-events: none;
}

/*header setup*/

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3rem;
  background-color: var(--container-color);
  padding: 0 10%;
  font-size: clamp(0.7rem, 2vw, 1rem);
}

.logo a {
  font-family: "Pacifico", sans-serif;
  background-image: var(--accent-color);
  color: transparent;
  background-clip: text;
}

.logo a:link,
.logo a:visited {
  font-family: "Pacifico", sans-serif;
  background-image: var(--accent-color);
  color: transparent;
  background-clip: text;
  text-decoration: none;
}

.title {
  font-weight: 1000;
}

.portfolio-link {
  font-weight: 500;
}

.back-to-portfolio-link:link,
.back-to-portfolio-link:visited {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 20px;
}

.back-to-portfolio-link:hover {
  color: var(--container-color);
  background-color: var(--text-color);
}

/*container setup*/

#selection-screen {
  text-align: center;
  min-width: 0;
}

#selection-screen h2 {
  padding: 2rem;
  border-bottom: 1px black solid;
}
#selection-buttons {
  padding: 2rem;
  gap: 5vw;
}

#selection-buttons button {
  border: none;
  background-color: var(--text-color);
  color: white;
  border-radius: 20px;
  padding: 1rem;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}
#selection-buttons button:hover {
  cursor: pointer;
  background-color: white;
  color: var(--text-color);
}

#outer-container {
  text-align: center;
  background-color: #dfcec0;
  background-image: radial-gradient(
      at 15% 15%,
      hsla(25, 85%, 70%, 0.3) 0px,
      transparent 50%
    ),
    radial-gradient(at 80% 20%, hsla(330, 55%, 75%, 0.25) 0px, transparent 50%),
    radial-gradient(at 50% 85%, hsla(280, 40%, 60%, 0.2) 0px, transparent 50%);
}

#game-board {
  height: 100%;
  background-color: transparent;
  padding: 0;
}

.cell {
  aspect-ratio: 1/1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10vw;
  border-radius: 10%;
  transition: all 0.3s ease;
}

.cell:not(.x-played):not(.o-played):hover {
  background-color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.x-played {
  color: rgba(47, 79, 79, 0.89);
}

.o-played {
  color: rgba(205, 92, 92, 0.76);
}

#status-display {
  background-color: transparent;
  transition: all 0.3s ease;
  color: white;
  font-weight: 600;
}

#status-display.turn-x {
  background-color: rgba(47, 79, 79, 0.836);
}

#status-display.turn-o {
  background-color: rgba(205, 92, 92, 0.767);
}

#status-display.draw {
  background-color: var(--text-color);
}

/*button setup*/

#reset-button {
  border: none;
  background-color: var(--text-color);
  color: white;
  border-radius: 20px;
  padding: 0.5rem 10vw;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}
#reset-button:hover {
  cursor: pointer;
  background-color: white;
  color: var(--text-color);
}

/*footer setup*/

footer {
  width: 100%;
  background-color: var(--text-color);
  color: #ccc;
  padding: 2rem 1rem;
  text-align: center;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

footer a {
  color: #ccc;
}

.copyright-text {
  font-size: 0.9rem;
  margin: 0;
}

@media (min-width: 1100px) {
  .cell {
    font-size: 7rem;
  }
}
