html,
body {
  --main-bg-color: rgb(196, 226, 255);
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fitted-container {
  padding: 4px;
  max-width: 600px;
  margin: auto;
}
#piano {
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading {
  pointer-events: none;
  opacity: 0.5;
  margin: auto;
}

#container {
  margin: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#piano {
  max-width: 100%;
}

.hide .setting {
  display: none;
}

#spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #000;
  border-bottom-color: #ff3d00;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1000;
}

.white-key,
.black-key {
  transition: fill 0.2s;
}

.white-key {
  fill: #fff;
  stroke: #000;
  &:hover {
    fill: #e0e0e0;
  }
  &.highlight {
    fill: #ccc !important;
  }
  & ~ text {
    fill: #000;
  }
}

.black-key {
  fill: #000;
  stroke: #000;
  &:hover {
    fill: #333;
  }
  &.highlight {
    fill: #555 !important;
  }

  & ~ text {
    fill: #fff;
  }
}

text {
  font-size: 48px;
  font-family: 'Courier New', Courier, monospace;
  pointer-events: none;
}

.pane-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  .pane {
    padding: 8px;
  }
}

header {
  background-color: var(--main-bg-color);
  border-bottom: solid 1px black;
  margin-bottom: 16px;
}
.settings {
  display: grid;
  row-gap: 8px;
  column-gap: 4px;
  grid-template-columns: 1fr 1fr;
  input[type='checkbox'] {
    margin-left: 8px;
    + label {
      margin-left: 4px;
    }
  }
}

@media (max-width: 576px) {
  .settings,
  .pane-container {
    grid-template-columns: 1fr;
  }
  .pane-container > * {
    margin: auto;
  }
}
