@keyframes notice_fade {
  0% {
    height: 15em;
    opacity: 0%;
    margin-top: 0;
  }
  30% {
    height: 15em;
    opacity: 100%;
    margin-top: 0;
  }
  100% {
    height: 15em;
    opacity: 0;
    margin-top: -2em;
  }
}

@keyframes blink {
  0% {
    box-shadow: 0 0 20vw gold inset;
  }

  100% {
    box-shadow: none;
  }
}

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

.blink {
  animation-name: blink;
  animation-duration: 3s;
}

html {
  background: black;
  color: white;

  a, a:visited {
    color: #00dd00;
  }

  a:hover {
    color: white;
  }

  ul {
    list-style-type: disc;
    list-style-position: inside;
  }
}

div.notice {
  z-index: 100;
  display: flex;
  position: fixed;
  top: 35%;
  left: 50%;
  width: 20em;
  margin-left: -10em;
  height: 0em;
  opacity: 0%;
  justify-content: center;
  align-items: center;
  vertical-align: center;
  animation-name: notice_fade;
  animation-duration: 3s;

  div.notice-popup {
    background-color: black;
    border: 1px outset green;
    width: 20em;
    height: 5em;
    text-align: center;
    vertical-align: middle;

    span {
      line-height: 5em;
      padding: 0;
      margin: 0
    }

  }
}

div.header {
  padding: .5em 0;
  height: 8vw;

  button.hamburger-menu, nav {
    transition: opacity .35s, visibility .35s, width .35s;
  }

  button.hamburger-menu:hover .hamburger {
    color: white;
    cursor: pointer;
  }

  button.hamburger-menu {
    z-index: 100;
    position: fixed;
    left: 0;
    top: 0;
    margin: 1vh 1vw;
    width: 3vw;
    height: 3vh;
    display: block;
    background: black;
    color: green;
    border: none;

    span.hamburger {
      font-weight: normal;
      display: block;
      clear: both;
      font-size: 7vh;
      line-height: 1.5vh;
    }

    span.hamburger:first-child {
      margin-top: -1em;
    }

    nav.sidebar-menu {
      visibility: hidden;
      opacity: 0;
      position: fixed;
      top: 0;
      left: 0;
      width: 20%;
      height: 100%;
      background: black;
      padding: 0;
      border-right: 5px solid darkgreen;

      div.info {
        color: white;
        margin: 1em 0;
      }

      ul {
        list-style: none;

        li {
          a {
            text-decoration: none;
            display: block;
            line-height: 2em;
            border-bottom-style: groove;
            border-bottom-color: green;
            border-bottom-width: 5px;
          }

          a:hover {
            /*text-decoration: underline;*/
            background: darkgreen;
          }
        }
      }
    }
  }

  button.hamburger-menu:focus, button.hamburger-menu:focus-within {
    nav {
      visibility: visible;
      opacity: 1;
      width: 50%;
    }
  }
}

h3.turn {
  position: absolute;
  top: 0;
  right: 0;
  margin: -8vw 1vw 0 0;
  line-height: 8vw;
}

div.game-wrapper {
  position: relative;
  display: inline-block;
}

table.board {
  border-spacing: 0;
  border: 4px outset goldenrod;
  background: #f8faef;
  color: black;
  font-family: monospace;
  position: relative;

  tr:nth-child(2n+1) {
    td:nth-child(2n) {
      background: tan;
    }
  }

  tr:nth-child(2n) {
    td:nth-child(2n+1) {
      background: tan;
    }
  }

  tr {
    height: 12vw;
    td {
      padding: 0;
      font-size: 10vw;
      width: 12vw;
      text-align: center;

      input[type="radio"] {
        position: absolute;
        display: none;
        cursor: pointer;
      }

      table.move {
        display: none;
        position: absolute;
        border: 4px outset goldenrod;
        top: 0;
        left: 0;

      }

      input[type="radio"]:checked + table {
        display: block;
      }

      label, span {
        display: block;
        width: 12vw;
        height: 12vw;
        line-height: 12vw;
      }

      label {
        cursor: pointer;
      }
    }
  }
}

table.move {
  background-color: transparent !important;

  tr {
    height: 12vw;
  }

  td {
    opacity: 75%;
    background-color: transparent !important;
  }

  label {
    box-shadow: 0 0 20px cornflowerblue inset;
  }

  input[type="radio"]:checked + label {
    box-shadow: 0 0 50px darkred inset;
  }
}

div.buttons {
  font-size: large;
  margin: 1em 0;

  input[type="radio"] {
    display: none;
  }

  label {
    background: #eee;
    border: 1px solid #777;
    border-radius: .25em;
    padding: 0 .25em;
    color: black;
  }

  label:hover {
    background: #ccc;
  }

  label:active {
    background: #777;
  }

  input[type="submit"] {
    float: right;
    font-size: large;
  }
}

fieldset.chess-set {
  display: inline-block;

  ul {
    list-style: none;
    padding: 0;

    li {
      display: inline-block;
      border: 3px outset tan;
      background: #f8faef;
      color: black;
      border-radius: .25em;
      margin: 0.75em 0.25em;
      padding: 0.1em 0.25em;

      span {
        display: block;
      }

      span.rank {
       font-size: small;
      }
    }
  }
}

@media (orientation: landscape) {
  div.header {
    height: 8vh;
  }

  h3.turn {
    margin: -8vh 1vh 0 0;
    line-height: 8vh;
  }
  table.board {

    tr {
      height: 9vh;
      td {
        font-size: 7vh;
        width: 9vh;

        label, span {
          display: block;
          width: 9vh;
          height: 9vh;
          line-height: 9vh;
        }
      }
    }
  }
  table.move {
    background-color: transparent !important;

    tr {
      height: 9vh;
    }
  }
}
