:root {
  --hover: rgba(120,160,255,0.18);
}

* { box-sizing: border-box; }

h1 {
  font-size: 3em;
}

.display-flex {
  display: flex;
  justify-content: space-between;
}

.generator-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
}

.generator-popup-content {
  width: 95%;
  height: 95%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

iframe {
  flex: 1;
  width: 100%;
  border: none;
}

.close-popup {
  width: fit-content;
  align-self: end;
  margin: 20px 20px 0px 0px;
  font-size: 30px;
}

.generate-button {
  width: fit-content;
  font-size: 25px;
  margin: 80px 0px 40px;
  background-color: rgb(255, 226, 172);
}

.generate-button:hover {
  background-color: rgb(240, 209, 152);
}

.song-list {
  width: 450px;
}

thead {
  text-align: left;
}

.table-row:hover {
  background-color: rgb(223, 243, 255);
}

body {
  font-family: monospace;
  margin: 0;
  padding: 16px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}










button {
  margin: 4px;
  position: relative;
  font-family: monospace;
}

button:disabled {
  opacity: 0.35;
}

button.active {
  background: #bbb;
}

/* ===== Top ===== */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #bbcbe8;
  border-radius: 10px;
  padding: 10px;
}

.title-input {
  font-size: 25px;
  font-family: monospace;
  background-color: transparent;
}

.tempo-play {
  display: flex;
  justify-content: end;
  align-items: center;
}

.controls .row {
  margin-bottom: 6px;
}











/* ===========================
     STAVE
    S     S
    S
     STAVE
          S
    S     S
     STAVE
=========================== */





#stave {
  margin: 12px 0px;
  padding: 10px;
  height: -webkit-fill-available;
  overflow-y: auto;
  min-height: 0;
  background-color: #e8f0ff;
  border-radius: 10px;
}

.stave-row {
  position: relative;
  display: flex;
  gap: var(--gap);
  padding: var(--staff-step) 16px;
  margin-bottom: 60px;
  border-right: 1px solid #999;
}

.stave-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: #999;
}



.placeholder {
  width: var(--note-width);
  flex-shrink: 0;
}

.cursor::after {
  content: "";
  position: absolute;
  top: 0px;
  bottom: 0px;
  width: 3px;
  background: black;
  animation: blink 1s steps(1) infinite;
}

.end-cursor-hover {
  width: -webkit-fill-available;
  position: relative;
  top: -10px;
  height: inherit;
}

.end-cursor-hover:hover::before {
  content: "";
  position: absolute;
  top: 0px;
  bottom: 0px;
  width: 3px;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

@keyframes blink {
  50% { opacity: 0; }
}










/* ===========================
   ITEMS ITEMS
        I
        I
        I
        I
   ITEMS ITEMS
=========================== */




.wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.wrap:hover::before {
  content: "";
  position: absolute;
  top: 0px;
  bottom: 0px;
  background-color: #bbcbe8;
  width: 25px;
}

.sharp::after {
  content: "#";
  font-size: 45px;
  position: absolute;
  color: white;
  left: -13px;
  top: -20px;
  text-shadow: 0 0 4px black;
}

.flat::after {
  content: "♭";
  font-size: 45px;
  position: absolute;
  color: white;
  left: -9px;
  top: -25px;
  text-shadow: 0 0 4px black;  
}

.oct-up::after {
  content: "+8";
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  color: rgb(160, 185, 201);
}

.oct-down::after {
  content: "-8";
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  color: rgb(160, 185, 201);
}




.note {
  width: var(--note-width);
  height: var(--note-height);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--note-font-size);
  color: white;
  position: relative;
  transform: translateY(var(--y));
  z-index: 2;
  cursor: default;
  flex-shrink: 0;
}

.note.selected,
.space.selected,
.enter.selected {
  outline: 3px solid black;
}


.space {
  width: var(--space-width);
  height: var(--note-height);
  position: relative;
}

.enter {
  width: var(--space-width);
  height: var(--note-height);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #888;
  position: relative;
}



.do, .di  { background:#6d6978; }
.re, .ra, .ri  { background:#72bf96; }
.mi, .ma  { background:#e1cb73; color:black; }
.fa, .fi  { background:#71afb6; }
.so, .sa, .si  { background:#daa255; }
.la, .lo, .li  { background:#c16e6e; }
.ti, .ta  { background:#9c83b0; }

.sharp { filter: brightness(1.25); }
.flat  { filter: brightness(0.75); }





.lyric {
  position: relative;
  bottom: -50px;
  text-align: center;
  background-color: transparent;
  border: 1px solid grey;
  border-radius: 3px;
  font-size: 10px;
  font-family: monospace;
  color: grey;
}










/* ===========================
    PIANO
    P     P
    PIANO
    P
    P
=========================== */






.key-input {
  width: fit-content;
  margin-bottom: 16px;
}

.piano-area {
  bottom: 0px;
  left: 0px;
  position: relative;
  height: fit-content;
  width: -webkit-fill-available;
  display: flex;
}

.tile-group {
  display: flex;
}

.black-tile-div {
  position: absolute;
  display: flex;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: end;
  text-align: center;
  font-weight: 900;
  text-shadow:
      0 0 5px #0ff,
      0 0 10px #0ff,
      0 0 20px #0ff,
      0 0 40px #0ff,
      0 0 80px #0ff;
  }

.tile:hover {
  background-color: #72bf96;
}

.white-tile {
  height: var(--white-tile-height);
  width: var(--white-tile-width);
  background-color: white;
  border: 1px solid grey;
}

.black-tile {
  height: var(--black-tile-height);
  background-color: black;
  width: var(--black-tile-width);
  color: white;
}

.c-black-tile-gap {
  gap: var(--black-tile-width);
  margin: 0px var(--black-tile-width);
}

.f-black-tile-gap {
  gap: var(--second-black-tile-gap);
  margin: 0px var(--second-black-tile-gap);
}

.played-key {
  background-color: rgb(127, 141, 216);
}

.played-key:hover {
  background-color: rgb(127, 141, 216);
}

.grey-text {
  color: rgb(196, 196, 196);
  font-weight: 100;
  text-shadow: none;
}







.bass-string {
  border-top: 4px solid rgb(189, 189, 189);
  height: var(--fret-height);
  width: 100%;
  display: flex;
}


.fret {
  top: var(--text-offset);
  position: relative;
  padding: 0px 2px;
  width: var(--fret-width);
  height: var(--fret-height);
  text-shadow:
      0 0 5px #0ff,
      0 0 10px #0ff,
      0 0 20px #0ff,
      0 0 40px #0ff,
      0 0 80px #0ff;
  text-align: center;
  border-right: 1px solid grey;
  line-height: var(--fret-height);
}

.fret:hover {
  background-color: #72bf96;
}

.dot::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 100%;
  background-color: rgb(189, 189, 189);
}