/****************  BASIC ELEMENTS ****************/  


body {
  display: grid;
  background-color: rgb(0, 0, 35);
  justify-content: center;
  justify-items: center;
  margin: 0 auto;  
  /** 
  height: 100%;
  width: 100%;
  overflow: hidden;
  */
}

* {
  font-family: "Tektur";
}


.hide {
  display: none !important
}
  
.show {
  display: grid !important
}


/****************  TITLE AND BUTTON ELEMENTS  ****************/  


button {
  padding: 10px;
  border-radius: 5px;
  width: 7ch;
  margin: 3px;
  font-size: 30px;
  background-color: #f0f0f0;
}

.titleDiv {
  display: grid;
  width: fit-content;
  height: fit-content;
  min-height: 60px;
  margin: 0 auto;
  margin-top: 10px;
  padding: 0px;
  color: white;
  text-align: center;
  z-index: 1000;
  font-family: "Bungee Spice";
}

.titleDiv a {
  height: fit-content;
}

a span {
  font-family: "Tektur";
  color: orange;
  font-weight: bolder;
  text-decoration: none;
  margin: 0 auto;
  font-size: 50px;
  height: 2ch;
  display: inline-block;
  transition: transform .5s;
  /**transform-style: preserve-3d;*/
} 



.startGame {
  display: grid;
  position: absolute;
  padding: 20px;
  height: 4ch;
  width: 16ch;
  align-self: center;
  justify-self: center;
  z-index: 999999;
  border-radius: 50px;
}

#reset {
  display: grid;
  font-size: 12px;
  width: fit-content;
  background-color: #F55C47;
  color: azure;
  text-align: center;
  z-index: 9999;
  text-shadow: 0 0 12px black;
  position: absolute;
  left: 0;
  top: -11%;
}


/****************  BOARD ELEMENTS  ****************/  


#board {
  position: relative;
  display: grid;
  width: 90vw; /**320*/
  height: 575px;
  justify-self: center;
  background-color: green;
  margin: 0 auto;
  border-radius: 20px;
  border: 10px ridge burlywood;
  background: linear-gradient( darkgreen, green, darkgreen); 

}

#topBoard {
  display: grid;
  grid-template-columns: 2fr 4fr;
  height: 90px;
  width: 90vw;
  margin-bottom: 10px;
  margin-top: 5px;
}

#deck{
  position: relative;
  margin: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  align-items: center;
}

#drawnCard{
  position: relative;
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  justify-self: center;
  position: relative;
  margin-left: 2px;
}

#drawBtn {
  position: absolute;
  font-size: 11px;
  justify-self: center;
  padding: 5px;
  z-index: 99999;
}


#foundation {
  display: flex;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  align-items: center;
  justify-content:space-around;
}

#foundation1, #foundation2, #foundation3, #foundation4 {
  text-shadow: 0px 0px 4px rgb(225, 218, 9);
  align-self: center;
  justify-self: center;
  align-items: center;
  font-size: 2em;
  pointer-events: none;
}

.hearts, .diamonds {
  color: red;
}

#tableau {
  display: grid;
  position: relative;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  height: fit-content;
  min-height: 490px;
  margin-bottom: 0;
}

.cardStack {
  justify-content: center;
  position: relative;
  display: grid;
  width: 100%;
  min-height: 440px;
  justify-items: center;
  border-radius: 20px;
  margin: 1px;
}


/****************  CARD ELEMENTS  ****************/  

.cardBackground {
  background: radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%); 
}

.cardPlaceHolder {
  display: grid;
  position: relative;
  margin: 0px;
  width: 46px;
  height: 69px;
  border-radius: 16px;
  padding: 0px;
  border: 3px solid white;
  text-align: center; 
  justify-self: center;
  align-content: center;
  align-items: center;
}

.foundationSpot {
  width: 56px;
  height: 80px;
}


.cardDiv {
  position: absolute;
  display: grid;
  text-align: center;
  background-color: transparent;
  justify-self: center;
  align-self: center;
  width: 46px;
  height: 69px;
  z-index: 1000;
  border-radius: 16px;
  transition: transform 1s;
  transform-style: preserve-3d;
  box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
  cursor: grab;
}

.card {
  display: grid;
  position: relative; 
  border-radius: 16px;
  padding: 0px;
  margin: 0;
  text-align: center;
  bottom: 0; 
  pointer-events: none;
}


.frontCard {
  position: relative;
  display: grid;
  justify-self: center;
  background-color: azure;
  align-self: center;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 3px solid azure;
  pointer-events: none;
  transform: rotateY(180deg);
}



.backCard {
  position: relative;
  display: grid;
  border-radius: 16px;
  border: 3px solid azure;
  width: 100%;
  height: 100%;
  align-self: center;
  justify-self: center;
  background-color: rgb(2,0,36);
  background: radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%); 
}


/****************  LABEL ELEMENTS  ****************/  


.top {
  justify-self: left;
}
  
.center {
  justify-self: center;
  align-self : center;
}
  
.bottom {
  justify-self: right;
  bottom: 0;
}

.top, .center, .bottom {
  position: absolute;
  border: 1px solid black;
  background-color: #ddd;
  justify-content: center;
  align-content: center;
  text-align: center;
}

.labelFrame {
  position: relative;
  display: grid;
  justify-self: center;
  align-self: center;
  border-radius: 16px;
  margin: 0px;
  width: 100%;
  height: 100%;
  pointer-events: none; 
}

.labelDiv {
  display: grid;
  margin: 2px;
  border-radius: 50%;
  padding: 5px;
  width: 20px;
  height: 20px;
  align-items: center;
  align-content: center;
  justify-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}


.cardLabel {
  align-self: center;
  text-align: center;
  font-family:Arial, Helvetica, sans-serif;
  font-size: 13px;
  /**padding: 5px;*/
  text-align: center;
  justify-self: center;
  pointer-events: none;

}


/****************  NOTIFICATTION ELEMENTS  ****************/  


.message, .turnMessage {
  position: absolute;
  display: block;
  text-align: center;
  justify-content: center;
  justify-self: center;
  align-items: center;
  align-self: center;
  background-color: whitesmoke;
  border-radius: 20px;
  width: max-content;
  height: fit-content;
  font-size: 20px;
  z-index: 9999;

}

.message {
  border: 10px ridge #F55C47;
  padding-bottom: none;
}

.messageText {
  padding: 0px 10px;
}

.message button {
  border-radius: 0px 0px 10px 10px;
  background-color: #F55C47;
}

.turnMessage {
  border: 10px ridge #47F5A1;
}

.turnMessageText {
  padding: 0px 10px;
}

.matchButton {
  padding: 10px;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  margin: 0px;
  padding: 15px 0px;
  text-align: center;
  font-size: 30px;
}

.matchButton:hover {
  opacity: 0.5;
}

.btnDiv button:first-of-type {
  background-color: #47F5A1;
  font-size: 30px;
}

.btnDiv button:last-of-type {
  background-color: #F55C47;
  border-radius: 0px 0px 8px 8px;
  font-size: 30px;
}


&:hover {
  -webkit-transform:none;
  -moz-transform:none;
  -ms-transform:none;
  transform:none;
}


/****************  CARD ROTATION ELEMENTS  ****************/  


@keyframes rotateY {
  100% {rotate: y 180deg }
}
  
.rotated {
  rotate: y 180deg
}
  
.animate {
  animation: rotateY 1s 1 linear forwards
}

.flip {
  transform: rotateY(180deg);
}


.noShadow {
  box-shadow: none;
}



/****************  GLOWING ANIMATIONS ****************/  



@keyframes glowing1 {
  0% {  box-shadow: 0 0 3px white; }
  50% {  box-shadow: 0 0 40px yellow; }
  100% { box-shadow: 0 0 3px white; }
}

@keyframes glowing2 {
  0% { background-color: green;}
  50% { background-color: default; }
  100% { background-color: green; }
}

@keyframes glowing3 {
  0% { background-color: default; box-shadow: 0 0 3px #B20000; }
  50% { background-color: yellow; box-shadow: 0 0 40px #FF0000; color: black; }
  100% { background-color: default; box-shadow: 0 0 3px #B20000; }
}

@keyframes glowing4 {
  0% { box-shadow: none; color: black;}
  50% {box-shadow: 0 0 15px white; }
  100% {box-shadow: none; color: black;  }
}


.flash {
  box-shadow: 0 0 40px yellow;
}

.flash-anim {
  animation: glowing1 1500ms infinite;
}

.flash2 {
  animation: glowing2 1500ms infinite;
}

.flash3 {
  animation: glowing3 1500ms infinite;
}

.flash4 {
  animation: glowing4 1500ms infinite;
}


/****************  MEDIA QUERIES ****************/  

@media (max-width: 420px) { 
  #board {
    width: 370px
  }
  
  #topBoard {
    width: 370px;
  }

  
  .cardPlaceHolder {
    width: 40px;
    height: 60px;
  }

  .foundationSpot {
    width: 50px;
    height: 69px;
  }

  .cardDiv {
    width: 40px;
    height: 60px;
  }

  .labelDiv {
    width: 15px;
    height: 15px;
    padding: 5px;
  }
    
  .cardLabel {
    font-size: 12px;
  }

  .bigger {
    height: 66px !important;
    width: 44px !important;
  }

}


@media (min-width: 700px) {
  #board {
    width: 680px
  }

  #topBoard {
    height: 127.5px;
    width: 680px;
  }

  .cardPlaceHolder {
    width: 60px;
    height: 90px;
  }

  .foundationSpot {
    width: 73px;
    height: 103.5px;
  }

  .cardDiv {
    width: 60px;
    height: 90px;
  }

  .labelDiv {
    padding: 10px;
  }

  .bigger {
    height: 99px !important;
    width: 66px !important;
  }
    
  .cardLabel {
    font-size: 22px;
  }

  #drawBtn, #reset {
    font-size: 20px;
  }

  #reset {
    top: -12%;
  }

  .titleDiv span {
    height: fit-content;
  }

  .titleDiv a {
    font-family: "Bungee Spice";
  }
  
  a span {
    font-family: "Bungee Spice";
    margin: 0 auto;
    font-size: 5em;
    height: 2ch;
    display: inline-block;
    transition: transform .5s;
    /**transform-style: preserve-3d;*/
  } 

  button:hover {
    background-color: #ddd;
    animation: glowing3 1200ms infinite;
  }


  .titleDiv:hover span:nth-of-type(odd){
    text-shadow: 0px 0px 20px rgba(225, 9, 9, 1);
    transform: rotate(9deg) rotateY(360deg);
    
  }
  
  .titleDiv:hover span:nth-of-type(even){
    text-shadow: 0px 0px 20px rgba(103, 7, 199, 0.75);
    transform: rotate(-9deg) rotateY(-360deg);
  }

  .matchButton:hover {
    opacity: 0.5;
  }

  .frontCard:hover {
    background-color: red;
  }
  
}


