html, body {
  margin: 0;
  font-family: sans-serif;
  background-color: #eaeaea;
}
html {
  height: 100%;
}
body {
  min-height: 100%;
}
:root {
  font-size: 12px;
}

header {
  background: #5a0430;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 1.2rem;

  border-bottom-right-radius: 25%;
  border-bottom-left-radius: 25%;

  margin-bottom: 2rem;
  min-height: 10.5rem;
}

h1 {
  font-size: 2.5rem;
  margin: 0;
}

header p {
  margin-top: 0.3rem;
}

header button {
  background-color: #efc54e;
  color: black;
  border: none;
}

header button:hover, header button:focus {
  background-color: #e1b948;
  border: none;
}

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

#control {
  position: fixed;
  background-color: black;
  opacity: 0.5;
  right: 0;
  top: 0;
  border-bottom-left-radius: 1.6rem;
}

#control:not(.hidden) {
  animation-name: controlIn;
  animation-duration: 0.2s;
  -webkit-animation-name: controlIn;
  -webkit-animation-duration: 0.2s;
  animation-timing-function: ease-out;
}

#control button {
  border: none;
  background: none;
  font-weight: bold;
  padding: 0.3rem;
}

#control button:hover, #control button:focus {
  filter: opacity(50%);
}

#control button.disabled {
  opacity: 0.4;
  cursor: auto;
}

#control button#pause-btn {
  margin: 0 0.6rem;
}

.hidden {
  display: none !important;
}

@keyframes start {
  from {transform: translateY(25%); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}

#demo:not(.hidden) {
  animation-name: start;
  animation-duration: 0.7s;
  -webkit-animation-name: start;
  -webkit-animation-duration: 0.7s;
  animation-timing-function: ease-out;
}

.sr-only {
  position: absolute;
  top: -9999px;
  left: -9999px;
  opacity: 0;
}

button {
  color: white;
  background-color: #e05656;
  border: solid #e05656 0.3rem;
  border-radius: 0.5rem;
  font-size: inherit;
  padding: 0.4rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;

  margin-bottom: 0.4rem;
}

button:focus, button:hover {
  background-color: #b14141;
  border: solid #b14141 0.3rem;
}

button.active {
  background-color: #3c3c3c;
  font-weight: bold;
  border: solid #e1e1e1 0.3rem;
}
button.active:hover, button.active:focus {
  background-color: #666262;
}

button.disabled {
  opacity: 0;
  cursor: auto;
}

@media screen and (min-width: 800px) {
  :root {
    font-size: 16px;
  }
  #demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: dense;
  }
  header {
    border-bottom-right-radius: 50%;
    border-bottom-left-radius: 50%;
  }
  #beat {
    height: 6rem !important;
    min-width: 12rem !important;
  }
}

#demo > div {
  padding: 1rem;
  overflow: auto;
}

#demo .text {
  background-color: #efc54e;
  color: black;
}

h2 {
  margin-top: 0;
}

#init {
  grid-area: 1 / 2
}

#options {
  grid-area: 3 / 2
}

pre {
  background-color: #e3dbdb;
  padding: 0.5rem;
  color: #4b4b4b;
  border-radius: 0.4rem;
  border-bottom: 1rem;
  font-size: 1rem;

  min-width: min-content;
  min-width: -webkit-min-content;
  min-width: -moz-min-content;
}

.players {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.players > div {
  text-align: center;
  margin: 0 2rem; 
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#options-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: stretch;
  align-items: start;
  column-gap: 2rem;
}

#options-players .player {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

#scheduler span {
  opacity: 0;
  transition: opacity 0.6s;
  font-size: 0.8em;
}
#scheduler.trigger span {
  opacity: 1;
}

.shamisen button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#beat {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 1rem 1rem;
  border-radius: 2rem;
  color: white;
  height: 3rem;
  min-width: 8rem;
  margin-top: 0.1rem;
}
#beat > div {
  height: 80%;
  width: 20%;
  background-color: white;
  transition: transform 0.1s ease;
}
#beat.off {
  background-color: #71145c;
}
#beat.off > div {
  transform: translateX(2.8rem);
}
#beat.on {
  background-color: #6d6dc2;
}
#beat.on > div {
  transform: translateX(-2.8rem);
}

button#animation-stop {
  background-color: white;
  color: #e05656;
}
button#animation-stop:hover, button#animation-stop:focus {
  background-color: #eaeaea;
  color: #e05656;
}

@keyframes eight {
  from {opacity: 1;}
  to {opacity: 0;}
}

#eight {
  margin-top: 0.5rem;
  align-items: center;
  padding: 1rem 1rem;
  border-radius: 2rem;
  color: white;
  background-color: #e7697b;
  font-weight: bold;
  font-size: 1.3rem;
  font-style: italic;
  opacity: 0;
}
#eight.trigger {
  animation-name: eight;
  animation-duration: 1.5s;
  -webkit-animation-name: eight;
  -webkit-animation-duration: 1.5s;
}

footer {
  padding: 2rem;
  text-align: center;
  border-top: solid grey 0.1rem;
  box-shadow: 0rem -0.9rem 0.8rem grey;
  border-top-right-radius: 50%;
  border-top-left-radius: 50%;
  bottom: 0;
  background-color: #eaeaea;
  z-index: 0;
  margin-top: 2rem;
}

footer a {
  color: #e05656;
  font-weight: bold;
}

@keyframes down {
  from {transform: translateY(0); opacity: 1;}
  to {transform: translateY(500%); opacity: 0;}
}

footer.down {
  animation-name: down;
  animation-duration: 0.3s;
  -webkit-animation-name: down;
  -webkit-animation-duration: 0.3s;

  transform: translateY(500%);
  opacity: 0;
}