/* ===========Reset=========== */
* {
  margin: 0;
  box-sizing: inherit;
  outline: none;
}
html {
  box-sizing: border-box;
}
body {
  text-align: center;
  font-family: "Open Sans", sans-serif;
}
/*====================== Header ================*/
a {
  text-decoration: underline;
  color: #99cc66;
}
a:hover {
  text-decoration: none;
}
nav {
  background-color: #663399;
  color: white;
  padding: 4px;
  position: relative;
  z-index: 1;
}
/*================== Game ===============*/
#level-container {
  width: 150px;
}
select {
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 1.2em;
}
/*---------- Board---------- */
#game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 63vh;
}
#container1 {
  width: 360px;
  margin: auto;
  height: 360px;
  position: relative;
}

.case {
  float: left;
  width: 120px;
  height: 120px;
  user-select: none;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
}

.vlines,
.hlines {
  width: 120px;
  height: 100%;
  position: absolute;
  /* background-color: rosybrown; */
  left: 120px;
  pointer-events: none;
}

.hlines {
  transform: rotate(90deg);
}
.hlines::before,
.vlines::before,
.hlines::after,
.vlines::after {
  content: "";
  display: block;
  width: 10px;
  height: 0;
  position: absolute;
  background-color: #663399;
  border-radius: 100px;
  animation: kiko 1.2s ease-out;
  animation-delay: 1.2s;
  animation-fill-mode: forwards;
}

.hlines::after,
.vlines::after {
  right: -5px;
}
.hlines::before,
.vlines::before {
  left: -5px;
}

@keyframes kiko {
  from {
    height: 0;
  }
  to {
    height: 100%;
  }
}

/* Game Over Window */
#gameOver {
  position: absolute;
  backdrop-filter: blur(4px);
  /* backdrop-filter: brightness( 
    60%
  );*/
  /* backdrop-filter: contrast( 
    60%
  ); */
  /* backdrop-filter: drop-shadow(4px 4px 10px blue); */

  /* backdrop-filter: grayscale(75%); */

  /* backdrop-filter: hue-rotate(120deg); */

  /* backdrop-filter: invert(60%); */

  /* backdrop-filter: opacity(10%); */

  /* backdrop-filter: sepia(100%); */

  /* backdrop-filter: saturate(20%); */

  background-color: rgba(255, 255, 255, 0.86);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  transition: all 0.4s ease-out;
}
.old {
  width: 0;
  height: 0;
  font-size: 0;
}

.gameOver-screen {
  width: 500px;
  max-width: 98vw;
  height: 300px;
  font-size: 4em;
  box-shadow: 1px 3px 8px 3px rgba(0, 0, 0, 0.3);
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.x {
  position: relative;
  width: 80px;
  height: 80px;
  background-color: transparent;
  animation: ex 0.3s forwards;
}

.x::before,
.x::after {
  content: "";
  width: 70px;
  height: 12px;
  display: block;
  background-color: blue;
  border-radius: 90px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: top left;
}

.x::after {
  transform: rotate(45deg) translate(-50%, -50%);
}
.x::before {
  transform: rotate(-45deg) translate(-50%, -50%);
}

.o {
  position: relative;
  width: 70px;
  height: 70px;
  border: 12px solid orangered;
  border-radius: 50%;
  -webkit-boorder-radius: 50%;
  -moz-border-radius: 50%;
  animation: ex 0.3s ease forwards;
}

@keyframes ex {
  from {
    transform: scale(0.1);
  }
  to {
    transform: scale(1);
  }
}
/*=============Score==============*/
footer {
  position: absolute;
  width: 100%;
  bottom: 0;
  padding-bottom: 20px;
}

dl {
  display: inline-block;
  padding-left: 15px;
  padding-right: 25px;
  font-weight: bold;
  font-size: 2em;
}
dl:first-child {
  border-left: 6px solid transparent;
  border-radius: 5px;
}
dl:last-child {
  border-left: 6px solid transparent;
  border-radius: 5px;
}

dt,
dd {
  display: inline-block;
}
#o-player {
  width: 36px;
  height: 36px;
  border: 6px solid orangered;
  border-radius: 50%;
  vertical-align: middle;
}

#x-player {
  position: relative;
  width: 36px;
  height: 36px;
  background-color: transparent;
  vertical-align: middle;
}

#x-player::before,
#x-player::after {
  content: "";
  width: 40px;
  height: 6px;
  display: block;
  background-color: blue;
  border-radius: 90px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: top left;
}

#x-player::after {
  transform: rotate(45deg) translate(-50%, -50%);
}
#x-player::before {
  transform: rotate(-45deg) translate(-50%, -50%);
}
#o-score,
#x-score {
  width: 70px;
}

#reset {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-color: rgba(255, 0, 0, 0.3); */
}
p {
  display: inline-block;
  position: relative;
  visibility: hidden;
  top: -90px;
  font-size: 1.5rem;
  transition: top 0.6s, visibility 0.6s;
  transition-delay: 0.1s;
  padding: 0.5em 1em;
  border-radius: 5px;
  box-shadow: 1px 3px 8px 3px rgba(0, 0, 0, 0.2);
  margin-bottom: 2px;
}
#suggestion {
  display: inline-block;
  font-size: 1.2em;
  border-radius: 6px;
  padding: 4px 14px;
  color: #99cc66;
  cursor: pointer;
  border: 1px solid black;
  position: relative;
  background-color: transparent;
  user-select: none;
}
#suggestion::after {
  content: "";
  background-color: #663399a6;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: -1;
  top: 6px;
  left: 6px;
  transition: 0.2s;
  border-radius: 6px;
}

#level-container {
  display: inline-block;
}

#suggestion:hover::after {
  top: 0px;
  left: 0px;
}

.suggestion {
  background-color: aqua;
  animation: blink 0.9s steps(2, start) infinite;
}

@keyframes blink {
  from {
    background-color: rgba(0, 255, 255, 0.52);
  }
  to {
    background-color: transparent;
  }
}
@media only screen and (max-width: 400px) {
  #game-container {
    height: 62vh;
  }
  #o-player,
  #x-player {
    width: 30px;
    height: 30px;
  }
  .o {
    width: 60px;
    height: 60px;
  }
  .x::before,
  .x::after {
    width: 60px;
    height: 10px;
  }
  .vlines,
  .hlines {
    width: 100px;
    height: 100%;
    left: 100px;
  }
  #container1,
  #container2 {
    width: 300px;
    height: 300px;
  }
  .case {
    width: 100px;
    height: 100px;
  }
  .gameOver-screen {
    font-size: 3.5em;
    height: 220px;
  }
  footer {
    padding-bottom: 25px;
  }
  p {
    font-size: 6vw;
    width: 500px;
    max-width: 98vw;
    padding-top: 20px;
  }
}
