* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}
.wrapper {
  padding: 15px 35px 15px 35px;
  border-radius: 20px;  
}
.wrapper header {
  display: flex;
  color: #B2B2B2;
  align-items: center;
  justify-content: space-between;  
  padding:15px;
}
.columnbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 35px 40px;
  background-color: #252424;
  border-radius: 20px;
  width: 100%;
  gap: 15px;
}

.piano-logo {
  flex: 0 0 auto;
  width: 10%;
}

.piano-title {
  flex: 1;
  min-width: 50%;
}

.piano-title h2 {
  padding-top: 5px;
  color: #FFD700;
}

.piano-title .version {
  color: #eee;
  font-size: 14px;
}

.chord-input {
	display: flex;
	align-items: center; /* vertically align items */
	gap: 1rem; /* optional: space between toggle and input */ 
}

/* Show HIde key Toggle css *********************************************/
.keys-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-family: sans-serif;
  width:100%;
}

.keys-checkbox input {
  height: 30px;
  width: 60px;
  cursor: pointer;
  appearance: none;
  position: relative;
  background: #4B4B4B; 
}
.keys-checkbox input::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8c8c8c;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}
.keys-checkbox input:checked::before {
  left: 35px;
  background: #fff;
}

/* Hide default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Switch base */
.switch {
  position: relative;
  display: inline-block;
  width: 65px;
  height: 26px;
}

/* Slider background */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc; /* Gray by default (unchecked = active) */
  transition: 0.4s;
  border-radius: 26px;
  width:50px;
}

/* Slider circle */
.slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

/* When checked, change to inactive (gray) */
.switch input:checked + .slider {
  background-color: #0BBAFB;
  width:50px;
}

/* Move circle right when checked */
.switch input:checked + .slider::before {
  transform: translateX(24px);
}

/*Piano buttons **********************************************************/
.columnboxpiano {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 15px 0 0 0;
  background-color: #252424;
  border-radius: 20px;
  width: 100%;
  box-sizing: border-box;
  gap: 10px; /* Optional spacing between columns */
}

.left-column{
	width:65%;
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: white; /* For visibility */
  box-sizing: border-box;
}

.wrapper .control {
  display: flex;
  color: #252424;
  align-items: center;
  justify-content: space-between;  
  padding:15px;
}
.control .column {
  display: flex;
  align-items: center;
  gap:5px;
}
.control span {
  font-weight: 500;
  margin-right: 15px;
  font-size: 1.19rem;
}
.control input {
  outline: none;
  border-radius: 30px;
}

.piano-keys {
  display: flex;
  list-style: none;
  margin-top: 40px;
  padding:20px;
}
ul.piano-keys  {  
  list-style-type: none !important;
}
.piano-keys .key {
  cursor: pointer;
  user-select: none;
  position: relative;
  text-transform: uppercase;
}
.piano-keys .black {
  z-index: 2;
  width: 44px;
  height: 140px;
  margin: 0 -22px 0 -22px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(#333, #000);
}
.piano-keys .black.active {
  box-shadow: inset -5px -10px 10px rgba(255,255,255,0.1);
  background:linear-gradient(to bottom, #000, #434343);
}
.piano-keys .white {
  height: 230px;
  width: 70px;
  border-radius: 8px;
  border: 1px solid #000;
  background: linear-gradient(#fff 96%, #eee 4%);
}
.piano-keys .white.active {
  box-shadow: inset -5px 5px 20px rgba(0,0,0,0.2);
  background:linear-gradient(to bottom, #fff 0%, #eee 100%);
}
.piano-keys .key span {
  position: absolute;
  bottom: 20px;
  width: 80%;  
  font-size: 1.13rem;
  text-align: center;
}
.piano-keys .key.hide span {
  display: none !important;
}
.piano-keys .black span {
  bottom: 13px;
  color: #888888;
}

.mark {
	height: 25px;
	width: 20px;	
	border-radius: 50%;
}

.piano-keys .key span.fullmark {
    background-color: rgba(255, 255, 0, 0.3); /* Light yellow with 30% opacity */
    border-radius: 4px;
    padding: 2px 4px;
    transition: background-color 0.3s ease;
}


/*Volume slider **********************************************************/
.volume-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.volume-slider span {
  font-weight: bold;
  color: #333;
  min-width: 60px;
}

.volume-slider input {
  accent-color: #fff;
}

.volume-slider input[type="range"] {
  -webkit-appearance: none;
  width: 150px;
  height: 6px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
  transition: background 0.3s;
}

.volume-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #0bbaFB;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.volume-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #0bbaFB;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}


/* Chord Option ***************************************************************************/
.chord-option select {
  background-color: #252424; /* dark background */
  color: #FFD700; /* golden text */
  border: 2px solid #00FFFF; /* cyan border matching toggle */
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  outline: none;
  transition: background-color 0.3s, color 0.3s;
  width: 190px; /* consistent width */
}

select option {
  background-color: #252424;
  color: #FFD700;
  font-weight: normal;
}

select:hover, select:focus {
  background-color: #1a1a1a;
  color: #00FFFF; /* highlight on focus/hover */
  border-color: #FFD700; /* gold border on hover */
  cursor: pointer;
}
/* MOBILE SCREEN **********************************************************************************************************************************************************************************************************************/

@media screen and (max-width: 1280px) {
  .wrapper {
    padding: 5px;	
  }
  header {
    flex-direction: column;
  }
  header :where(h2, .column) {
    margin-bottom: 13px;
  }
  
  .columnbox {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  
  .piano-logo,
  .piano-title,
  .chord-input {
    width: 100%;
    text-align: center;
  }

  .piano-title h2 {
    font-size: 20px;
  }
  
  .wrapper .control {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .control .column {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;	
  }
  
  .volume-slider {
    width: 100%;
  }

  .volume-slider input[type="range"] {
    width: 100% !important;
    max-width: 100%;
  }
  
  .chord-input input {
    width: 100%;
    font-size: 14px;
  } 

  .chord-option select {
    width: 100%;
    margin-left: 0;
    margin-bottom: 10px;
  }
  
 .left-column {
    width: 95% !important;
  }
  
  .columnboxpiano {
    flex-direction: column;
    align-items: center;
  }
 
  .piano-keys .black {
    height: 100px;
    width: 44px;
    margin: 0 -20px 0 -20px;
  }
  .piano-keys .white {
    height: 180px;
    width: 70px;
  }

  .piano-keys {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;    
    margin: 0 !important;
    padding: 0 5px;
  }
   
  .piano-keys .white {
    width: 9.5vw; /* Responsive width: ~8 white keys fit in 100% */
    height: 140px;
  }

  .piano-keys .black {
    width: 5vw;
    height: 100px;
    margin: 0 -2.5vw; /* center above white keys */
  }

  .right-column {
    width: 100%;
    padding: 10px 0;
    display: flex;
    justify-content: center;
  }

  canvas#equalizer {
    width: 90% !important;
    height: auto !important;
  }

  /* Optionally reduce font size inside keys */
  .piano-keys .key span {
    font-size: 10px;
  }
}

@media screen and (max-width: 768px) {
   .piano-keys .key:where(:nth-child(16), :nth-child(17)) {
    display: none;
  }
}
