/* =========================================================
   NCG KEYBOARD NAME GAME v0.1
   Full keyboard look C-H
   Active range in game: C-D-E-F-G
========================================================= */

.keyboard-name-board {
  position: relative;

  display: flex;
  align-items: flex-start;
  justify-content: flex-start;

  width: min(100%, 720px);
  height: 190px;

  margin: 26px 0 22px;

  isolation: isolate;
}

.keyboard-name-key {
  position: relative;

  width: 92px;
  height: 180px;

  border: 1px solid rgba(15, 23, 42, 0.28);
  border-radius: 0 0 14px 14px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 1) 0%,
      rgba(248, 250, 252, 1) 58%,
      rgba(226, 232, 240, 1) 100%
    );

  color: rgba(15, 23, 42, 0.88);

  font-family: Raleway, Arial, sans-serif;
  font-size: 30px;
  font-weight: 800;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding-bottom: 24px;

  cursor: pointer;

  box-shadow:
    inset 0 -7px 0 rgba(15, 23, 42, 0.08),
    0 12px 24px rgba(15, 23, 42, 0.18);

  transition:
    box-shadow 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.keyboard-name-key + .keyboard-name-key {
  margin-left: -1px;
}

.keyboard-name-key[data-note]:hover {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 251, 235, 1) 60%,
      rgba(254, 240, 138, 0.92) 100%
    );
}

.keyboard-name-key[data-note]:active {
  box-shadow:
    inset 0 -3px 0 rgba(15, 23, 42, 0.10),
    0 6px 14px rgba(15, 23, 42, 0.14);
}

.keyboard-name-key--visual {
  cursor: default;
}

/* black keys layer: C#, D#, F#, G#, A# */
.keyboard-name-key:nth-child(1)::after,
.keyboard-name-key:nth-child(2)::after,
.keyboard-name-key:nth-child(4)::after,
.keyboard-name-key:nth-child(5)::after,
.keyboard-name-key:nth-child(6)::after {
  content: "";

  position: absolute;
  top: 0;
  right: -26px;
  z-index: 3;

  width: 52px;
  height: 112px;

  border-radius: 0 0 10px 10px;

  background:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 1) 0%,
      rgba(18, 18, 18, 1) 70%,
      rgba(38, 38, 38, 1) 100%
    );

  box-shadow:
    inset 0 -6px 0 rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.36);

  pointer-events: none;
}

.keyboard-name-key.correct {
  border-color: rgba(34, 197, 94, 0.92);

  background:
    linear-gradient(
      180deg,
      rgba(240, 253, 244, 1) 0%,
      rgba(187, 247, 208, 1) 100%
    );

  box-shadow:
    inset 0 -7px 0 rgba(34, 197, 94, 0.18),
    0 0 0 4px rgba(34, 197, 94, 0.16),
    0 12px 24px rgba(15, 23, 42, 0.18);
}

.keyboard-name-key.wrong {
  border-color: rgba(239, 68, 68, 0.92);

  background:
    linear-gradient(
      180deg,
      rgba(254, 242, 242, 1) 0%,
      rgba(254, 202, 202, 1) 100%
    );

  box-shadow:
    inset 0 -7px 0 rgba(239, 68, 68, 0.18),
    0 0 0 4px rgba(239, 68, 68, 0.16),
    0 12px 24px rgba(15, 23, 42, 0.18);
}

.keyboard-name-result {
  margin-top: 18px;
}

@media (max-width: 640px) {
  .keyboard-name-board {
    width: 100%;
    height: 150px;
    justify-content: center;
  }

  .keyboard-name-key {
    width: 58px;
    height: 142px;

    font-size: 23px;
    padding-bottom: 18px;
  }

  .keyboard-name-key:nth-child(1)::after,
  .keyboard-name-key:nth-child(2)::after,
  .keyboard-name-key:nth-child(4)::after,
  .keyboard-name-key:nth-child(5)::after,
  .keyboard-name-key:nth-child(6)::after {
    right: -17px;

    width: 34px;
    height: 88px;

    border-radius: 0 0 8px 8px;
  }
}
