body {
  font-family: Verdana, sans-serif;
}

/* Topnav Background */
.topnav {
  background-color: #1e23b1;
  overflow: hidden;
}

/* Topnav Links */
.topnav a {
  float: left;
  display: block;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

/* Highlight current page */
.active {
  background-color: #3341de;
  color: white;
}

.active:hover {
  background-color:#2932c7
}

/* Hide menu toggle when it fits the screen*/
.topnav .icon {
  display: none;
}

/* Dropdown container */
.dropdown {
  float: left;
  overflow: hidden;
}

.rules {
  position: absolute;
  float: left;
  overflow: hidden;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  width: 98%;
  border: none;
  outline: none;
  color: white;
  background: black;
  margin: 0;
  z-index: 1;
}

.rules-box {
  display: none;
  font-weight: normal;
  width: 99%;
  font-size: 16px;
  text-align: left;
  color: black;
  background-color: #b5b8f4;
  padding-left: 4px;
  padding-top: 2px;
  padding-bottom: 2px;
  margin-bottom: 4px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.rules:hover .rules-box{
  display: block;
}

/* Fit the dropdown and style it */
.dropdown .dropbutton {
  font-size: 17px;
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
}

/* Dropdown content Styling */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #b5b8f4;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 2;
}

/* Dropdown link styling */
.dropdown-content a {
  float: none;
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.dropdown-content a.active {
  color: black;
  background: #8d92eb;
}

/* Add a dark background to topnav links/button on hover */
.topnav a:hover:not(.active), .dropdown:hover:not(.active) .dropbutton:not(.active) {
  background-color: #2932c7;
  color: white;
}

/* Add a grey background to dropdown links on hover */
.dropdown-content a:hover:not(.active) {
  background-color: #777ed5;
  color: black;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* When screen is less than 600 pixels wide, hide all links, except for the first one. Show the topnav toggle */
@media screen and (max-width: 600px) {
  .topnav a:not(:first-child), .dropdown .dropbutton {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
  }
}

/* Adds the responsive tag when using a smaller screen for a vertical menu */
@media screen and (max-width: 600px) {
  .topnav.responsive {position: relative;}
  .topnav.responsive a.icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  .topnav.responsive .dropdown {float: none;}
  .topnav.responsive .dropdown-content {position: relative;}
  .topnav.responsive .dropdown .dropbutton {
    display: block;
    width: 100%;
    text-align: left;
  }
}

#large-game-box {
  position: relative;
  width: 472px;
  height: 472px;
  background: black;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

#game-title {
  text-align: center;
}

#box-align{
  position: relative;
  width: 474px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.game-box-1 {
  position: absolute;
  width: 150px;
  left: 0px;
  top: 0px;
}

.game-box-2 {
  position: absolute;
  width: 150px;
  top: 0px;
  left: 158px;
}

.game-box-3 {
  position: absolute;
  width: 150px;
  top: 0px;
  left: 316px;
}

.game-box-4 {
  position: absolute;
  width: 150px;
  top: 158px;
  left: 0px;
}

.game-box-5 {
  position: absolute;
  width: 150px;
  top: 158px;
  left: 158px;
}

.game-box-6 {
  position: absolute;
  width: 150px;
  top: 158px;
  left: 316px;
}

.game-box-7 {
  position: absolute;
  width: 150px;
  top: 316px;
  left: 0px;
}

.game-box-8 {
  position: absolute;
  width: 150px;
  top: 316px;
  left: 158px;
}

.game-box-9 {
  position: absolute;
  width: 150px;
  top: 316px;
  left: 316px;
}

.game-board{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 150px;
}

.game-board > div {
  display: flex;
  font-family: sans-serif;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  transition: font-size 100ms ease-in-out;
  color: black;
  background: white;
  width: 50px;
  height: 50px;
  border: 1px solid black;
  position: relative;
}

.game-board > div:not(.selected) {
  cursor: pointer;
}

.game-board > div.selected {
  cursor: default;
}

.game-board > div.win-player {
  background: #1a46ab;
  color: white;
}

.game-board > div.win-ai {
  background: #f2c693;
  color: black;
}

.game-board > div:not(.selected):hover::after {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.3);
  content: "";
}

.game-prompt {
  position: relative;
  width: 474px;
  text-align: center;
  margin-top: 10px;
  z-index: -1;
}

.game-button {
  position: relative;
  width: 474px;
  height: 20px;
  margin-top: 10px;
  justify-content: center;
  z-index: 1;
}

.reset-button {
  display: none;
  position: absolute;
  width: 100px;
  transform: translateX(187px);
  z-index: 1;
}

.turn-display{
  position: relative;
  width: 100%;
  margin-top: 50px;
  padding-bottom: 8px;
  z-index: -1;
}

#current-turn-display{
  text-align: center;
  width: 100%;
  padding-bottom: 3px;
  font-size: 20px;
  font-weight: bold;
}

#turn-pointer {
  width: 99%;
  text-align: center;
}

#player-color {
  display: inline-block;
  height: 10px;
  width: 10px;
  background: #1a46ab;
}

#player{
  display: inline-block;
}

#ai {
  display: inline-block;
  margin-left: 35px;
}

#ai-color {
  display: inline-block;
  height: 10px;
  width: 10px;
  background: #f2c693;
}

.turn-display .pointer {
  display: inline-flex;
  position: absolute;
  margin-left: 5px;
  width: 0;
  height: 0;
  border: none;
}

.turn-display .pointer.left::after {
  transform: scale(1);
  transition: 200ms ease-in-out;
  transform-origin: center;
  content: "";
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 20px solid black;
  border-left: 0px solid transparent;
}

.turn-display .pointer.right::after {
  transform: scale(1);
  transition: 200ms ease-in-out;
  transform-origin: center;
  content: "";
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 20px solid black;
  border-right: 0px solid transparent;
}

.main-title{
  text-align: center;
  font-size: 36px;
  line-height: 0px;
}

.main-subtitle {
  display: block;
  font-size: 36px;
  width: 0;
  margin-left: auto;
  margin-right: auto;
  animation-fill-mode: forwards;
}

.typing {
  overflow: hidden; 
  white-space: nowrap; 
  border-right: .15em solid #3341de; 
  animation: 
    typing 1.5s steps(20, end) 1s 1, 
    blink-caret .75s steps(30, end) infinite,
    remain 1.5s linear 2.5s infinite;
}
@keyframes typing {
  from { width: 0px; }
  to { width: 360px; }
}
@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #3341de; }
}
@keyframes remain {
  from, to { width:fit-content;}
}

.skill-box {
  width: 100px;
  height: 100px;
  position: relative;
  display: inline-block;
  text-align: center;
}

.skill-box i {
  position: relative;
  font-size: 60px;
}

.skill-box p{
  margin-bottom: 2px;
}

.main-body h2 {
  text-align: center;
  margin-bottom: 0px;
  margin-top: 0px;
}

.main-body #main-body-box{
  border-top:  8px solid black;
  border-left: solid black;
  border-right: solid black;
  border-bottom: solid black;
  margin-top: 0px;
  margin-bottom: 14px;
  padding-bottom: 5px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  background: #b5b8f4;
}

.main-body #main-body-box a{
  color: black;
}

.main-body #main-body-box a:hover{
  color: #1e23b1;
}

.main-body #about-text {
  font-size: 17px;
  margin-bottom: 0px;
  margin-top: 6px;
  margin-left: 4px;
  margin-right: 4px;
}

.main-body #skill-title {
  margin-bottom: 0px;
}

.bnp-main-body #main-body-box{
  border-top:  8px solid black;
  border-left: solid black;
  border-right: solid black;
  border-bottom: solid black;
  margin-top: 0px;
  margin-bottom: 14px;
  padding-bottom: 5px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  background: #b5b8f4;
  text-align: center;
}

.bnp-main-body h1{
  text-align: center;
}

.bnp-main-body #main-body-box p{
  margin: 2px;
  text-align: left;
}

.bnp-main-body #main-body-box p a{
  color: black;
}

.bnp-main-body #main-body-box p a:hover{
  color: #1e23b1;
}

.bnp-main-body #main-body-box .social-box a{
  position: relative;
  color: black;
}

.bnp-main-body #main-body-box .social-box a:hover{
  color: #1e23b1;
}

.bnp-slideshow {
  max-width: 500px;
  position: relative;
  margin: auto;
}

.bnp-slides {
  display: none;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

.captiontext {
  color: white;
  font-size: 15px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
  background-color: rgba(0, 0, 0, .5)
}

.numbertext {
  color: white;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
  background-color: rgba(0, 0, 0, .5)
}

.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px 8px;
  background-color: #b5b8f4;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.bnp-active, .dot:hover {
  background-color: #3341de;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

#aws-main-body{
  border-top:  8px solid black;
  border-left: solid black;
  border-right: solid black;
  border-bottom: solid black;
  margin-top: 0px;
  margin-bottom: 14px;
  padding-bottom: 5px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  background: #b5b8f4;
  text-align: center;
}

#aws-audio{
  position: relative;
  margin: auto;
}

#aws-h1{
  text-align: center;
}

.social-box {
  position: relative;
  display: block;
}

.social-box:not(.contact-box) {
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100px;
  height: 10px;
  font-size: 60px;
}

#contact-title {
  text-align: center;
}

.contact-box{
  outline: solid black;
  border-top:  8px solid black;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-bottom: 14px;
  background: #b5b8f4;
}

.contact-box h2{
  display: block;
  position: relative;
  margin-left: 6px;
  margin-top: 2px;
  margin-bottom: 6px;
  padding-top: 6px;
}

.contact-box a:not(.social-box){
  display: block;
  position: relative;
  padding-bottom: 10px;
  margin-left: 10px;
  color: black;
}

.contact-box a:not(.social-box):hover{
  color: #1e23b1;
}

.contact-box div.social-box{
  display: inline-block;
  padding-bottom: 60px;
}

@media screen and (max-width: 499px){
  #large-game-box {
    position: absolute;
    width: 100%;
    height: 0;
    padding-top: 100%;
  }

  #box-align {
    position: relative;
    width: 96%;
  }

  .game-box-1 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    left: 0;
    top: 0;
  }

  .game-box-2 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    top: 0%;
    left: 33.5%;
  }

  .game-box-3 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    top: 0%;
    left: 67%;
  }

  .game-box-4 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    top: 33.5%;
    left: 0%;
  }

  .game-box-5 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    top: 33.5%;
    left: 33.5%;
  }

  .game-box-6 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    top: 33.5%;
    left: 67%;
  }

  .game-box-7 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    top: 67%;
    left: 0%;
  }

  .game-box-8 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    top: 67%;
    left: 33.5%;
  }

  .game-box-9 {
    position: absolute;
    width: 32.5%;
    height: 32.5%;
    top: 67%;
    left: 67%;
  }
  .game-board{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    height: 100%;
  }

  .game-board > div {
    display: flex;
    font-family: sans-serif;
    justify-content: center;
    align-items: center;
    line-height: 0;
    font-size: 6vw;
    transition: font-size 100ms ease-in-out;
    width: 100%;
    height: 100%;
    border: 2% solid black; 
    position: relative;
  }

  .game-prompt {
    position: absolute;
    width: 96%;
    margin-left: 0;
    margin-top: 102%;
    text-align: center;
  }

  .game-button {
    position: absolute;
    width: 96%;
    margin-top: 110%;
    justify-content: center;
    z-index: 1;
  }
  
  .reset-button {
    display: block;
    position: absolute;
    width: 20%;
    transform: translateX(200%);
  }

  .turn-display{
    position: relative;
    width: 96%;
    margin-top: 14%;
    padding-bottom: 3%;
    z-index: -1;
  }

  #current-turn-display{
    text-align: center;
    width: 100%;
    padding-bottom: 1%;
    font-size: 5vw;
    font-weight: bold;
  }
  
  #turn-pointer {
    width: 99%;
    text-align: center;
  }

  #player-color {
    display: inline-block;
    height: 10px;
    width: 10px;
    background: #1a46ab;
  }

  #player{
    display: inline-block;
    font-size: 4vw;
  }

  #ai {
    display: inline-block;
    margin-left: 10%;
    font-size: 4vw;
  }

  #ai-color {
    display: inline-block;
    height: 10px;
    width: 10px;
    background: #f2c693;
  }

  .turn-display .pointer {
    display: inline-flex;
    position: absolute;
    width: 0;
    height: 0;
    border: none;
  }

  .turn-display .pointer.left::after {
    transform: scale(1);
    transition: 200ms ease-in-out;
    transform-origin: center;
    content: "";
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 20px solid black;
    border-left: 0px solid transparent;
  }

  .turn-display .pointer.right::after {
    transform: scale(1);
    transition: 200ms ease-in-out;
    transform-origin: center;
    content: "";
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 20px solid black;
    border-right: 0px solid transparent;
  }

  .rules {
    width: 97%;
    font-size: 5vw;
  }

  .rules-box {
    font-size: 4vw;
    width: 100%;
    padding-left:0.2vw;
  }

  .main-title{
    text-align: center;
    font-size: 10vw;
    line-height: 0px;
  }

  .main-subtitle {
    font-size: 9vw;
  }

  .typing {
    overflow: hidden; 
    white-space: nowrap; 
    border-right: .15em solid #3341de; 
    animation: 
      typing 1.5s steps(20, end) 1s 1, 
      blink-caret .75s steps(30, end) infinite,
      remain 1.5s linear 2.5s infinite;
  }
  @keyframes typing {
    from { width: 0px; }
    to { width: 95%; }
  }
  @keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #3341de; }
  }
  @keyframes remain {
    from, to { width:fit-content;}
  }

  .bnp-slideshow {
    max-width: 100%;
    position: relative;
    margin: auto;
  }
  
  .bnp-slides {
    display: none;
  }
  
  .prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
  }
  
  .next {
    right: 0;
    border-radius: 3px 0 0 3px;
  }
  
  .prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
  }
  
  .captiontext {
    color: white;
    font-size: 15px;
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
    background-color: rgba(0, 0, 0, .5)
  }
  
  .numbertext {
    color: white;
    font-size: 12px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
    background-color: rgba(0, 0, 0, .5)
  }
  
  .dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px 8px;
    background-color: #b5b8f4;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
  }
  
  .bnp-active, .dot:hover {
    background-color: #3341de;
  }
  
  .fade {
    animation-name: fade;
    animation-duration: 1.5s;
  }
  
  @keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
  }
}

.current-board-active-xTurn .game-board > div{
  background: #1a46ab;
  color: white;
}

.current-board-active-oTurn .game-board > div{
  background: #f2c693;
  color: black;
}
