body {
  margin: 0;
  background: #fff;
  font-family: "Righteous";
  display: flex;
  overflow: hidden;
}

canvas {
  border: solid 4px black;
  background: #d7fcc1;
}

.menu {
  display: flex;
  padding: 0 10px;
  text-align: center;
}

.menu button,
select {
  position: relative;
  font-family: "Righteous";
  margin: 5px 10px;
  padding: 10px 30px;
  font-size: 16px;
  color: white;
  background-color: #0055b3;
  border-radius: 4px;
  border: 2px solid #001833;
}

select {
  padding: 10px;
}

.menu button:disabled,
select:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.menu button span {
  font-size: 10px;
  color: lightgrey;
}

input[type="checkbox"] {
  appearance: none;
  -ms-progress-appearance: none;
  position: absolute;
}

input[type="checkbox"] + label {
  position: relative;
  font-family: "Righteous";
  margin: 5px 10px;
  padding: 10px 30px;
  font-size: 16px;
  line-height: 25px;
  background-color: white;
  color: #0055b3;
  border-radius: 4px;
  border: 2px solid #001833;
}

input[type="checkbox"]:checked + label {
  color: white;
  background-color: #0055b3;
}

input[type="checkbox"]:disabled + label {
  opacity: 0.3;
  cursor: not-allowed;
}

label {
  margin: 15px 0;
}

label + label {
  margin-left: 15px;
}

.players {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 60px;
}

.player {
  text-align: center;
  display: flex;
  flex-direction: column;
  margin: auto;
}

.player .input-container {
  display: flex;
  flex-direction: column;
  vertical-align: middle;
  margin-top: 10px;
  gap: 5px;
}

.player .input-container label{
  margin: 0;
}

.player .input-container input[type="color"] {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background: none;
  padding: 0;
  height: 20px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: none;
}


.player .input-container input[type="text"] {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background: none;
  padding: 0;
  height: 20px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border-style: solid;
  padding: 0 5px;
}

.player ::-webkit-color-swatch-wrapper {
  padding: 0;
}

.player ::-webkit-color-swatch{
  border: 0;
  border-radius: 0;
}

.player ::-moz-color-swatch,
.player ::-moz-focus-inner{
  border: 0;
}

.player ::-moz-focus-inner{
  padding: 0;
}

.keys {
  display: grid;
  grid-template-columns: 20px 20px 20px;
  grid-template-areas: ". up ." "left down right";
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
}

.keys > div {
  color: black;
  width: 20px;
  height: 20px;
  line-height: 18px;
  border: solid 1px grey;
  background-color: white;
}

.key .keys > div {
  width: 30px;
  height: 30px;
  line-height: 28px;
}

.keys .left {
  grid-area: left;
}
.keys .up {
  grid-area: up;
}
.keys .down {
  grid-area: down;
}
.keys .right {
  grid-area: right;
}

.touch-controlers {
  position: fixed;
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%);
}

.touch-controlers .keys {
  grid-template-columns: 80px 80px 80px;
  gap: 5px;
}

.touch-controlers .keys > button {
  display: static;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  opacity: 0.2;
  display:flex;
  vertical-align: middle;
  text-align: center;
  color: black;
  width: 80px;
  height: 80px;
  line-height: 76px;
  font-size: 72px!important;
  border: solid 1px black;
  background-color: grey;
}

.touch-controlers .material-symbols-outlined {
  font-size: 62px!important;
  line-height: 1.2!important;
  margin: auto;
}

.sprite {
  display: none;
}

.space-top {
  margin-top: 10px;
}

.space-top-l {
  margin-top: 25px;
}

.space-top-xl {
  margin-top: 40px;
}

.modal, .drawer {
  display: none;
  position: absolute;
  max-height: 90vh;
  min-height: 0;
  max-width: 95vw;
  min-width: 25vw;
  overflow-y: auto;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background-color: white;
  border-radius: 10px;
  filter: drop-shadow(
      1px 2px 8px #44444444
    );
}

.drawer .drawer-arrow {
  text-align: center;
  padding-top: 10px;
}

.modal.show, .drawer.show {
  display: block!important;
}

.drawer.show {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  top:0;
  transform: translateY(calc(-100% + 30px)) translateX(-50%);
  transition: transform .3s ease-in-out;
}

.drawer.show:hover {
  transform: translateY(0) translateX(-50%);
}

.modal .modal-header {
  position: sticky;
  top: 0;
  padding: 15px;
  display: flex;
  background: white;
}

.modal-header .btn-close {
  background: none;
  border: none;
  outline: none;
  appearance: none;
  cursor: pointer;
  
}

.modal-header h1,
.modal-header h2,
.modal-header h3,
.modal-header h4,
.modal-header h5 {
  margin: auto;
}

.modal .modal-content, .drawer .drawer-content {
  padding: 15px;
}

.btn-menu {
  border-color: black;
  border-radius: 3px;
  border-style: solid;
  background-color: white;
  color: #0055b3;
  padding: 10px 15px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  vertical-align: middle;
  line-height: 24px;
  gap: 5px;
}

.btn-menu.square {
  aspect-ratio: 1;
  min-width: 0;
}

.btn-menu.selected {
  border-color: black;
  border-radius: 3px;
  border-style: solid;
  background-color: #0055b3;
  color: white;
}

.btn-menu small {
  font-weight: 200;
}

.score {
  padding: 10px;
}

.score table {
  width: 100%
}

.score table tr th {
  text-align: left;
}

.player-color {
  height: 12px;
  width: 30px;
  border-radius: 15px;
  display: inline-block;
  margin-right: 5px;
}

.winner-podium {
  text-align: center;
}

.winner-podium svg {
  max-width: min(250px, 50vw);
}

.only-touch {
  display: none;
}

@media (max-width: 900px) {
  .modal {
    display: none;
    position: absolute;
    max-height: 95vh;
    min-height: 0;
    max-width: 95vw;
    min-width: 95vw;
  }

  .drawer {
    max-width: 95vw;
    min-width: 95vw;
  }
}

@media (pointer: coarse) {
  .hide-touch {
    display: none;
  }

  .only-touch {
    display: block;
  }
}