.piano-container {
    position: relative;
    padding: 20px 10px 10px 10px;
    background-color: #8b4513;
    border-radius: 10px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.piano {
    position: relative;
    height: 300px;
    display: flex;
}

/* 白键样式 */
.white-key {
    width: 60px;
    height: 300px;
    background: linear-gradient(to bottom, #ffffff 0%, #f0f0f0 100%);
    border: 1px solid #ccc;
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5),
                0 2px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all 0.1s ease;
    box-sizing: border-box;
}

.white-key:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
}

.white-key:active, .white-key.active {
    background: linear-gradient(to bottom, #f0f0f0 0%, #d9d9d9 100%);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(2px);
}

.white-key .note-label {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #333;
    font-weight: bold;
}

/* 黑键样式 */
.black-key {
    width: 36px;
    height: 180px;
    background: linear-gradient(to bottom, #333333 0%, #000000 100%);
    position: absolute;
    z-index: 2;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.1s ease;
    box-sizing: border-box;
}

.black-key:hover {
    background: linear-gradient(to bottom, #444444 0%, #111111 100%);
}

.black-key:active, .black-key.active {
    background: linear-gradient(to bottom, #222222 0%, #000000 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transform: translateY(2px) scale(0.98);
}

.black-key .note-label {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 12px;
}

/* 黑键位置 - 两黑三黑交替模式 */
.black-key[data-note="C#4"] { left: 42px; }
.black-key[data-note="D#4"] { left: 102px; }
.black-key[data-note="F#4"] { left: 222px; }
.black-key[data-note="G#4"] { left: 282px; }
.black-key[data-note="A#4"] { left: 342px; }
.black-key[data-note="C#5"] { left: 462px; }
.black-key[data-note="D#5"] { left: 522px; }
.black-key[data-note="F#5"] { left: 642px; }
.black-key[data-note="G#5"] { left: 702px; }
.black-key[data-note="A#5"] { left: 762px; }

.instructions {
    margin-top: 30px;
    color: #555;
    font-size: 14px;
    text-align: center;
    max-width: 800px;
}
