* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}
.content-wrapper {
    padding: 5px 10px 15px 10px;
    border-radius: 20px;
}
.content-wrapper header {
    display: flex;
    color: #B2B2B2;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
}
.columnbox {
  display: grid;
  grid-template-columns: 1fr 4fr 1fr; /* 3 columns */
  align-items: center;
  padding: 15px 20px;
  background-color: #252424;
  border-radius: 20px;
  width: 100%;  
}

/* Left column layout */
.col-left {
  display: flex;
  flex-direction: column;
}

/* Logo + Title in one row */
.piano-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Title styling */
.piano-title h2 {
  margin: 0;
  font-size: 21px;
  font-weight: bold;
  color: #555555; /* yellow */
  font-style:italic;
  font-family:fantasy;
}

.piano-title .version {
  font-size: 18px;
  color: #555555; /* light blue */
  margin-left: 6px;
  font-family:cursive;
}

/* Speaker styling */
.piano-speaker img {
  margin-top: 5px;
  max-width: 150px;
}

/* Center column */
.col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
}

/************ Recording part *************************************************************************************/
.equalizer-notes-row {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 100%; /* Make sure it fills available space */
  max-width: 100%;
}

/* Note display wrapper */
.note-display-wrapper {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 10px 15px;  
  min-height: 100px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
  border: 1px solid #444;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-grow: 1;
  width: 90%; /* or auto with flex-grow */
  min-height: 125px;
  max-width: 100%;
overflow-x: hidden;
}

.equalizer-wrapper {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 10px 15px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
  border: 1px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px; /* match canvas width */
  min-height: 100px; /* match canvas height */
}

.note-display {
  width: 100%;
  height: 100px;
  overflow-x: hidden;   /* no horizontal scroll */
  overflow-y: auto;     /* vertical scroll if content exceeds */
  white-space: normal;  /* allow wrapping */
  padding: 8px 12px;
  background: #121212;
  border-radius: 8px;
  color: #eee;
  font-family: monospace, monospace;
  font-size: 16px;
  user-select: text;
  box-sizing: border-box;
}

/* ID selector corrected */
/* Container: wraps the notes */
#played-notes {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  background: #121212;
  border-radius: 8px;
  padding: 8px 12px;
  height: 100px;
  color: #eee;
  font-family: monospace;
  font-size: 16px;
  box-sizing: border-box;
  gap: 6px 8px; /* gap: row-gap column-gap */
  line-height: 1; /* Reduces line height */
}

#played-notes::-webkit-scrollbar {
  width: 10px;              /* width of vertical scrollbar */
}

#played-notes::-webkit-scrollbar-track {
  background: #1e1e1e;      /* track background */
  border-radius: 10px;
}

#played-notes::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff6ec4, #7873f5); /* colorful gradient */
  border-radius: 10px;
  border: 2px solid #1e1e1e; /* gives padding inside thumb */
}

#played-notes::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff8ec4, #9893f5); /* hover effect */
}



/* Individual note style */
.played-note {
  display: inline-block;
  padding: 2px 6px;         /* Reduce vertical padding */
  background-color: #2a2a2a;
  border-radius: 4px;
  white-space: nowrap;
  margin: 0;                /* Make sure no extra margin */
  line-height: 1;         /* Tighter vertical spacing */
}


#equalizer {
  width: 220px;
}

/* Right column */
.col-right {
  display: flex;
  flex-direction:column;
  padding:5px 0 0 15px;
}
/* Piano midi enable button */
#enable-piano-btn {
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Enabled state with glow */
#enable-piano-btn.enabled {
    background-color: green;
    color: white;
    box-shadow: 0 0 10px 2px rgba(0, 255, 0, 0.8); /* Green glow */
}

/* Disabled state without glow */
#enable-piano-btn.disabled {
    background-color: red;
    color: white;
    box-shadow: none;
}


.vol-notes-row{
	display: flex;
	flex-wrap: wrap;  /* Allow wrapping */
	align-items: center;
	gap: 15px;
	margin-top: 10px;
	justify-content: center;
}
/*Volume slider **********************************************************/
.volume-slider {
    display: flex;
    align-items: center;
    background: #555;
    padding: 10px 15px;
    border-radius: 40px;
    width: 250px;
    gap: 12px;
    font-family: sans-serif;
    color: #00fdfd;
}
.volume-icon {
    font-size: 20px;
}
#volumeControl {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background:linear-gradient(to bottom, #555, #1E1E1E);	
    border-radius: 3px;
    cursor: pointer;
}
#volumeControl::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 21px;
  height: 30px;

  /* Background: base gradient at the bottom, horizontal line on top */
  background:
    linear-gradient(to right, #555, #ccc),        /* horizontal line (top) */
    linear-gradient(to bottom, #444, #111);       /* dark base gradient (bottom) */

  background-repeat: no-repeat;
  background-position: center;                  /* center the horizontal line */
  background-size: 100% 6px, cover;              /* line = 2px height, gradient = full cover */

  border: 2px solid #888;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  margin-top: 2px;
  z-index: 3;
  position: relative;
}

#volumeControl::-moz-range-thumb {
  width: 21px;
  height: 30px;

  background:
    linear-gradient(to right, #ccc, #ccc),
    linear-gradient(to bottom, #444, #111);

  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 2px, cover;

  border: 2px solid #888;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}


#volumeRValue {
    font-weight: 700;
    min-width: 32px;
    text-align: right;
    color: #FFA500;
}

.button-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: #555;
  padding: 10px 20px;
  border-radius: 40px;
  font-family: sans-serif;
  justify-content: center; /* Center buttons if wrapped */
}

.dotted-btn {
  position: relative;
  width: 100px;
  padding: 10px 16px;
  height: auto;
  background-color: #2b2b2b;
  border: none;
  border-radius: 8px;
  box-shadow: inset -4px 4px 8px #1a1a1a, inset 4px -4px 8px #3a3a3a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.dotted-btn:hover {
  transform: scale(0.95);
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.6),
              inset -3px -3px 6px rgba(255, 255, 255, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dotted-btn::before {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  background-image: radial-gradient(#000 2px, transparent 0);
  background-size: 8px 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
  pointer-events: none;
  border-radius: 6px;
}

/* Wrapper to place indicator and icon inline */
.button-content {
  display: flex;
  align-items: center;
  gap: 8px; /* space between indicator and icon */
  z-index: 1;
  background-color:#252525;
}

/* Indicator dot */
.indicator {
  width: 12px;
  height: 12px;
  background-color: #ff2e2e;
  border-radius: 50%;
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
}

/* Indicator dot */
.indicatorp {
  width: 12px;
  height: 12px;
  background-color: #00FDFD;
  border-radius: 50%;
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
}

.dotted-btn.active .indicator {
  box-shadow: 0 0 12px 4px #ff2e2e;
  opacity: 1;
}

.dotted-btn.active .indicatorp {
  box-shadow: 0 0 12px 4px #00FDFD;
  opacity: 1;
}

/* Icon next to indicator */
.btn-label {
  font-size: 18px;
  color: #555555;
  background-color: transparent;
}

/*.dotted-btn:disabled {
  background-color: #ccc;     
  color: #888;                
  opacity: 0.6;               
  cursor: not-allowed;        
}*/


#clearBtn {
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* Container */
.tempo-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;   
    user-select: none;
    font-family: sans-serif;
}

/* Tempo Display (Center) */
.tempo-display {
    width: 80px;
    height: 50px;
    background: linear-gradient(to right, #444, #222);
    color: white;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 2px solid #555;
    border-bottom: 2px solid #555;
}

/* Base Triangle Button Style */
.triangle-button {
    width: 0;
    height: 0;
    border-style: solid;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
    border-top: 25px solid transparent;
    border-bottom: 25px solid transparent;
    transition: opacity 0.2s ease;
}

/* Left Triangle */
.triangle-left {
    border-right: 30px solid #666;
}

.triangle-left:hover {
    border-right-color: #999;
}

/* Right Triangle */
.triangle-right {
    border-left: 30px solid #666;
}

.triangle-right:hover {
    border-left-color: #999;
}


/* Chord Option *************************************************************************************************************/
.chord-group {
    display: inline-block;
    text-align: center;
    position: relative;
    margin: 0 20px; /* space between groups */
}

.chord-label {
    position: absolute;
    top: -18px;  /* move label above */
    left: 50%;
    transform: translateX(-50%);
    color: #252424;
    font-size: 18px;
    font-weight: bold;
	background:#070707;
	z-index: 2;
	padding:5px 10px 0 10px;
	border-radius: 10px 10px 0 0;
}
.chord-option {       
    display: inline-flex;
    gap: 10px;
    padding: 15px;
    border-radius: 0 0 10px 10px;
    background: #070707;
    position: relative;	
}

.chord-option::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #252424;	
}

.chord-option select {
    background-color: #252424;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    outline: none;
    transition: background-color 0.3s, color 0.3s;
    width: 155px;
}
select option {
    background-color: #252424;    
    font-weight: 400;
}

/*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;
}
.left-column {
    width: 92%}

.left-column, .right-column {
    display: flex;
    gap: 10px;
    color: #fff;
    box-sizing: border-box;
}
.left-column ul {
    margin:0 0 0 15px !important}
	
.content-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 .white,
.piano-keys .black {
    transition: 
        transform 0.08s ease-in,
        box-shadow 0.1s ease,
        background 0.1s ease;
    will-change: transform;
}
.piano-keys .black {
    z-index: 3; /* Higher than white keys */
    width: 44px;
    height: 140px;
    margin: 0 -22px 0 -22px;
    border-radius: 0 0 5px 5px;
    background: linear-gradient(#333, #000);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.6),  /* Drop shadow */
        inset 0 -2px 2px rgba(255, 255, 255, 0.05); /* Subtle top shine */
    transition: 
        transform 0.08s ease-in,
        box-shadow 0.1s ease,
        background 0.1s ease;
}

.piano-keys .black.active {
    transform: scale(0.96) translateY(1px); /* Slight depression */
    background: linear-gradient(to bottom, #000, #434343);
    box-shadow: 
        inset -5px -10px 10px rgba(255, 255, 255, 0.1), 
        0 2px 10px rgba(0, 0, 0, 0.5);
}

.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 {
	transform: scale(0.97); /* slight shrink */
    box-shadow: inset -5px 5px 20px rgb(0 0 0 / .2), 0 2px 6px rgba(0, 0, 0, 0.3);
    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 .black span {
    bottom: 21px;
    color: #888;
}

.hide {
    display: none!important;
}
.piano-keys .key span.note-label {
    display: block;        
    bottom: 29px;
}
.piano-keys .key span.key-label {
    display: block;
    font-size: 12px;
    color: #555;
    bottom: 9px;
}
/* Right column controls*********************************************/
.right-column{
	width: 7%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px;
}

.right-column .ctl-label{
	color:#555555;
}
.right-column .showscalechord{
	width:95%;
	appearance: none;
	border: none;
	outline: none;							
	background: #252424;
	border-radius: .8em;
	text-align: center;
	padding: .6em;
	margin-bottom:20%;
	color:#fff;
	font-size:.6rem;
}

.right-column .settings-fab {
    position: relative; /* Not floating, static in column */
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a7afe 0%, #000 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0 50%;
}
.right-column .settings-fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #4a8aff 0%, #3570e3 100%);
}
.right-column .settings-fab span {
    font-size: 26px;
    color: #fff;
}

.right-column .pedal-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -20px 0 0 0;
  position: relative;
}

.right-column .pedal-top-cover {
  width: 40px;
  height: 25px;
  background: #252424;
   border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
   border: 5px solid #252424;
  margin-bottom: -5px; 
  position: relative;
}

.right-column .pedal-button {
  width: 40px;
  height: 110px;
  background: repeating-linear-gradient(
    45deg,
    #333,
    #333 4px,
    #555 4px,
    #555 8px
  );
  border-radius: 10% 10% 70% 70% / 50% 50% 30% 30%;
  border: 2px solid #777;
  box-shadow:
  inset -2px -2px 5px rgba(255,255,255,0.6),
  inset 2px 2px 5px rgba(0,0,0,0.2),
  0 6px 12px rgba(0,0,0,0.4); 
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  outline: none;
  position: relative;
  z-index: 1;
}

.right-column .pedal-button:active {
  transform: translateY(3px);
  box-shadow:
    inset 1px 1px 3px rgba(0,0,0,0.4),
    0 4px 6px rgba(0,0,0,0.2);
}

.toggle-box{
	 background: #252424;
    padding: 10px 15px 20px 15px;
    border-radius: 40px;
    font-family: sans-serif;
    margin-bottom: 10px;
    display: flex;              /* Add this */
    flex-direction: row;        /* Add this - side by side */
    gap: 20px;                  /* Add this - space between checkboxes */
    align-items: center;        /* Add this - vertical alignment */
    justify-content: center;    /* Add this - center content */
}
.keys-checkbox {
	display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;                  /* Changed from 10px 0 0 0 */
    font-family: sans-serif;
    width: auto;                /* Changed from 100% */
    flex-shrink: 0;             /* Add this - prevent shrinking */
 }
.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;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch {
    position: relative;
    display: inline-block;
    width: 65px;
    height: 26px;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
    width: 50px;
}
.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(to bottom right, #555, #ccc);
    transition: 0.4s;
    border-radius: 50%}
.switch input:checked+.slider {    
    width: 50px;
}
.switch input:checked+.slider::before {
    transform: translateX(24px);
}

/* Reverb option *************************************************************************/
.reverb-box{
	background: #252424;
    padding: 10px 15px 20px 15px;
    border-radius: 40px;    
    font-family: sans-serif;    
	margin:0 auto;	
}
.reverb-box select {	
    background-color: #252424;
    color: gold;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    outline: none;
    transition: background-color 0.3s, color 0.3s;
    width: 95px;
}
	
/* PIANO LOADER 
***********************************************************************************************************************************************************************************************************************/
.ptpiano-wrapper {
  position: relative;
  min-height: 300px; /* adjust to avoid collapse */
  background: transparent;  
}

.ptpiano-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.ptpiano-loader p {
  margin-top: 15px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ddd;
  border-top: 4px solid cyan;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* === RECORD POPUP OVERLAY === */
.popup-overlay {
 position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75); /* Dim background */
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Sit on top */
  pointer-events: all;
}

/* Popup Content */
.popup-content {
  background: #252424;
  padding: 25px 30px;
  color: #fff;
  border-radius: 12px;
  text-align: center;
  max-width: 350px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  animation: fadeInScale 0.3s ease-in-out;
  font-family: 'Segoe UI', sans-serif;
}

.popup-content h3 {
  margin-top: 0;
  color: #555555;
}

.popup-content p {
  color: #555;
  margin: 15px 0;
}

.popup-content button {
  background-color: #3a7afe;
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}

.popup-content button:hover {
  background-color: #245fd3;
}


/* === SETTINGS POPUP OVERLAY === */
#settingsPopup.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: all;
}

#settingsPopup.popup-overlay.active {
    display: flex;
}

/* Popup Content */
#settingsPopup .popup-content.settings-popup {
    background: #252424;
    padding: 25px 30px;
    color: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: fadeInScale 0.3s ease-in-out;
    font-family: 'Segoe UI', sans-serif;
    text-align: left;
}

/* === SONG SETTINGS POPUP OVERLAY === */
#songPopup.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: all;
}

#songPopup.popup-overlay.active {
    display: flex;
}

/* Popup Content */
#songPopup .popup-content {
    background: #252424;
    padding: 25px 30px;
    color: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: fadeInScale 0.3s ease-in-out;
    font-family: 'Segoe UI', sans-serif;
    text-align: left;
}

#songPopup select {
    background-color: #252424;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    outline: none;
    transition: background-color 0.3s, color 0.3s;
    width: 90%;
}
#songPopup select option {
    background-color: #252424;    
    font-weight: 400;
}

@keyframes fadeInScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* === POPUP HEADER === */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #444;
}

.popup-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.close-btn:hover {
    color: #fff;
}

/* === POPUP BODY === */
.popup-body {
    max-height: 500px;
    overflow-y: auto;
}

.popup-body::-webkit-scrollbar {
    width: 8px;
}

.popup-body::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3a7afe, #245fd3);
    border-radius: 10px;
}

/* === SETTINGS SECTIONS === */
.settings-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #333;
    border-radius: 8px;
}

.settings-section h4 {
    margin-bottom: 15px;
    color: #ddd;
    font-size: 16px;
}

/* === SETTINGS FAB BUTTON (Floating Action Button) === */
.settings-fab {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a7afe 0%, #245fd3 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.settings-fab span {
    font-size: 28px;
    color: #fff;
}

/* === ADJUSTMENTS FOR EXISTING ELEMENTS IN POPUP === */
#settingsPopup .pedal-wrapper {
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#settingsPopup .toggle-box {
    width: 100%;
}

#settingsPopup .reverb-box {
    width: 100%;
}

#settingsPopup .showscalechord {
    width: 100%;
    margin-bottom: 15px;
}

#settingsPopup .reverb-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

#settingsPopup .reverb-select select {
    flex: 1;
}

/* === MOBILE RESPONSIVE === */
@media screen and (max-width: 768px) {
    .settings-fab {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .settings-fab span {
        font-size: 24px;
    }
    
    #settingsPopup .popup-content.settings-popup {
        max-width: 95%;
        padding: 20px;
    }
}



/* MOBILE SCREEN **********************************************************************************************************************************************************************************************************************/
@media screen and (max-width:1280px) {
	.content-wrapper {
		padding: 5px;
	}
	header {
		flex-direction: column;
	}
	header :where(h2, .column) {
		margin-bottom: 13px;
	}
	.piano-header {
	 width:170px !important;
	}
	.piano-speaker {
		display: none;
	  }
	.col-center {
		grid-column: 1 / -1;   /* span across full grid */
		width: 100%;
		padding-left: 0;       /* remove left padding */
		align-items: center;
	}
	#played-notes {width:120px !important }
	.content-wrapper .control {
			display:block !important;
	}
	.chord-group {display:block !important;margin: 0 !important;}	
	.chord-option select {
		display:block;
		width: 100% !important;
		margin-left: 0;
	}
	.chord-option::before {
		display:none;	
	}
	.chord-label {
		display:none;
	}	
	.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: 8vw;      /* Smaller to fit more keys */
        height: 140px;
        min-width: 50px; /* Minimum size */
	}
	.piano-keys .black {
		width: 4.5vw;
        height: 100px;
        margin: 0 -2.25vw;
        min-width: 35px; /* Minimum size */
	}	
	canvas#equalizer {
		width: 95%!important;
		height: auto!important;
	}
	.piano-keys .key span {
		font-size: 10px;
	}
}

/* === MOBILE - Hide last 5 keys (show only 24 keys) === */
@media screen and (max-width: 1280px) {
    /* Hide the last 5 keys on mobile */
    .piano-keys .key:nth-last-child(-n+5) {
        display: none !important;
    }
    
    /* Adjust keyboard for mobile */
    .piano-keys {
        overflow-x: auto;
        padding: 0 5px;
        margin: 0 !important;
        justify-content: space-between;
    }
    
    .piano-keys .white {
        width: 9.5vw;
        height: 140px;
        min-width: 50px;
    }
    
    .piano-keys .black {
        width: 5vw;
        height: 100px;
        margin: 0 -2.5vw;
        min-width: 35px;
    }
}

/* === TABLET - Slightly larger than mobile === */
@media screen and (max-width: 992px) and (min-width: 769px) {
    .piano-keys .white {
        width: 8.5vw;
        height: 150px;
        min-width: 55px;
    }
    
    .piano-keys .black {
        width: 4.75vw;
        height: 110px;
        margin: 0 -2.375vw;
        min-width: 38px;
    }
}

/* === SMALL MOBILE - Extra small screens === */
@media screen and (max-width: 768px) {
    .piano-keys .white {
        width: 9vw;
        height: 120px;
        min-width: 40px;
    }
    
    .piano-keys .black {
        width: 5vw;
        height: 85px;
        margin: 0 -2.5vw;
        min-width: 28px;
    }
    
    .piano-keys .key span {
        font-size: 10px;
    }
}

/* === EXTRA SMALL MOBILE - Very small screens === */
@media screen and (max-width: 480px) {
    .piano-keys .white {
        width: 8.5vw;
        height: 100px;
        min-width: 35px;
    }
    
    .piano-keys .black {
        width: 4.8vw;
        height: 70px;
        margin: 0 -2.4vw;
        min-width: 24px;
    }
    
    .piano-keys .key span.note-label {
        font-size: 9px;
        bottom: 25px;
    }
    
    .piano-keys .key span.key-label {
        font-size: 8px;
        bottom: 8px;
    }
}

/* === VISUAL INDICATOR (Optional) === */
/* Add a visual indicator showing more keys available on desktop */
@media screen and (max-width: 1280px) {
    .piano-keys::after {
        content: "↔ Scroll for more";
        position: absolute;
        bottom: -25px;
        right: 10px;
        font-size: 11px;
        color: #666;
        font-style: italic;
    }
}

/* === DESKTOP CONFIRMATION === */
/* Ensure all keys are visible on desktop */
@media screen and (min-width: 1281px) {
    .piano-keys .key {
        display: block;
    }
