/* 键盘钢琴样式 */
.piano-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
    text-align: center;
}

.piano-title {
    font-size: 28px;
    color: #776e65;
    margin: 0 0 10px 0;
}

.piano-description {
    color: #776e65;
    margin: 0 0 20px 0;
}

.piano {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    position: relative;
    height: 200px;
}

.key {
    position: relative;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.white-key {
    width: 60px;
    height: 180px;
    background: linear-gradient(to bottom, #fff 0%, #f9f9f9 100%);
    border: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
    margin: 0 1px;
    z-index: 1;
}

.white-key.active {
    background: linear-gradient(to bottom, #e0e0e0 0%, #d0d0d0 100%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.black-key {
    width: 40px;
    height: 120px;
    background: linear-gradient(to bottom, #333 0%, #000 100%);
    border: 1px solid #222;
    border-radius: 0 0 4px 4px;
    margin: 0 -20px;
    z-index: 2;
    color: white;
}

.black-key.active {
    background: linear-gradient(to bottom, #222 0%, #111 100%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
}

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

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    background: #8f7a66;
    color: #f9f6f2;
    transition: all 0.3s ease;
    min-width: 100px;
}

.control-btn:hover {
    background: #7c6b5d;
    transform: translateY(-2px);
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.volume-label {
    font-weight: bold;
    color: #776e65;
}

.volume-slider {
    width: 200px;
}

.note-display {
    font-size: 24px;
    font-weight: bold;
    color: #1e3c72;
    margin: 20px 0;
    height: 40px;
}

.octave-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.octave-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    background: #6c757d;
    color: white;
    transition: all 0.3s ease;
}

.octave-btn:hover {
    background: #5a6268;
}

.octave-display {
    font-weight: bold;
    color: #776e65;
    min-width: 50px;
}

.instruction {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #776e65;
}

/* 隐藏按钮和工作模式 */
.hidden-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    z-index: 9999;
    display: none;
}

.work-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.work-screen {
    background: #f0f0f0;
    width: 90%;
    height: 80%;
    border: 1px solid #ccc;
    padding: 20px;
    font-family: 'Courier New', monospace;
    overflow: auto;
}

.work-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.work-content {
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .piano-container {
        margin: 10px;
        padding: 15px;
    }
    
    .piano {
        height: 150px;
    }
    
    .white-key {
        width: 40px;
        height: 140px;
    }
    
    .black-key {
        width: 28px;
        height: 90px;
        margin: 0 -14px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .volume-slider {
        width: 150px;
    }
}