html,
body {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  color: #333;
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue',
    sans-serif;
  background-color: #339;
  background-image: url('/bg-suits.png');
  background-repeat: repeat;
  background-attachment: scroll;
  animation: background-anim 4s linear infinite;
}

@keyframes background-anim {
  /* bg image is 374x421 */
  0% {
    background-position: 0px 0px;
  }
  100% {
    background-position: -374px -421px;
  }
}

body.game_online {
  animation: none;
  background-color: #789abc;
  background-position: -50px -50px;
}

body.game_local {
  animation: none;
  background-color: #aaa;
  background-position: -50px -50px;
}

a {
  color: rgb(0, 100, 200);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: rgb(0, 80, 160);
}

label {
  display: block;
}

input,
button,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  padding: 0.4em;
  margin: 0 0 0.5em 0;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 2px;
}

input:disabled {
  color: #ccc;
}

input[type='range'] {
  height: 0;
}

button {
  color: #333;
  background-color: #f4f4f4;
  outline: none;
}

button:disabled {
  color: #999;
}

button:not(:disabled):active {
  background-color: #ddd;
}

button:focus {
  border-color: #666;
}

/**
 * icomoon for music and profile icons
 */

@font-face {
  font-family: 'icomoon';
  src: url('/fonts/icomoon.eot?hruft5');
  src: url('/fonts/icomoon.eot?hruft5#iefix') format('embedded-opentype'),
    url('/fonts/icomoon.ttf?hruft5') format('truetype'), url('/fonts/icomoon.woff?hruft5') format('woff'),
    url('/fonts/icomoon.svg?hruft5#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

[class^='icon-'],
[class*=' icon-'] {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: 'icomoon' !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-music:before {
  content: '\e911';
}
.icon-user:before {
  content: '\e971';
}

/**
 * Shared CSS between game-stage and deal-animation
 */

div.avatar {
  width: 13vw;
  max-width: 20vh;
  height: 13vw;
  max-height: 20vh;
  border-radius: 50%;
  border: 7px solid rgba(220, 220, 30, 0.5);
  overflow: hidden;
  margin: 0 auto;
  position: relative;
  left: 0.3vw;
}

div.avatar img {
  height: 100%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
}

div.name {
  width: 13vw;
  text-align: center;
  color: #fff;
  text-shadow: 2px 2px 2px #000000;
  font-weight: bold;
  font-size: 36px;
  margin: 0 auto;
  position: relative;
  top: -3vh;
}

@media all and (orientation: landscape) {
  div.opponentRightBox {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 100%;
    transform: translate(-63%, -50%) rotate(270deg); /* add scaleY(50%) for hand held effect? */
    width: 60vw;
    height: 25vh;
  }

  div.opponentRightBox div.infoDiv {
    transform: rotate(-270deg); /* unrotate avatar/name */
  }

  div.opponentTopBox {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0) rotate(180deg); /* add scaleY(50%) for hand held effect? */
    width: 60vw;
    height: 25vh;
  }

  div.opponentTopBox div.infoDiv {
    transform: rotate(-180deg); /* unrotate avatar/name */
  }

  div.opponentLeftBox {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 0;
    transform: translate(-37%, -50%) rotate(90deg); /* add scaleY(50%) for hand held effect? */
    width: 60vw;
    height: 25vh;
  }

  div.opponentLeftBox div.infoDiv {
    transform: rotate(-90deg); /* unrotate avatar/name */
  }

  div.playerBox {
    position: absolute;
    z-index: 5;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 60vw;
    height: 25vh;
  }

  div.infoDiv {
    float: left;
    width: 15vw;
    height: 25vh;
  }

  div.handDiv {
    float: left;
    width: 45vw;
    height: 25vh;
  }
}

@media all and (orientation: portrait) {
  div.opponentLeftBox {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100vw;
    height: 14vh;
  }

  div.opponentTopBox {
    position: absolute;
    z-index: 3;
    top: 15vh;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100vw;
    height: 14vh;
  }

  div.opponentRightBox {
    position: absolute;
    z-index: 4;
    top: 30vh;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100vw;
    height: 14vh;
  }

  div.playerBox {
    position: absolute;
    z-index: 5;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100vw;
    height: 20vh;
  }

  div.infoDiv {
    float: left;
    width: 18vw;
    height: 14vh;
  }

  div.playerBox div.infoDiv {
    width: 18vw;
    height: 20vh;
  }

  div.handDiv {
    float: left;
    width: 82vw;
    height: 14vh;
  }

  div.playerBox div.handDiv {
    width: 82vw;
    height: 20vh;
  }

  div.name {
    font-size: 20px;
    top: -2vh;
    line-height: 1;
  }
}
