body {
  display: flex;
  margin: 0;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  background-color: black;
  font-family: 'Montserrat', sans-serif;
  background-image: url('../images/tableBackground.png');
  background-size: cover;
  background-position: bottom center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  text-align: center;
  color: white;
  width: 100vw;
  height: 100vh;
}

p {
  margin: 0;
}

#input-name,
#input-name-change {
  background: transparent;
  border: none;
  border-bottom: 2px solid white;
  color: white;
  text-align: center;
  outline: transparent;
  font-size: 18px;
}

#input-name {
  margin-top: 40vh;
}

/* THE ( ? ) GAME INFO BUTTON IN THE TOP RIGHT & ANIMATION*/

#menu-button,
#info-button,
#profile-button,
#quit-button,
#sound-button {
  height: 40px;
  width: 40px;
  font-size: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#menu-button {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 501;
  transform: translateZ(81px);
}

#menu-buttons {
  display: flex;
  flex-direction: column;
  width: 40px;
  position: absolute;
  left: 0;
  top: 40px;
}

.menu-button {
  border-right: 2px solid transparent;
}

.menu-button.selected {
  border-right: 2px solid white;
}

/* RELATED TO THE INFORMATION PANEL THAT POPS UP WHEN YOU CLICK THE INFO BUTTON */

#info-panel {
  font-size: 14px;
  font-weight: 200;
  text-align: center;
  letter-spacing: 1px;
  height: 400px;
  width: 80%;
  margin: 15vh auto;
}

#info-panel-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  z-index: 500;
  transform: translateZ(81px);
  background-color: rgba(0,0,0,.6);
}

.menu-content {
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,.8);
  padding: 10px;
  border-radius: 10px;
}

#profile-content,
#quit-content,
#sound-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#profile-content p,
#quit-content p {
  font-size: 18px;
  margin: 20px 0;
}

.sound-content {
  width: 100%;
}

#sound-toggle {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  cursor: default;
}

#sound-toggle span {
  margin-left: 10px;
  padding-left: 5px;
  width: 40px;
  cursor: pointer;
  color: grey;
  font-weight: 300;
}

#sound-toggle span.selected {
  color: white;
  font-weight: 500;
}

#sound-toggle span:hover {
  color: white;
}

#music-player {
  flex: 1;
  height: calc(100% - 50px);
}

#submit-name-change,
#quit-content button {
  background: transparent;
  border: none;
  border-bottom: 2px solid goldenrod;
  color: lightgoldenrodyellow;
  font-size: 18px;
  outline: transparent;
}

#submit-name-change:hover,
#quit-content button:hover {
  border-bottom: 2px solid lightgoldenrodyellow;
  background-color: goldenrod;
  color: black;
  cursor: pointer;
}

#submit-name-change:active,
#quit-content button:active {
  background-color: lightgoldenrodyellow;
  border-bottom: 2px solid goldenrod;
}

#info-content::-webkit-scrollbar {
  border-radius: 10px;
  background-color: rgba(0,0,0,.15);
}

#info-content::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,.3);
  border-radius: 5px;
}

#credits {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#credits a {
  color: inherit;
}

#description h2 {
  text-align: center;
  margin: 10px 0px 0px;
}

#info-panel p {
  text-align: justify;
  text-shadow: 2px 2px 2px #000;
}

#ok-button {
  position: relative;
  font-size: 16px;
}

/* THE 'BLACKJACK' TITLE & ANIMATIONS*/

h1 {
  font-weight: 700;
  font-size: 3em;
  margin: 0;
  cursor: default;
  user-select: none;
  text-shadow: -1px 0 darkgreen, 0 1px darkgreen, 1px 0 darkgreen, 0 -1px darkgreen
}

h1 #black {
  color: black;
  text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
  animation: zoomleft 1s;
}

h1 #jack {
  margin-left: -5px;
  animation: zoomright 1s;
}

h1 #io {
  font-style: italic; 
  color: darkgreen;
  text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
  margin-left: -14px;
  transform: translateX(-25px);
  font-size: .8em;
  opacity: 0;
  animation: .5s ease 1s normal forwards 1 fadein;
}

@keyframes zoomleft {
  0% { margin-right: -300px; opacity: 0;}
  30% { opacity: 0; }
  100% { margin-right: -5px; opacity: 1;}
}

@keyframes zoomright {
  0% { margin-left: -300px; opacity: 0;}
  30% { opacity: 0; }
  100% { margin-left: -5px; opacity: 1;}
}

@keyframes fadein {
  from {opacity: 0}
  to {opacity: 1}
}

/* CONTAINS ALL OF THE CARD TABLE ELEMENTS */

.container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: calc(100vw - 20px);
  height: calc(100% - 58px);
  box-sizing: border-box;
  border-radius: 20px;
  padding: 10px;
}

/* CONTAINS THE CARD ELEMENTS */

.player-container {
  display: flex;
  width: 100%;
  justify-content: space-around;
}

.hand-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 5px;
  text-shadow: 1px 1px 1px black;
}

.hand-player-name {
  width: 90%;
}

.hand-player-name.selected {
  background: linear-gradient(rgba(255,215,0,0.0), rgba(255,215,0,0.5));
}

.hand-player-stats {
  display: flex;
  align-items: flex-start;
  width: 90%;
}

.hand-player-stats p {
  flex: 1;
  min-width: 33%;
  font-size: .8em;
  height: 100%;
}

.hand-player-money {
  background-color: rgba(255,0,0,.5);
}

.hand-player-bet {
  background-color: rgba(0,255,0,.5);
}

.hand-player-total {
  background-color: rgba(0,0,255,.5);
}

.hand {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 150px;
  width: 150px;
  margin: 10px 0 -50px;
  border-radius: 20px;
  box-sizing: border-box; 
  transition: .25s all;
}

.player-container .hand {
  background-color: rgba(0,0,0,0);
}

.split-hand {
  position: relative;
}

.split-hand.selected::before {
  content: '';
  border-top: 10px solid gold;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-radius: 35%;
  position: absolute;
  top: -10px;
  left: 25%;
  animation: bouncing 0.8s ease-in-out infinite;
}

@keyframes bouncing {
  50% {
    top: -20px;
  }
}

.hand.occupied {
  border: 7px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  /* background-color: rgba(0,0,0,.3); */
}

#player-hand {
  transform: translateY(-100px) scale(1.2);
  z-index: 20;
}

/* THE CARD ELEMENTS */

.card {
  height: 145px;
  width: 100px;
  border-radius: 6px;
  display: inline-block;
  margin: 0px -40px;
  background-size: contain;
  background-repeat: no-repeat;
}

#dealer-hand .card {
  transform: perspective(500px) rotateY(0deg);
}

#dealer-hand div:first-child {
  background-size: cover;
}

#dealer-card-1 {
  transform: perspective(500px) rotateY(180deg);
  background-size: cover;
}

/* ALL INFORMATION ELEMENTS IN THE CENTER */

.banner {
  margin: 10px;
  height: 60px;
  color: white;
  box-sizing: border-box;
  display: flex;
  width: 100%;
}

.text-container {
  flex-grow: 1;
}

.text-box {
  font-family: 'Dosis', sans-serif;
  font-weight: 200;
  font-size: 1em;
  letter-spacing: 2px;
  display: flex;
  margin: 0 7%;
  height: 60px;
  box-sizing: border-box;
}

.text-box p {
  font-weight: 600;
  font-size: 1.1em;
  letter-spacing: 3px;
  text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}

.text-container {
  height: 60px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  width: 33.3%;
}

#money-box {
  border-right: solid 2px white;
}

#total-box {
  border-left: solid 2px white;
}

#player-money,
#player-bet,
#player-box,
#dealer-box {
  display: flex;
  align-items: center;
}

#player-money,
#player-box {
  justify-content: flex-start;
  text-align: left;
}

#player-bet,
#dealer-box {
  justify-content: flex-end;
  text-align: right;
}

#player-box {
  color: lightblue;
}

#dealer-box{
  color: gold;
}

#message {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1em;
  font-weight: 300;
  width: 100%; 
  height: 60px;
  text-shadow: 2px 2px 1px #000;
  left: 0px;
  transition: .4s all;
}

#message p {
  font-size: 1em;
  font-weight: 300;
}

/* ALL BET INPUT ELEMENTS */

input {
  font-family: 'Dosis', sans-serif;
  margin: 5px;
  font-size: 1em;
}

#bet-form {
  width: 100%;
}

#input-bet {
  padding: 3px;
  font-weight: 100;
  font-size: 1.2em;
  text-align: center;
  outline: transparent;
  border: none;
  border-radius: 1px; 
  background-color: rgba(0,0,0,.75);
  color: gold;
  letter-spacing: 1px;
}

#submit-bet {
  border: none;
  border-bottom: solid 2px goldenrod;
  border-radius: 1px; 
  font-size: 1.2em;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 2px 2px 2px black;
  background-color: black;
  outline: transparent;
  transition: .25s all;
  box-sizing: border-box;
  padding: 0 2px;
  color: lightgoldenrodyellow;
  letter-spacing: 1px;
}

#submit-bet:hover {
  background-color: goldenrod;
  color: black;
  border-bottom: solid 2px rgba(0,0,0,.75);
  animation: flashingborder .75s linear infinite alternate;
  cursor: pointer;
}

#submit-bet:active {
  box-shadow: none;
  transform: perspective(500) translateZ(-10px);
  color: white;
  background-color: lightgray;
}

#button-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  box-sizing: border-box;
  transform: translateY(-55px);
  z-index: 50;
}

button {
  font-family: 'Dosis', sans-serif;
  font-weight: 500;
  font-size: 1.2em;
  letter-spacing: 2px;
  margin: 0px 5px;
  box-shadow: 2px 2px 2px black;
  transition: .25s all;
  background-color: black;
  color: lightgoldenrodyellow;
  border: none;
  border-bottom: 2px solid goldenrod;
  outline: transparent;
}

button:hover {
  /* background-color: #333; */
  /* color: #eee; */
  color: black;
  background-color: goldenrod;
  border-bottom: solid 2px rgba(0,0,0,.75);
  
  animation: flashingborder .75s linear infinite alternate;
  cursor: pointer;
  border-radius: 0px;
}

button:active {
  box-shadow: none;
  color: lightgoldenrodyellow;
  background-color: black;
}

@keyframes flashingborder {
  50% {
    border-bottom: solid 2px rgba(0,0,0,0);
  }
}

.flyin {
  animation: flyin .5s ease-out;
}

.loop {
  animation: flipover 1s ease-out forwards;
  transform-style: preserve-3d;
}

@keyframes flyin {
  0% {
    transform: perspective(500px) translate3d(30px, -1000px, 50px) rotate(60deg);
  }
}

@keyframes flipover {
  0% {
    transform: perspective(500px) translate3d(0px, 0px, 0px) rotateY(-180deg);
  }
  35% {
    transform: perspective(500px) translate3d(-85px, 0px, 0px) rotateY(-180deg);
  }
  50% {
    transform: perspective(500px) translate3d(-85px, 0px, 30px) rotateY(-81deg); /* 99 deg centerline */
  }
  75% {
    transform: perspective(500px) translate3d(-80px, 0px, 30px) rotateY(30deg);
    z-index: 5;
  }
  100% {
    transform: perspective(500px) translate3d(-80px, 0px, 30px) rotateY(30deg);
  }
}

#chat-button {
  height: 40px;
  width: 40px;
  font-size: 20px;
  position: absolute;
  z-index: 401;
  transform: translateZ(80px);
  top: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
}

#chat-container {
  width: 30vw;
  height: 35vh;
  position: fixed;
  z-index: 400;
  transform: translateZ(80px);
  display: flex;
  flex-direction: column;
  top: 0;
  right: 0;
  background-color: rgba(0,0,0,.65);
  transition: .25s all;
}

#chat-container.reduced {
  height: 40px;
  width: 40px;
}

#chat-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}


#chat-messages {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  overflow: auto;
  padding: 0px 5px;
  font-weight: 400;
  font-size: 14px;
}

#chat-messages::-webkit-scrollbar {
  border-radius: 10px;
  background-color: rgba(0,0,0,.15);
}

#chat-messages::-webkit-scrollbar-thumb {
  background-color: rgba(50,50,50,.5);
  border-radius: 5px;
}

#chat-messages p {
  text-align: left;
}

#chat-messages p span {
}

#chat-form {
  height: 50px;
  width: 100%;
  display: flex;
  align-items: center;
}

#chat-input {
  flex-grow: 1;
  background: transparent;
  outline: transparent;
  color: white;
  border: none;
  border-bottom: 1px solid white;
}

#chat-submit {
  width: 50px;
  color: white;
  background: transparent;
  border: none;
  box-shadow: none;
  font-weight: 100;
  font-size: 1em;
}

#chat-submit:hover {
  color: yellow;
  border: none;
  animation: none;
}

.subdued {
  opacity: .2;
  box-shadow: none;
  border: none;
  animation: none;
}

.subdued:hover {
  animation: none;
  background-color: black; 
  color: lightgoldenrodyellow; 
  cursor: default;
  border: none;
  /* border-radius: 10px; */
}

.hidden {
  visibility: hidden;
}

.removed {
  display: none;
}

@media screen and (max-width: 700px) {
  body {
    display: flex;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    margin: 0;
  }

  #chat-container {
    height: 35vh;
    width: 100vw;
  }

  h1 {
    font-size: 2em;
  }

  #credits {
    font-size: 10px;
  }

  .menu-content {
    border-radius: 00px 0px 0px 10px;
    box-sizing: border-box;
  }

  #info-panel {
    margin: 40px 0px 40px 42px;
    width: calc(100vw - 42px);
    height: calc(100vh - 80px);
  }

  #profile-content p,
  #quit-content p {
    font-size: 15px;
    margin: 20px 0;
  }

  #sound-toggle span {
    font-weight: 400;
  }

  #sound-toggle span.selected {
    font-weight: 600;
  }

  #chat-content {
    font-weight: 400;
  }
  
  .container {
    width: 100%;
  }
  
  .banner {
    display: flex;
    height: auto;
    justify-content: space-between;
    width: 100%;
    margin: 10px 0;
    font-size: 1em;
  }

  .text-box p, .text-box span {
    font-size: 1em;
  }

  #message-box {
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    top: calc(38vh + 2px);
    width: 100vw;
  }

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

  #message p {
    background-color: rgba(0,0,0,.75);
  }

  #input-bet {
    background-color: black;
  }

  #money-box, 
  #total-box {
    width:48%;
  }

  #button-bar {
    width: 70%;
    flex-wrap: wrap;
  }

  #button-bar button {
    margin: 3px 5px;
    font-size: 1em;
  }

  #player-hand {
    transform: translateY(-150px) scale(1.4);
  }

  .player-container .hand-container:nth-child(1) {
    position: fixed;
    bottom: 45vh;
    left: 0;
    transform: rotate(45deg) translateY(125px) translateX(50px) scale(.7);
  }

  .player-container .hand-container:nth-child(2) {
    position: fixed;
    bottom: 20vh;
    left: 0;
    transform: rotate(45deg) translateY(125px) translateX(80px) scale(.7);
  }

  .player-container .hand-container:nth-child(1) .hand-user-info,
  .player-container .hand-container:nth-child(2) .hand-user-info {
    align-items: flex-start;
    justify-content: flex-start;
    transform: rotate(-45deg) translateX(10px);
    min-height: 65px;
  }

  .player-container .hand-container:nth-child(1) .hand-player-name,
  .player-container .hand-container:nth-child(2) .hand-player-name {
    text-align: left;
    text-shadow: 1px 1px 1px black;
  }

  .player-container .hand-container:nth-child(1) .hand-player-name.selected,
  .player-container .hand-container:nth-child(2) .hand-player-name.selected {
    background: linear-gradient(to right, rgba(255,215,0,0.5),rgba(255,215,0,0.0));
  }

  .player-container .hand-container:nth-child(3) {
    transform: scale(.75) translateY(55px);
  }

  .player-container .hand-container:nth-child(3) .hand-player-name {
    text-shadow: 0px 1px 1px black;
  }

  .player-container .hand-container:nth-child(3) .hand-player-name.selected {
    background: linear-gradient(to left, rgba(255,215,0,0.0), rgba(255,215,0,0.5),rgba(255,215,0,0.0));
  }

  .player-container .hand-container:nth-child(4) {
    position: fixed;
    bottom: 20vh;
    right: 0;
    transform: rotate(-45deg) translateY(125px) translateX(-80px) scale(.7);
  }

  .player-container .hand-container:nth-child(5) {
    position: fixed;
    bottom: 45vh;
    right: 0;
    transform: rotate(-45deg) translateY(125px) translateX(-50px) scale(.7);
  }

  .player-container .hand-container:nth-child(4) .hand-user-info,
  .player-container .hand-container:nth-child(5) .hand-user-info {
    align-items: flex-end;
    justify-content: flex-start;
    transform: rotate(45deg) translateX(-10px);
    min-height: 65px;
  }

  .player-container .hand-container:nth-child(4) .hand-player-name,
  .player-container .hand-container:nth-child(5) .hand-player-name {
    text-align: right;
    text-shadow: -1px 1px 1px black;
  }

  .player-container .hand-container:nth-child(4) .hand-player-name.selected,
  .player-container .hand-container:nth-child(5) .hand-player-name.selected {
    background: linear-gradient(to left, rgba(255,215,0,0.5),rgba(255,215,0,0.0));
  }

  .player-container .hand-container:nth-child(1) .hand-player-stats,
  .player-container .hand-container:nth-child(2) .hand-player-stats,
  .player-container .hand-container:nth-child(4) .hand-player-stats,
  .player-container .hand-container:nth-child(5) .hand-player-stats {
    flex-direction: column;
    align-items: center;
  }

}


/* @media screen and (min-width: 1000px) {
  .hand {
    height: 200px;
  }

  .card {
    height: 190px;
    width: 131px;
    border-radius: 8px;
  }

  .text-box p {
    font-size: 1.3em;
  }
} */
