/* global styles */
@import url("https://fonts.googleapis.com/css2?family=Monoton&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Monoton&family=Orbitron:wght@400..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

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

:root {
  --font-color: white;
  --font-family: Orbitron;
  --bg-image: url(/images/background.jpg);
  --neon-green-color: #39ff14;
  --x-color: hsl(313, 100%, 50%);
  --o-color: #00d4ff;
}

body {
  font-family: var(--font-family);
  background-image: var(--bg-image);
  background-size: cover;
}

/* main styles starts here  */

header {
  display: flex;
  /* flex-direction: column; */
  justify-content: center;
  align-items: center;
  /* padding: 1.1em; */
  /* gap: 0.8em; */
  background-color: none;
  color: var(--neon-green-color);
}

.heading h1 {
  font-family: monoton;
  font-size: 3rem;
  font-weight: 700;
}

.game-board {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.score-board {
  color: white;
  display: flex;
  gap: 10px;
  position: absolute;
  top: 20%;
  left: 15%;
  flex-direction: column;
  border: 2px solid white;
  padding: 1rem;
  border-radius: 8px;
  text-align: left;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.score-board table {
  width: 100%;
  text-align: center;
  border-collapse: collapse;
}

.score-board th,
.score-board td {
  border: 1px solid #ccc;
  padding: 8px 12px;
}

.score-board th {
  background-color: #ddd;
  color: black;
}

.game-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-top: -1rem;
}
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  margin: 20px;
  border: 6px solid var(--neon-green-color);
}
.cells {
  font-size: 4rem;
  width: 150px;
  height: 150px;
  border: 2px solid var(--neon-green-color);
  background-color: #1e1e1e;
}

.cells:hover {
  background-color: rgb(246, 225, 228);
  background-color: rgba(57, 255, 20, 0.4);
}

#display-heading {
  padding: 8px 80px;
  border: 3px solid black;
  background-color: rgb(0, 0, 0);
  color: white;
  font-weight: 700;
  font-family: var(--font-family);
  margin-top: 1rem;
  border-radius: 8px;
}

.x,
.o {
  font-size: 4.5rem;
  font-weight: 600;
}

.x {
  color: var(--x-color);
}
.o {
  color: var(--o-color);
}

@media (max-width: 500px) {
  .heading h1 {
    font-size: 1.8rem;
    font-weight: 500;
  }

  .game-grid {
    margin-top: 40px;
    border: 2px solid var(--neon-green-color);
  }

  .cells {
    width: 120px;
    height: 120px;
    border: 2px solid var(--neon-green-color);
  }
  #display-heading {
    padding: 6px 50px;
    font-size: 1.6rem;
    margin-top: 0.6rem;
  }
  .x,
  .o {
    font-size: 2.8rem;
  }
    .score-board {
    /* margin-top: 20px; */
    position: static;
    padding: 0.5rem;
    margin: 20px;
  }
  .score-board h1 {
    font-size: 1.4rem;
    text-align: center;
  }
  .score-board th,
  .score-board td {
    border: 1px solid #ccc;
    padding: 4px 8px;
  }
}
