body {
    font-family: sans-serif;
    margin: 20px;
    display: flex;
    flex-direction: row;
    background-color: #f3e8f8;
}
.left-panel {
    width: 35%;
    margin-right: 20px;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
}
.right-panel {
    width: 65%;
    height: 90vh;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
}
.player {
    margin-bottom: 20px;
    display: flex; /* Align volume and waveform vertically */
    align-items: center; /* Vertically center items */
    flex-direction: column;
    justify-content: center;
    flex-wrap: nowrap;
}
.volume-control {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 20px;
    position: relative;
}

.volume-control input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%; /* This is logical width (becomes height when rotated) */
    height: 8px;  /* This becomes the visual width (track thickness) */
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;

    /* Center the rotated slider */
    position: absolute;
    top: 50%;
}

/* WebKit */
.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #bd0dbb;
    cursor: pointer;
    margin-top: 0; /* reset for consistent alignment */
}

/* Firefox */
.volume-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #bd0dbb;
    cursor: pointer;
}
#scrollSpeedDisplay {
    display: inline-block;
    margin: 0 10px;
    font-weight: bold;
}
/* Highlight style for active lyrics */
.highlighted {
    background-color: yellow;
    font-weight: bold;
}
.unmatched {
    opacity: 0.6; /* Indicate words that didn't have a direct transcript match */
}
.current-line {
    /* Styling highlight for the whole line */
    background-color: #e0e0e0; /* A subtle background for the line */
    transition: background-color 0.3s ease; /* Smooth transition */
}
/* Ensure lines have height for correct scrolling */
.song, .chords, .chords_en {
    line-height: 1.6; /* Adjust as needed, ensure they have a visible height */
    padding: 2px 0; /* Add some padding to give them height */
}
.chords, .tabs, .chords_en {
    color: #b50000 !important;
    font-weight: bold;
}
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    width: 100%;
}
button {
    flex: 1;
    padding: 10px 15px;
    background-color: #bd0dbb;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
}
button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
button:hover:not(:disabled) {
    background-color: #880a86;
}
.slider-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.slider-label {
    font-size: 0.9em;
    color: #333;
}
input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #bd0dbb;
    cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #bd0dbb;
    cursor: pointer;
}
.slider-value {
    font-weight: bold;
    text-align: center;
}
/* Styles for the slider-style checkbox */
.switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider-checkbox {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 18px;
}
.slider-checkbox:before {
    position: absolute;
    content: "";
    height: 15px;
    width: 15px;
    left: 2px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider-checkbox {
    background-color: #bd0dbb;
}
input:focus + .slider-checkbox {
    box-shadow: 0 0 1px #bd0dbb;
}
input:checked + .slider-checkbox:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.waveform {
    width: 100%; /* Shortened width to accommodate volume control */
    height: 80px; /* Adjusted for better visibility */
    position: relative;
    margin-top: -2px;
    background-color: #eee;
    border-radius: 4px;
    padding-top: 10px
}
.waveform-label {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 2px 5px;
    font-size: 0.8em;
    border-radius: 3px;
    z-index: 10;
    margin-top: -10px;
    width: 60px;
    text-align: center;
}
.loading-indicator {
    position: absolute;
    top: 30%;
    width: 100%;
    font-size: 1em;
    color: #bd0dbb;
    /* display: none; Hidden by default */
}
.progress-bar {
    width: 0%;
    height: 5px;
    background-color: #bd0dbb;
    position: absolute;
    left: 0;
    transition: width 0.1s ease-out; /* Smooth progress animation */
}
.progress-bar-container {
    width: 100%;
    height: 5px;
    background-color: #ddd;
    margin-top: 10px;
}


