.music-selection-panel {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 1000px;
    width: 100%;
}

.music-table-container {
    overflow-x: auto;
    margin-bottom: 15px;
}

#music-selection {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#music-selection th, 
#music-selection td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

#music-selection th {
    background-color: #f2f2f2;
}

#music-selection tr:hover {
    background-color: #f5f5f5;
}

.play-song-btn {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

.play-song-btn:hover {
    background-color: #45a049;
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#song-progress-container {
    flex-grow: 1;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

#song-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #4CAF50;
    transition: width 0.3s linear;
}

#song-status {
    min-width: 180px;
    text-align: right;
}

.notes-guide-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 150px;
    margin-bottom: 10px;
    overflow: hidden;
}

#notes-guide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(240, 240, 240, 0.5);
    border-radius: 5px;
    z-index: 1;
}

#notes-guide.hidden {
    display: none;
}

.falling-note {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #4a90e2;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    transition: top 1s linear;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.falling-note.black-key {
    background-color: #333;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.key.highlight {
    animation: pulse 0.5s infinite;
}

.white-key.highlight {
    background-color: #b3d9ff;
}

.black-key.highlight {
    background-color: #4a90e2;
}* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

h1 {
    margin-bottom: 20px;
    text-align: center;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 8px 15px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background-color: #3a7bc8;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.piano-container {
    width: 100%;
    max-width: 1200px;
    overflow-x: auto;
    position: relative;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #333;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.piano {
    display: flex;
    position: relative;
    height: 200px;
    min-width: max-content;
}

.key {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.white-key {
    width: 24px;
    height: 100%;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 0 0 5px 5px;
    z-index: 1;
}

@media (min-width: 768px) {
    .white-key {
        width: 40px;
    }
}

.black-key {
    position: absolute;
    width: 16px;
    height: 60%;
    background-color: black;
    border-radius: 0 0 3px 3px;
    z-index: 2;
    top: 0;
}

@media (min-width: 768px) {
    .black-key {
        width: 24px;
    }
}

.white-key.active {
    background-color: #e3f2fd;
}

.black-key.active {
    background-color: #555;
}

.key-label {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 10px;
    color: #333;
}

.black-key .key-label {
    color: white;
    font-size: 8px;
    bottom: 5px;
}

@media (min-width: 768px) {
    .key-label {
        font-size: 12px;
    }
    
    .black-key .key-label {
        font-size: 10px;
    }
}

.octave-label {
    position: absolute;
    bottom: -30px;
    font-size: 14px;
    color: #666;
}

.history-panel {
    margin-top: 30px;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 1000px;
    width: 100%;
}

.history-controls {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.notes-history-container {
    overflow-x: auto;
}

#notes-history {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#notes-history th, 
#notes-history td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#notes-history th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
}

#notes-history tr:nth-child(even) {
    background-color: #f9f9f9;
}

#notes-history tr:hover {
    background-color: #e9f0f9;
}

.note-cell {
    min-width: 40px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.note-cell.white-note {
    background-color: #ffffff;
    color: #333;
}

.note-cell.black-note {
    background-color: #e0e0e0;
    color: #000;
}

.note-cell.new {
    animation: highlight 1s ease-out;
}

@keyframes highlight {
    0% {
        background-color: #4a90e2;
        color: white;
    }
    100% {
        background-color: inherit;
        color: inherit;
    }
}

.zoom-controls {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.toggle-container, .sound-controls {
    display: flex;
    align-items: center;
    margin: 10px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4a90e2;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.sound-controls > div {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* For mobile screens, stack controls vertically */
@media (max-width: 767px) {
    .sound-controls, .toggle-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sound-controls > div {
        width: 100%;
    }
    
    .sound-controls input[type="range"] {
        flex-grow: 1;
    }
}