.chord-key {
  border: none;
  outline: none;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  
  height: 100%;
  width: 100%;
  
  /* Inner text */
  color: #e2e2e2;
  font-size: large;
  font-weight: bold;
  
  background: radial-gradient(circle, #7771d2, #4f47b8);
  
  /* minor QOL for touch devices */ 
  -webkit-tap-highlight-color: transparent;
  user-select: none;

  cursor: pointer;
  
  /* make button pop out */ 
  transition: transform 0.05s ease-in-out, scale 0.05s ease-in-out;
  scale: 103%;
  transform: translate(-0%, -5%);
}

.chord-key-wrapper {
  /* Acts as border for the keys */ 
  background-color: #383846;
  padding: 3px;

  height: 40%;
  width: 21%;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  transform: translate(-50%, -50%);
  position: absolute;
  top: var(--y);
  left: var(--x);
}

.chord-key.pressed {
  scale: 100%;
  transform: translate(0%, 0.5%);
  background: radial-gradient(circle, #f3be21, #ffda75);
}

body {
  margin: 0;
  display: flex;
  justify-content: center;
}

#mini-synth {
  background-color: #e2a953;
  margin-top: 30px;
  height: 850px;
  width: 900px;
  border-radius: 75px;
  box-shadow:
    14px 0 3px -7px #e0a54c inset,
    -14px 0 3px -7px #e09e3a inset,
    0 32px 3px -7px #d99022 inset,
    0 -6px 3px -4px #d28613 inset;
  background-image: linear-gradient(#d99022, #d28613);
  display: flex;
  flex-direction: column;

}


#waves {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

#waveviz {
  width: 80%;
  height: 80px;
  display: block;
  border-radius: 18px;
}

#keys {
  /* border: #0b0b10 1px solid; */
  position: relative;
  height: 50%;
  width: 100%;
}


#piano {
  align-self: center;
  height: 8%;

  padding: 10px 12px;
  border-radius: 16px;
  background-image: linear-gradient(#2a2a33, #17171d);
  user-select: none;
}

.mini-piano {
  position: relative;
  display: flex;
  gap: 2px;
}

/* white keys */
.pkey.white {
  width: 14px;
  height: 54px;
  border-radius: 4px;
  background-image: linear-gradient(#f2f2f6, #d9dae0);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 -8px 10px rgba(0, 0, 0, .14) inset;
}

/* black keys overlay */
.pkey.black {
  position: absolute;
  top: 0;
  width: 9px;
  height: 32px;
  border-radius: 3px;
  background-image: linear-gradient(#2c2c32, #0b0b10);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .08) inset,
    0 -8px 10px rgba(0, 0, 0, .35) inset;
}

/* active notes */
.pkey.active {
  background-image: linear-gradient(#6a63ff, #4a3fd1);
  box-shadow:
    0 0 6px rgba(106, 99, 255, .85),
    0 0 12px rgba(106, 99, 255, .35);
}

.pkey.black.active {
  background-image: linear-gradient(#6a63ff, #3a33b6);
}

.pkey.bass {
  background-image: linear-gradient(#ffda75, #f2c94c);
  box-shadow:
    0 0 6px rgba(242, 201, 76, .75),
    0 0 12px rgba(242, 201, 76, .35);
}

.pkey.black.bass {
  background-image: linear-gradient(#f2c94c, #b88918);
}

.control-row {
  display: flex;
  gap: 12px;
}

.hidden {
  display: none !important;
}

#guitar {
  display: flex;
  justify-content: center;
  align-items: center;
}

#guitar .guitar {
  position: relative;
  height: 90px;
  width: 800px;
  border-radius: 12px;
  background: #7a624c;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 6px;
  overflow: visible;  
}

#guitar .guitar::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 6px;
  bottom: 6px;

  /* strings */
  background:
    linear-gradient(rgba(246, 205, 0, 0.699), rgba(246, 205, 0, 0.699)) 0 0 / 100% 3px,
    linear-gradient(rgba(246, 205, 0, 0.699), rgba(246, 205, 0, 0.699)) 0 20% / 100% 3px,
    linear-gradient(rgba(246, 205, 0, 0.699), rgb(246, 205, 0, 0.699)) 0 40% / 100% 3px,
    linear-gradient(rgba(246, 205, 0, 0.699), rgba(246, 205, 0, 0.699)) 0 60% / 100% 3px,
    linear-gradient(rgba(246, 205, 0, 0.699), rgba(246, 205, 0, 0.699)) 0 80% / 100% 3px,
    linear-gradient(rgba(246, 205, 0, 0.699), rgba(246, 205, 0, 0.699)) 0 100% / 100% 3px;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: .95;
}


#guitar .guitar::after {
  content: "";
  position: absolute;
  left: calc(10px + 18px);
  right: 10px;
  top: 6px;
  bottom: 6px;
  /* 6 pieces:  100%/6 */
  background:
    repeating-linear-gradient(to right,
      rgba(255, 255, 255, 0.606) 0 2px,
      transparent 1px calc(100%/6));
  pointer-events: none;
  opacity: .85;
}

.g-row{
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 0..5 */
  align-items: center;
}

.g-string-label{ position: absolute; left: -9999px; }

.g-cell{
 width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.g-cell::after{
  content:"";
  width: 8px;      
  height: 8px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity .08s ease, transform .08s ease, box-shadow .08s ease;
}


.g-cell.active::after{
  opacity: 1;
  transform: scale(1.5);
  background-image: linear-gradient(#6a63ff, #4a3fd1);
}


#controls {
  display: flex;
  flex-direction: row;
  height: 32%;
  width: 100%;
  gap: 16px;
}

#controls-1 {
  /* border: #0b0b10 1px solid; */
  flex: 1.25;
  place-items: flex-start;
  display: flex;
  gap: 10px;
  flex-direction: column;
  padding-top: 40px;
  padding-left: 60px;
}

#controls-2 {
  flex: 0.5;
  padding-top: 40px;
}

#controls-2 .control-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#controls-3 {
  flex: 1.25;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.control-dropdown-container {
  /* border: #0b0b10 1px solid; */
  position: relative;
  width: 250px;
}

.control-dropdown-label {
  width: 220px;
  height: 30px;
  padding: 10px 0px 10px 20px;
  border-radius: 16px;
  background-color: #2a2a33;

  display: flex;
  align-items: center;
  font-size: 19px;
  font-weight: 500;
  color: #e2e2e2;
  
  pointer-events: none; /* Let clicks pass through to the select below */

  /* Draw arrow on dropdown */
  background-image: url('data:image/svg+xml;utf8,<svg fill="%232c3e50" height="28" viewBox="0 0 24 24" width="28" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.control-dropdown-select {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 10px 0px 10px 20px;

  cursor: pointer;
  opacity: 0; /* Hidden but clickable */

  font-size: 17px;
  font-weight: 500;
  color: #e2e2e2;
  background-color: #2a2a33;
}

.joystick-box {
  height: 200px;
  width: 200px;
}

#joystick-direction {
  font-size: 18px;
  text-align: center;
  color: #ffffff;
  width: 120px;
  background-color: #2a2a33;
}