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

:root{
  --main-grey: #6a838f;
  --main-dark-grey: #08313b;
  --main-purple: #967c9b;
  --main-dark-purple: #4a1753;
  --soft-purple: #5e4662;
}

.t-center{
  text-align: center;
}

main{
  overflow-x: hidden;
}

#intro-card{
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  left: 0;
  right: 0;
  z-index: 101;
}

.question{
  text-align: center;
  margin-top: -0.8em;
  font-size: 4em;
  color: white;
  font-family: cursive;
}

.pop-in{
  animation: popIn 0.4s ease-out forwards;
}

#back-icon{
  position: fixed;
  top: 0;
  left: 0;
  margin: 20px;
  cursor: pointer;
}

#volume{
  position: fixed;
  bottom: 1em;
  left: 1em;
  width: 45px;
  height: 45px;
  background: var(--main-dark-grey);
  font-size: 1.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 0px 10px #3c3c3c;
  margin-right: 2rem;
  cursor: pointer;
  z-index: 95;
}

#history{
  position: fixed;
  top: 1.5em;
  right: 1.5em;
  font-size: 1.3rem;
  cursor: pointer;
}

#history-details{
  position: fixed;
  top: 4rem;
  z-index: 11111;
  right: 2rem;
  width: fit-content;
  padding: 20px;
  background: var(--soft-purple);
  border-radius: 5px;
  box-shadow: 2px 2px 7px black;
}

#won, #lost {margin-top: 8px;}

#color-setting{
  position: fixed;
  z-index: 95;
  /* top: 0; */
  right: 0;
  margin: 20px;
  cursor: pointer;
  bottom: 0;
  font-size: 2rem;
  color: black;
  background: var(--main-dark-grey);
  border-radius: 50%;
  box-shadow: 0px 0px 10px #1b1b1b;
  padding: 2px 4px 2px 2px;
  cursor: pointer;
  text-decoration: none;
}

#color-setting:hover,
#volume:hover{
  box-shadow: 0px 0px 10px #000000;
}

#hurray{
  position: fixed;
  z-index: 1111;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #0000008c;
  font-size: 5rem;
}

@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.ai-flash {
  background-color: #5e4662 !important;
  transition: background-color 0.3s ease;
}

.pop-out{
  animation: popOut 0.4s ease-out forwards;
  opacity: 1;
}

@keyframes popOut {
  0% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
}

.drop-in{
  animation: dropin 0.4s ease-in forwards;
}

@keyframes dropin {
  from{
    transform: translateY(-100vh);
  }
  to{
    transform: translateY(0);
  }
}


.drop-out{
  animation: dropout 0.4s ease-out forwards;
}

@keyframes dropout {
  from{
    transform: translateY(0);
  }
  to{
    transform: translateY(-100vh);
  }
}


#intro-card .card{
  width: 100%;
  max-width: 500px;
  min-width: 200px;
  background-color: var(--main-dark-purple);
  border-radius: 20px;
  padding: 0em 2em 2em 2em;
  box-shadow: 4px 4px 10px black;
  color: #f2f2f2;
  font-size: 1rem;
  text-align: justify;
}

#intro-card #close{
  margin-left: auto;
  display: block;
  background: var(--main-purple);
  border-radius: 50%;
  width: fit-content;
  padding: 5px 10px;
  box-shadow: 1px 1px 10px #2d2d2d, -1px -1px 10px #2d2d2d;
  cursor: pointer;
  margin-bottom: 0.1em;
  margin-top: -3em;
}

#intro-card h3 span,
#intro-card p span{
  color: var(--main-purple);
}
#intro-card h3{
  margin-bottom: 0.5em;
}

#main-screen{
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 96;
  background: var(--main-dark-grey);
}

#main-screen a{
  color: var(--main-purple);
  text-align: center;
  margin-top: 10px;
}

#main-screen h3{
  font-size: 2rem;
}

#main-screen .greyBtn{
  box-shadow: 1px 1px 7px #1c1c1c ;
}

#main-screen .greyBtn:hover{
  transform: scale(1.1);
  background-color: #3c6172;
  color: white;
  border: none;
}

.slide-out{
  animation: slideOut 0.5s ease-out forwards;
  z-index: 102 !important;
}

.pop-fade{
  /* position: absolute;
  top: 50%;
  left: 50%;
  font-size: 3rem; */
  /* transform: translate(-50%, -50%); */
  animation: popFade 1s ease-out forwards;
  /* pointer-events: none;
  z-index: 999; */
}

@keyframes popFade {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-100%);
  }
}

#alert-bar{
  top: 1em;
  position: fixed;
  left: 3em;
  right: 3em;
  padding: 5px 20px;
  background-color: #00000045;
  border-radius: 20px;
  box-shadow: 5px 3px 8px #00000040;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
  z-index: 1000;
}

.error-alert{
  background-color: #b5190d !important;
}

#message{
  color: #bcbcbc;
}

.error-alert #message{
  color: #fff;
}

#alert-close{
  cursor: pointer;
  padding: 0px 5px;
  margin-right: -0.7em;
}

#play-with{
  margin-bottom: 10px;
  color: var(--main-dark-grey);
}

#partner{
  /* color: var(--main-dark-grey); */
  font-weight: bold;
}

#user-form,
#connect-form{
  position: fixed;
  width: 100vw;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  /* max-width: 700px; */
  /* box-shadow: 1px 1px 13px #121212; */
  /* height: fit-content; */
  min-height: 300px;
  margin: auto;
  background-color: var(--soft-purple);
  /* border-radius: 50px; */
  /* z-index: 100; */
}

#connect-form img{
  cursor: pointer;
  margin-right: 2px;
}

#user-form{
  z-index: 97;
}

#permission-form{
  z-index: 99;
}

#disconnect-form{
  z-index: 1000;
}

#connect-form{
  z-index: 98;
}

#user-form form,
#permission-form form,
#disconnect-form form,
#connect-form form{
  display: flex;
  flex-direction: column;
  padding: 10px;
  min-width: 250px;
  width: 90%;
  max-width: 500px;
}

#user-form input,
#permission-form input,
#disconnect-form input,
#connect-form input{
  padding: 5px 10px 5px 5px;
  font-size: 1rem;
  box-shadow: none;
  outline: none;
  border: none;
  background-color: var(--soft-purple);
  color: white;
  border-bottom: 2px solid white;
  margin-bottom: 20px;
}

#no-btn{
  background: transparent;
  border-color: white;
  margin-top: 1em;
  border: none;
  padding: 0;
}

#no-btn:hover{
  text-decoration: underline;
}

#user-form button,
#permission-form button,
#disconnect-form button,
#connect-form button{
  padding: 5px 10px;
  font-size: 1rem;
  /* font-family: monospace; */
  font-family: "Pacifico", cursive, sans-serif;
  color: var(--main-dark-purple);
  border-radius: 5px;
  margin-bottom: 5px;
  /* width: fit-content; */
  /* margin-left: auto; */
  border: none;
  outline: none;
  cursor: pointer;
  border: 1px solid white;
}

#message-box{
  z-index: 1111;
  background-color: var(--soft-purple) !important;
  border-radius: 5px;
  padding: 1em;
  text-align: center;
}

#message-popup{
  color: white;
}

#message-box div{
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#closeMessage{
  position: absolute;
  top: 0.5em;
  right: 1em;
  cursor: pointer;
}

#disconnect-form,
#message-box,
#permission-form{
  max-width: 500px;
  width: 90vw;
  height: fit-content;
  min-height: 200px;
  margin: auto;
  background-color: var(--soft-purple);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: 5px 5px 14px #3c3248;
}


#user-form button:hover,
#permission-form button:hover,
#disconnect-form button:hover,
#connect-form button:hover
{
  background-color: var(--soft-purple);
  border: 1px solid white;
  color: white;
}

.form-span{
  display: block;
  margin-bottom: 20px;
  font-size: 1rem;
  padding: 5px;
  color: #bdbdbd;
}

#myID{
  color: white;
}

#loader{
  position: fixed;
  z-index: 102;
  background: var(--main-dark-purple);
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loader div{
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 10px solid white;
  border-style: dotted;
  transform: rotate(360deg);
  /* border-color: var(--main-purple); */
  animation: spinner 2.5s 0s linear infinite;
}

@keyframes spinner {
  from{
    transform: rotate(0deg);
  }
  to{
    transform: rotate(360deg);
  }
}

#color-card{
  position: fixed;
  margin: auto;
  z-index: 10000;
  width: 100%;
  flex-wrap: wrap;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
}

/* .colr-button {
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 5px;
  background-color: var(--soft-purple);
  color: white;
  font-size: 18px;
  box-shadow: none;
  border: 1px solid var(--soft-purple);
}

.color-button:hover {
  background-color: transparent;
}o */

#color-card .cards{
  width: 100%;
  flex-wrap: wrap;
  max-width: 600px;
  background-color: #00000054;
  border-radius: 10px;
  position: relative;
  padding: 30px 20px 20px 20px;
}

#color-close{
  position: absolute;
  right: 0;
  top: 0;
  color: #dcd9d9;
  padding: 10px 15px;
  cursor: pointer;
}

.bingo-card a{
  display: block;
  color: var(--main-dark-purple);
  margin: 10px 0px 0px 0px;
}

.color-op{
  width: 50px;
  height: 50px;
  border-radius: 50px;
  box-shadow: 1px 1px 6px black;
  margin: 10px;
  cursor: pointer;
}

.darkred{
  background-color: darkred !important;
}

.teal{
  background-color: #008b6b !important;
}

.ceruleanblue{
  background-color: #006A8B !important;
}

.cranberry {
  background-color: #8b0063 !important;
}

.darkPurple{
  background-color: var(--main-dark-purple) !important;
}

.softPurple {
  background-color: var(--soft-purple) !important;
}

.black {
  background-color: black !important;
}

.white {
  background-color: white !important;
}

.purple {
  background-color: var(--main-purple) !important;
}

.grey {
  background-color: var(--main-dark-grey) !important;
  box-shadow: none !important;
}

.lightGrey {
  background-color: var(--main-grey) !important;
}

.lightGreen{
  background-color: #aed581 !important;
}

.darkGreen{
  background-color: #33691e !important;
}

.lightSkyGreen{
  background-color: #c8e6c9 !important;
}

.skyblue{
  background-color: #4db6ac !important;
}

.skyGreen{
  background-color: #00796b !important;
}


.pink{
  background-color: #ef9eac !important;
}

/* fonts */
.pacifico-regular {
  font-family: "Pacifico", cursive, sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* Dark backgroung */
.dark-bg{
  background-color: var(--main-dark-grey);
  /* background: linear-gradient(187deg, rgba(8, 49, 59, 1) 1%, rgba(74, 23, 83, 1) 50%, rgb(0 0 0) 96%); */
  color: white;  
}

/* main font of the document */
.font-main{
  font-family: "Nunito Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

/* display*/
.d-none{
  display: none !important;
}
.d-flex{
  display: flex;
}
.fj-center{
  justify-content: center;
}
.fa-center{
  align-items: center;
}
.f-row{
  flex-direction: row;
}
.f-col{
  flex-direction: column;
}

.h-100{
  height: 100%;
}

.w-100{
  width: 100%;
}

.wv-100{
  max-width: 100vw;
  min-width: 100%;
}

.hv-100{
  min-height: 100vh;
}

/* animation */
.drop-text span:nth-child(1){
  display: inline-block;
  transform: translateY(-200px);
  opacity: 0;
  animation: drop 0.3s forwards;
}
.drop-text span:nth-child(2){
  display: inline-block;
  transform: translateY(-200px);
  opacity: 0;
  animation: drop 0.6s forwards;
}
.drop-text span:nth-child(3){
  display: inline-block;
  transform: translateY(-200px);
  opacity: 0;
  animation: drop 0.9s forwards;
}
.drop-text span:nth-child(4){
  display: inline-block;
  transform: translateY(-200px);
  opacity: 0;
  animation: drop 1.2s forwards;
}
.drop-text span:nth-child(5){
  display: inline-block;
  transform: translateY(-200px);
  opacity: 0;
  animation: drop 1.5s forwards;
}

@keyframes drop {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

audio{
  visibility: hidden;
}

/* main heading */
h2{
  text-align: center;
  font-size: 50px;
  padding: 20px;
  letter-spacing: 5px;
}
/* welcome page */
.welcome{
  position: fixed;
  background-color: var(--main-dark-grey);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  transition: opacity 0.5s ease, filter 0.5s ease;
  opacity: 1;
  filter: blur(0);
  z-index: 100000;
}

.welcome.exit {
  opacity: 0;
  filter: blur(8px);
}

.result{
  background-color: #08313bcc;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2em;
  z-index: 100;
}

.result div{
  font-size: 40px;
  margin-bottom: 10px;
  text-align: center;
}

.result button{
  display: block;
  padding: 10px 20px;
  background-color: #3c6172;
  color: white;   
  border: 1px solid;
  border-color: #3c6172;
  border-radius: 5px;
  box-shadow: none;
  font-size: 18px;
}

.result button:hover{
  cursor: pointer;
  color: #fff;
  border: white;
  background-color: transparent;   
}

/* bingo cards */
.bingo-card{        
  background-color: var(--main-purple);
  color: white;
  padding: 20px 30px;
  border-radius: 5px;
  box-shadow: 4px 4px 10px black;
  text-align: center;
  flex: 1; 
}
#my.bingo-card{
  background-color: var(--main-grey);
  margin-right: 20px;
}
#ai.bingo-card{
  background-color: var(--main-purple);
}

.row button{
  width: 80px;
  height: 80px;
  cursor: pointer;
  border: 1px solid #9e9e9e;
  background-color: initial;
  color: white;
  cursor: default;
}

#my .row button:hover:enabled{
  color: white;
  background-color: #2b5c74;
  cursor: pointer;
}

#my .row button.selected:hover{
  background-color: var(--main-grey);
}

/* button to change order */
.greyBtn{
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 5px;
  background-color: #3c6172;
  color: white;
  font-size: 18px;
  box-shadow: none;
  border: 1px solid #3c6172;
}
.greyBtn:hover:enabled{
  color: #fff;
  border-color: #fff;
  background-color: transparent;
  cursor: pointer;
}

/* hide numbers of ai bingo */
#ai .row button{
  color: transparent;
  cursor:default;
}

/* bingo numbers if selected */
button.selected,
button.selected{
  cursor: default;
  position: relative;
}
.selected::after,
.selected::before{
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background: #fafafa;
}
.selected::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.selected::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* bingo text */
#myBingo, #aiBingo{
  font-size: 18px;
  margin-bottom: 10px;
  /* display: flex;
  justify-content: space-between;
  padding: 0 27px; */
}
#myBingo span, #aiBingo span{
  display: inline-block;
  padding: 2px;
  margin-right: 2px;
  width: 35px;
  height: 35px;
}

/* highlight bingo letters based on the score */
span.set, span.set{
  color: white;
  border-radius: 50%;
  cursor: none;
}
#myBingo span.set{
  background-color: #3c6172;
}
#aiBingo span.set{
  background-color: #773084;
}

#selectedNumber{
  margin: auto;
  background: #d9d9d9;
  width: fit-content;
  border-radius: 20px;
  padding: 2px 10px;
  color: var(--main-dark-grey);
  margin-bottom: 9px;
}
/* responsive design */
@media only screen and (max-width: 985px) {
  section {
    flex-direction: column;
  }
  .bingo-card{
    margin-top: 20px;
  }
  #my.bingo-card {
    margin-right: 0px;
  }
}

@media only screen and (max-width: 526px) {
  .row button{
    width: 50px;
    height: 50px;
  }
  .greyBtn {
    margin-top: 15px;
    padding: 6px 15px;
    border-radius: 5px;
    font-size: 15px;
  }
  .welcome span{
    font-size: 28px;
  }
  .result div {
    font-size: 23px;
  }

  #intro-card .card{
    max-width: 90%;
    min-width: 200px;
    font-size: 0.9rem;
  }

  #color-card .cards{
    max-width: 90vw;
    padding: 30px 10px 10px 10px;
  }

  #color-setting{
    font-size: 1.5rem;
  }

  #volume{
    width: 40px;
    height: 40px;
  }

  #alert-bar{
    font-size: 0.8rem;
  }

  /* #history{
    top: 1em;
    right: 1em;
    font-size: 1rem;
  } */
  /* #aiBingo{
    margin-bottom: 10px;
  }

  #myBingo{
    margin-bottom: 5px;
  }
   */
  /* #selectedNumber{
    font-size: 13px;
    margin-bottom: 13px;
  } */
}

@media only screen and (max-width: 350px) {
  .result div {
    font-size: 20px;
  }
  
  #user-form form,
  #permission-form form,
  #disconnect-form form,
  #connect-form form{
    min-width: 180px;
  }

  #user-form input, #user-form button,
  #upermission-form input, #upermission-form button,
  #disconnect-form input, #disconnect-form button,
  #connect-form input, #connect-form button{
    font-size: 0.8rem;
  }

  #intro-card .card{
    max-width: 90%;
    min-width: 200px;
    padding: 0em 1em 1em 1em;
    font-size: 0.8rem;
  }
}
