
/* General */

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

body {
  width: 100vw;
  height: 100vh;

  background-color: rgb(20, 20, 20);
  color: whitesmoke;
  font-family: monospace;
}


/* Choice page */
#choice-page {
  height: 100vh;
  
  display: grid;
  grid-template-rows: 1fr 1fr 6fr 0.2fr;
}

.decision {
  grid-area: 2 / 1 / 3 / 2;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 2rem;
}

.choice-buttons {
  grid-area: 3 / 1 / 4 / 2;

  display: flex;
  justify-content: center;
  align-items: start;

  margin-top: 20px;
}

.choice-start-btn,
#two-player-btn {
  padding: 30px;
  font-size: 2rem;
  cursor: pointer;
  
  background-color: whitesmoke;
  color: rgb(20, 20, 20);
  border: none;
  border-radius: 5px;
}

#two-player-btn {
  margin-right: 40px;
}

.choice-start-btn {
  margin-left: 40px;
}

.choice-footer {
  grid-area: 4 / 1 / 5 / 2;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 1rem;
}

/* First Page */

#start-page {
  height: 100vh;
  
  display: grid;
  grid-template-rows: 1fr 1.5fr 1.5fr 4fr 0.2fr;
}

.p-input1 {
  grid-area: 2 / 1 / 3 / 2;
}

.p-input2 {
  grid-area: 3 / 1 / 4 / 2;
}

.p-input1,
.p-input2,
.start-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#p1-name,
#p2-name {
  padding: 20px;

  border-radius: 5px;

  font-size: 1.3rem;
}

div > label {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.start-btn {
  grid-area: 4 / 1 / 5 / 2;

  display: flex;
  justify-content: start;
  align-items: center;
  flex-direction: column;

  padding-top: 30px;
}

#start-btn { 
  padding: 30px;
  font-size: 2rem;
  cursor: pointer;
  
  background-color: whitesmoke;
  color: rgb(20, 20, 20);
  border: none;
  border-radius: 5px;
}

#start-btn:hover {
  font-size: 2.1rem;
}

.start-footer {
  grid-area: 5 / 1 / 6 / 2;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 1rem;
}

/* Second Page */

#second-page {
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 50px;
}

/* Left */

.left-section {
  grid-area: 1 / 1 / 2 / 2;

  /* border: 1px solid blue; */

  display: grid;
  grid-template-rows: 2.5fr 1fr 2.5fr;
}

#game,
#cpu-game {
  grid-area: 1 / 1 / 2 / 2;
  
  font-size: 3rem;
  padding: 30px;

  display: flex;
  justify-content: center;
  align-items: end;
}

#resetBtn,
#cpu-resetBtn {
  grid-area: 2 / 1 / 3 / 2;

  display: flex;
  justify-content: center;
  align-items: center;
}

#homeBtn,
#cpu-homeBtn {
  grid-area: 3 / 1 / 4 / 2;

  display: flex;
  justify-content: center;
  align-items: start;
}

svg {
  width: 50px;
}

#gridButton,
#cpu-gridButton,
.homeButton { 
  padding: 30px;
  font-size: 3rem;
  cursor: pointer;

  background-color: rgb(20, 20, 20);
  color: whitesmoke;
  border: none;
}

#gridButton:hover,
#cpu-gridButton:hover {
  font-size: 3.1rem;
}



/* Middle */

.middle-section {
  height: 100vh;
  
  grid-area: 1 / 2 / 2 / 3;
  
  /* border: 1px solid blue; */

  display: grid;
  grid-template-rows: 1fr 1fr 6fr 0.2fr;
}

.header {
  grid-area: 1 / 1 / 2 / 2;

  display: flex;
  justify-content: center;
  align-items: center;

  color: rgb(151, 151, 151);
  font-size: 3.5rem;
  font-weight: 700;
}


#turn,
#cpu-turn {
  grid-area: 2 / 1 / 3 / 2;

  display: flex;
  justify-content: center;
  align-items: center;
  
  font-size: 2rem;
  font-weight: 700;
}

#body,
#cpu-body {
  grid-area: 3 / 1 / 4 / 2;

  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  grid-template-rows: repeat(3, minmax(100px, 1fr));

  padding: 50px;
}

.cell-1,
.cell-2,
.cell-3,
.cell-4,
.cell-5,
.cell-6,
.cell-7,
.cell-8,
.cell-9 {
  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 5rem;
  font-weight: 700;

  cursor: pointer;
}

.cell-1 {
  grid-area: 1 / 1 / 2 / 2;

  border-right: 5px solid rgb(151, 151, 151);
  border-bottom: 5px solid rgb(151, 151, 151);
}

.cell-2 {
  grid-area: 1 / 2 / 2 / 3;

  border-right: 5px solid rgb(151, 151, 151);
  border-bottom: 5px solid rgb(151, 151, 151);
}

.cell-3 {
  grid-area: 1 / 3 / 2 / 4;

  border-bottom: 5px solid rgb(151, 151, 151);
}

.cell-4 {
  grid-area: 2 / 1 / 3 / 2;

  border-right: 5px solid rgb(151, 151, 151);
  border-bottom: 5px solid rgb(151, 151, 151);
}

.cell-5 {
  grid-area: 2 / 2 / 3 / 3;

  border-right: 5px solid rgb(151, 151, 151);
  border-bottom: 5px solid rgb(151, 151, 151);
}

.cell-6 {
  grid-area: 2 / 3 / 3 / 4;

  border-bottom: 5px solid rgb(151, 151, 151);
}

.cell-7 {
  grid-area: 3 / 1 / 4 / 2;

  border-right: 5px solid rgb(151, 151, 151);
}

.cell-8 {
  grid-area: 3 / 2 / 4 / 3;

  border-right: 5px solid rgb(151, 151, 151);
}

.cell-9 {
  grid-area: 3 / 3 / 4 / 4;
}

.footer {
  grid-area: 4 / 1 / 5 / 2;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 1rem;
}

/* Right */

.right-section {
  grid-area: 1 / 3 / 2 / 4;

  /* border: 1px solid blue; */

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

  font-size: 2rem;
}

.player,
.computer {
  padding-bottom: 20px;
}

.versus {
  padding: 40px;
}