:root{
    --light-color: #CECEDF;
    --dark-color: #1C2541;
    --signature-color: #E34A6F;
    --winning-color: #5CFFB3;
}

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

body {
  background-color: var(--light-color);
  font-family: Roboto, Arial, Helvetica, sans-serif;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vw;
  height: 100vh;
  text-align: center;
}

main {
  padding: 2rem;
  width: 90%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.player-1-score,
.player-2-score{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 20%;
  gap: 0.8rem;
}


.grid-map {
  width: 60%;
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  align-items: center;
}

.grid {
  width: 8rem;
  height: 8rem;
  border: 5px solid var(--dark-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid:first-child,
.grid:nth-child(2),
.grid:nth-child(3) {
  border-top: none;
  border-top-left-radius: 0.75rem;
}

.grid:first-child,
.grid:nth-child(4),
.grid:nth-child(7) {
  border-left: none;
  border-bottom: none;
  border-right: none;
  border-top-left-radius: 0.75rem;
}

.grid:nth-child(2),
.grid:nth-child(5),
.grid:nth-child(8) {
  border-bottom: none;
  border-right: none;
}

.grid:nth-child(8),
.grid:nth-child(9) {
  border-bottom-left-radius: 0.75rem;
}

.grid:nth-child(3),
.grid:nth-child(6),
.grid:nth-child(9) {
  border-bottom: none;
  border-right: none;
  border-top-right-radius: 0.75rem;
}


i{
    color: var(--signature-color);
}

h1{
    font-weight: 900;
}

p{
    font-size: 2rem;
}

.btn{
    padding: 0.8rem 1.5rem;
    border: 0.25rem solid var(--dark-color);
    border-radius: 1rem;
    background-color: var(--light-color);
    color: var(--dark-color);
    font-weight: 550;
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
    transition-duration: 0.4s;
    font-size: 1.5rem;
    margin-top: 1rem;
}

.btn:hover{
    border: 4px solid var(--signature-color);
    color: var(--signature-color);
    cursor: pointer;
}


.btn:active{
    color: var(--dark-color);
    border: 4px solid var(--dark-color);
}

input{
    background-color: var(--light-color);
    border: none;
    font-size: 1.5rem;
    min-width: 12ch;
    width: 12ch;
    text-align: center;
}

.hide{
    color: var(--light-color);
}

.green{
    transition-duration: 0.4s;
    color: var(--winning-color);
}

.fa-github{
  padding-top: 0.5rem;
  color: var(--dark-color);
}

.fa-github:hover{
  color: var(--signature-color);
  cursor: pointer;
}



/* Responsive design */
/* Default html font-size is 16px */
/* rem is 16px * value
1.5 rem = 16 * 1.5 = 24px 
So for responive design */
@media only screen and (max-width: 870px) {

    html { 
        font-size: 12px;
    }

  }


  @media only screen and (max-width: 610px) {

    html { 
        font-size: 12px;
    }

    /* Rearrange main to use grid areas */
    main {
        display: grid;
        justify-content: center;
        grid-template-areas: 
        "grid grid"
        "playerOneArea playerTwoArea";
        gap: 2rem;
    }

      .grid-map{
          justify-self: center;
          grid-area: grid;
      }

      .player-1-score{
          width: fit-content;
          justify-self: right;
          grid-area: playerOneArea;
      }

      .player-2-score{
        width: fit-content;
        grid-area: playerTwoArea;
    }

  }
/* 
  @media only screen and (max-width: 420px) {

    html { 
        font-size: 5px;
    }

  } */