/* Tic Tac Toe stylesheet*/

html {
  font-size: 62.7%;
}

body {
  font-family: "Montserrat", monospace;
  background-color: #fff;
  color: #34495e;
  margin: 2rem 0;
}

li,
ul,
a,
i,
nav,
body,
html,
*,
*:after,
*:before {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -khtml-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  margin: 0;
}

.heading-and-score {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

h1 {
  margin: 1rem auto;
  text-align: center;
  font-size: 4rem;
}

.player {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.player span:nth-child(2) {
  font-size: 1.5rem;
  font-weight: 700;
}

@media (max-width: 500px) {
  h1 {
    font-size: 2rem;
    letter-spacing: 3px;
    word-spacing: 5px;
  }
}

.round-stat-holder {
  display: flex;
  justify-content: center;
  align-items: center;
}

.round-stat {
  position: relative;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  word-spacing: 5px;
  color: #fff;
  background: #34495e;
  overflow: hidden;
  display: inline-block;
  padding: 5px;
  margin: auto;
  transform: skew(-16deg);
  border-radius: 1px;
  border: 1px solid black;
}

.round-stat:before {
  position: absolute;
  content: "";
  display: inline-block;
  width: 30%;
  height: 10%;
  top: 42%;
  left: -29%;
  background-image: linear-gradient(to right, #fff, #eee);
  transform: rotate(-70deg);
  animation: shine 3s ease-out infinite;
}

table {
  border: 0;
  margin: 3rem auto;
  text-align: center;
}

tr {
  height: 10rem;
}

td {
  width: 10rem;
  border: 0;
  font-size: 7rem;
  font-weight: 500;
}

.ver {
  border-left: 1px solid #7f8c8d;
  border-right: 1px solid #7f8c8d;
}

.hor {
  border-top: 1px solid #7f8c8d;
  border-bottom: 1px solid #7f8c8d;
}

.result {
  text-align: center;
  margin-top: 40px;
}

.reset {
  text-align: center;
  font-size: 1.5rem;
  margin-top: 25px;
}

button {
  position: relative;
  font-family: "Montserrat", monospace;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 3px;
  outline: none;
  background-color: #fff;
  color: #34495e;
  border: 1px solid #777;
  border-radius: 5px;
  padding: 1.5rem 2.5rem;
  cursor: pointer;
  transition: all 0.3s;
}

button:after {
  content: "Change Turn";
  position: absolute;
  font-size: 1rem;
  padding: 5px;
  color: #fff;
  font-weight: 300;
  background: #34495e;
  top: 90%;
  left: 50%;
  transform: translate(-50%, 0%) skew(-10deg);
}

button:hover {
  outline: none;
  background-color: #34495e;
  color: #fff;
}

button:active {
  outline: none;
  background-color: #34495e;
  color: #fff;
  transform: translateY(5px) scale(0.9);
}

main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hide {
  display: none;
  opacity: 0;
  visibility: hidden;
}

@keyframes backforth {
  0% {
    left: 30%;
    width: 0;
  }
  25% {
    width: 30%;
  }
  50% {
    left: 70%;
    width: 0;
  }
  75% {
    width: 30%;
  }
  100% {
    left: 30%;
    width: 0;
  }
}

.stat {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.stat:before {
  position: absolute;
  content: "";
}

.turn {
  position: absolute;
  text-align: center;
  letter-spacing: 2px;
  display: inline-block;
  top: -61%;
  left: 18%;
  background: #34495e;
  color: #fff;
  padding: 5px 5px 10px 5px;
  transition: all 0.3s;
  -webkit-clip-path: polygon(
    0 0,
    100% 0,
    100% 80%,
    60% 80%,
    50% 100%,
    40% 80%,
    0 80%
  );
  clip-path: polygon(0 0, 100% 0, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0 80%);
}

.stat div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.player-name {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.win-note {
  position: relative;
}

.win-note:after {
  z-index: -1;
  content: "";
  position: absolute;
  display: inline-block;
  width: 100%;
  height: 100%;
  bottom: 0;
  right: 0;
  background: #34495e77;
  transform: scale3d(0, 0, 0);
  animation: updation 1s ease-in-out;
  animation-iteration-count: 2;
}

.player-score {
  font-size: 3rem;
  font-weight: 700;
  margin-top: 5px;
  letter-spacing: 3px;
}

@keyframes shine {
  0% {
    left: -29%;
    opacity: 1;
  }

  75% {
    left: 95%;
    opacity: 0;
  }

  100% {
    left: -29%;
    opacity: 0;
  }
}

@keyframes updation {
  0% {
    transform: scale3d(1, 0, 0);
    transform-origin: bottom;
  }

  50% {
    transform: scale3d(1, 1, 1);
    transform-origin: bottom;
  }

  51% {
    transform-origin: top;
  }

  100% {
    transform: scale3d(1, 0, 0);
    transform-origin: top;
  }
}

@media only screen and (min-width: 500px) {
  body {
    padding: 3rem 2rem 10rem;
    width: 450px;
    margin: 6rem auto;
    border-radius: 1rem;
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.3);
  }
}
