/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic (CALLED IN ANOTHER FILE)
	- Normalize
	- Box sizing
	- Media width
# Base
	- Typography
	- Elements
	- Links
# Layouts
# Components
	- Header
	- Main
	- Footer
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/

/* Typography
--------------------------------------------- */
body {
  background-color: #03011e;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  /* line-height: 1.5; */
  color: #a2a2af;
}

.wrapper {
  margin: 0 auto;
  height: 100vh;
  /* display: flex;
  flex-direction: column; */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "League Spartan", Arial, Helvetica, sans-serif;
  font-size: 1.3rem;
  text-align: center;
  color: #d9d9e5;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  margin-top: 3.2rem;
  margin-bottom: 1rem;
  font-size: 2rem;
}

h3 {
  font-weight: 600;
  margin: 0.5rem 1rem;
}

p {
  margin: 0.5rem auto;

  font-size: 1.3rem;
  text-align: center;
  color: #d9d9e5;
}

/* Elements
--------------------------------------------- */
table {
  border-collapse: collapse;
}

table td {
  border: 12px solid #4a495a;
  border-collapse: collapse;
}

table tr:first-child td {
  border-top: 0;
}
table tr:last-child td {
  border-bottom: 0;
}
table tr td:first-child {
  border-left: 0;
}
table tr td:last-child {
  border-right: 0;
}

form {
  margin: 0 auto;
}

button {
  cursor: pointer;
}
/* Links
--------------------------------------------- */
a,
a:visited,
a:focus {
  color: #2c2520;
  text-decoration: none;
}

/*--------------------------------------------------------------
# Layout
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/

/* Header
--------------------------------------------- */
#header {
  height: 8rem;
  position: relative;
}

.favicon {
  width: 4rem;
  margin: 2rem auto;
  position: absolute;
  left: 0;
  right: 0;
  cursor: pointer;
}

/* 430px */
@media (min-width: 26.875em) {
  #header {
    height: 11rem;
  }

  .favicon {
    width: 6rem;
    margin-top: 3rem;
  }
}

/* 1700px */
@media (min-width: 106.25em) {
  #header {
    height: 13rem;
  }

  .favicon {
    width: 7rem;
    margin-top: 4rem;
  }
}
/* Main
--------------------------------------------- */
main {
  max-width: 80%;
  margin: 0 auto;
  flex-grow: 1;
}

/* starting page */
.heading-starting-page {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

#tic {
  color: #7cc1eb;
  margin-top: 0;
}

#tac {
  color: #ffa37f;
  margin: auto 1rem;
  margin-top: 0;
}

#toe {
  color: #ca7fff;
  margin-top: 0;
}

/* 1st page btn */
.game-setting {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.game-setting button {
  /* display: block; */
  border: none;
  border-radius: 50px;
  width: 15.5rem;
  height: 3.7rem;
  margin-top: 1.2rem;
  font-weight: 600;
  text-transform: capitalize;
}

.play-with-computer {
  margin-bottom: 3.5rem;
}

/* 1st page btn */
.btn-grad {
  background-image: linear-gradient(
    to right,
    #02aab0 0%,
    #00cdac 51%,
    #02aab0 100%
  );
  margin: 10px;
  padding: 15px 45px;
  text-align: center;
  text-transform: uppercase;
  transition: 0.5s;
  background-size: 200% auto;
  color: white;
  display: block;
}

.btn-grad:hover {
  background-position: right center; /* change the direction of the change here */
  color: #fff;
  text-decoration: none;
}

/* other pages btn */
.btn {
  cursor: pointer;
  background-image: linear-gradient(
    to right,
    #4776e6 0%,
    #8e54e9 51%,
    #4776e6 100%
  );
  margin: 10px;
  padding: 15px 45px;
  text-align: center;
  text-transform: uppercase;
  transition: 0.5s;
  background-size: 200% auto;
  color: white;
  border-radius: 50px;
  display: block;
}

.btn:hover {
  background-position: right center; /* change the direction of the change here */
  color: #fff;
  text-decoration: none;
}

/* submit names pages*/
.submit-names,
.submit-name-computer {
  display: none;
}

.submit-names h2,
.submit-name-computer h2 {
  margin: 2rem auto;
}

.friends-form img,
.computer-form img {
  display: block;
  width: 3.5rem;
  margin-right: 1rem;
}

.computer-form img {
  width: 4rem;
  margin: 2.5rem auto 3rem auto;
}

.friends-form-input {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2.5rem;
}

.submit-names form,
.submit-name-computer form {
  margin: 1rem auto;
}

input {
  border-radius: 50px;
  height: 2.5rem;
  width: 11rem;
}
/* type name placeholder */
input[type="text"].check-required:required + span:after {
  margin-top: 0;
  content: "Required!";
  color: #d9d9e5;
}
/* start game btn */
input[type="button"] {
  margin: 3.5rem auto;
  border: none;
  width: 15rem;
  height: 3.5rem;
}

input[value="Start"] {
  font-family: "League Spartan", Arial, Helvetica, sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: white;
}
/* -------- game page ----------------------------------------*/
.players {
  display: flex;
  justify-content: center;
  align-items: center;
  display: none;
  width: 100vw;
}

.players img {
  width: 4rem;
  margin: 0 1rem 0.5rem 1rem;
}

.player-combo {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.player-combo h2 {
  font-size: 1.6rem;
  margin: auto;
}

.player-one-score,
.player-one-score-com {
  margin: auto 1.25rem auto 0.5rem;
}

.player-two-score,
.player-two-score-com {
  margin: auto 0.5rem auto 1.25rem;
}

.player-one-score,
.player-two-score,
.player-one-score-com,
.player-two-score-com {
  font-weight: 600;
}

.cross-player-one,
.circle-player-two,
.cross-player,
.circle-computer-player {
  margin: 0 2rem;
  flex: 1 1 0px;
}

.cross-player-one,
.cross-player {
  text-align: right;
}

.circle-player-two,
.circle-computer-player {
  text-align: left;
}

#game-end-choices {
  display: none;
  flex-direction: column;
  width: 17rem;
  height: 5rem;
  margin: auto;
  position: absolute;
  top: 24rem;
  left: 0;
  right: 0;
  justify-content: center;
  transition: opacity 1.5s;
  opacity: 0;
  z-index: 100;
}

#game-end-choices h2 {
  font-size: 1.5rem;
  border-radius: 50px;
  margin: 0 auto;
}

.blur-bg {
  display: none;
  position: absolute;
  background-color: #03011e9c;
  -webkit-filter: blur(20px);
  top: 16rem;
  left: 0;
  right: 0;
  width: 100vw;
  height: 18.5rem;
  z-index: 90;
}

#game-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#game-page td {
  width: 10rem;
  height: 6rem;
  position: relative;
}

#game-status {
  display: none;
  transition: opacity 0.5s;
  opacity: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 18rem;
  z-index: 100;
}

#game-status h2 {
  font-size: 2rem;
  margin-top: 1rem;
  color: #b087f4;
  text-shadow: #333232 4px -1px 7px;
}

.gameboard {
  margin: 2rem auto 2.5rem auto;
  position: relative;
  display: none;
}
.circle-mark,
.cross-mark {
  margin: auto;
  display: block;
  transition: opacity 0.3s;
  opacity: 0;
  position: absolute;
  top: 1rem;
  left: 0;
  right: 0;
  max-width: 3.5rem;
}

.win-line {
  position: absolute;
  /* display: none; */
}

/* 430px  height: 932px */
@media (min-width: 26.875em) {
  h1 {
    font-size: 3.5rem;
  }

  .game-setting button {
    width: 19rem;
    height: 5rem;
    font-size: 1.4rem;
    margin-top: 1.2rem;
  }
}

/* 1400px height: 960px*/
@media (min-width: 87.5em) {
  h1 {
    font-size: 5rem;
  }

  .game-setting button {
    width: 24rem;
    height: 6rem;
    font-size: 1.8rem;
    margin-top: 2.6rem;
  }

  #tic,
  #tac,
  #toe {
    margin-bottom: 0.5rem;
  }

  /* type names */
  .submit-names h2,
  .submit-name-computer h2 {
    margin: 2rem auto;
    font-size: 3.5rem;
  }

  .friends-form img,
  .computer-form img {
    display: block;
    width: 4.5rem;
    margin-right: 2rem;
  }

  .computer-form img {
    width: 6rem;
    margin: 2.5rem 2rem 3rem auto;
  }

  .friends-form-input {
    margin-top: 3rem;
  }

  /* type name placeholder */
  input {
    height: 3rem;
    width: 19rem;
  }

  /* start game btn */
  input[type="button"] {
    margin: 4rem auto;
    border: none;
    width: 25rem;
    height: 4.3rem;
  }

  input[value="Start"] {
    font-family: "League Spartan", Arial, Helvetica, sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: white;
  }

  /* game page */
  .players img {
    width: 6rem;
    margin: 0 1rem 1.5rem 1rem;
  }

  .player-combo h2 {
    font-size: 2.6rem;
  }

  .player-one-score,
  .player-one-score-com {
    margin: auto 2rem auto 2.5rem;
  }

  .player-two-score,
  .player-two-score-com {
    margin: auto 2.5rem auto 2rem;
  }

  .player-one-score,
  .player-two-score,
  .player-one-score-com,
  .player-two-score-com {
    font-size: 3rem;
  }

  .cross-player-one,
  .circle-player-two,
  .cross-player,
  .circle-computer-player {
    margin: 0 2rem;
  }

  #game-end-choices {
    width: 25rem;
    height: 16rem;
    margin: auto;
    top: 36rem;
  }

  #game-end-choices h2 {
    font-size: 2.8rem;
    font-weight: 600;
  }

  #back-to-homepage {
    margin-top: 2.5rem;
  }

  .blur-bg {
    top: 22.5rem;
    height: 35.5rem;
  }

  #game-page td {
    width: 12rem;
    height: 11rem;
  }

  #game-status {
    top: 30rem;
  }

  #game-status h2 {
    font-size: 3rem;
    margin-top: 1rem;
  }

  .gameboard {
    margin: 3rem auto 2.5rem auto;
  }
  .circle-mark,
  .cross-mark {
    top: 2rem;
    left: 0;
    right: 0;
    max-width: 6rem;
  }
}

/* 1700px */
@media (min-width: 106.25em) {
  h1 {
    font-size: 5.1rem;
  }

  .game-setting button {
    width: 25rem;
    height: 6.5rem;
    font-size: 1.8rem;
    margin-top: 2.6rem;
  }

  #tic,
  #tac,
  #toe {
    margin-bottom: 1rem;
  }
  /* type names */
  .submit-names h2,
  .submit-name-computer h2 {
    margin: 2rem auto;
    font-size: 4.5rem;
  }

  .friends-form img,
  .computer-form img {
    display: block;
    width: 6rem;
    margin-right: 3.5rem;
  }

  .computer-form img {
    width: 7rem;
    margin: 2.5rem 2rem 3rem auto;
  }

  .friends-form-input {
    margin-top: 4rem;
  }

  /* type name placeholder */
  input {
    height: 4rem;
    width: 23rem;
    font-size: 1.5rem;
  }

  /* start game btn */
  input[type="button"] {
    margin: 5.5rem auto;
    border: none;
    width: 33rem;
    height: 5.3rem;
  }

  input[value="Start"] {
    font-family: "League Spartan", Arial, Helvetica, sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: white;
  }
  /* game page */
  .players img {
    width: 8rem;
    margin: 0 1rem 1.5rem 1rem;
  }

  .player-combo h2 {
    font-size: 4rem;
  }

  .player-one-score,
  .player-one-score-com {
    margin: auto 3rem auto 3.5rem;
  }

  .player-two-score,
  .player-two-score-com {
    margin: auto 3.5rem auto 3rem;
  }

  .player-one-score,
  .player-two-score,
  .player-one-score-com,
  .player-two-score-com {
    font-size: 4.5rem;
  }

  .cross-player-one,
  .circle-player-two,
  .cross-player,
  .circle-computer-player {
    margin: 0 2rem;
  }

  #game-end-choices {
    width: 31rem;
    height: 17rem;
    margin: auto;
    top: 42rem;
  }

  #game-end-choices h2 {
    font-size: 3rem;
    font-weight: 600;
  }

  #back-to-homepage {
    margin-top: 3.5rem;
  }

  .blur-bg {
    top: 29.5rem;
    height: 40.5rem;
  }

  #game-page td {
    width: 15rem;
    height: 13rem;
  }

  #game-status {
    top: 34rem;
  }

  #game-status h2 {
    font-size: 3.5rem;
    margin-top: 1rem;
  }

  .gameboard {
    margin: 3rem auto 3.5rem auto;
  }
  .circle-mark,
  .cross-mark {
    top: 2rem;
    left: 0;
    right: 0;
    max-width: 8rem;
  }
}

/* Footer
--------------------------------------------- */
footer {
  padding: 2.3rem 0;
  background-color: #120e40;
  bottom: 0;
  margin-top: 2rem;
  /* position: fixed; */
  left: 0;
  right: 0;
}

.copyright p {
  text-align: center;
  margin: auto;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 200;
  line-height: 1.4rem;
}

/* 1400px */
@media (min-width: 87.5em) {
  .copyright p {
    font-size: 1.2rem;
    line-height: 2rem;
  }
}

/* 1700px */
@media (min-width: 106.25em) {
  .copyright p {
    font-size: 1.4rem;
  }
}
