.piano-container {
    max-width: 1200px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 2rem;
}

.piano-info {
    color: var(--text-dark);
}

.piano {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.piano-keys {
    display: flex;
    position: relative;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.key {
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.key.white {
    width: 60px;
    height: 200px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #dee2e6;
    margin: 0 1px;
    z-index: 1;
}

.key.black {
    width: 40px;
    height: 130px;
    background: linear-gradient(180deg, #343a40 0%, #212529 100%);
    border: 2px solid #000;
    position: absolute;
    z-index: 2;
    color: white;
}

/* Black key positioning */
.key.black[data-note="C#4"] { left: 45px; }
.key.black[data-note="D#4"] { left: 107px; }
.key.black[data-note="F#4"] { left: 230px; }
.key.black[data-note="G#4"] { left: 292px; }
.key.black[data-note="A#4"] { left: 354px; }
.key.black[data-note="C#5"] { left: 477px; }
.key.black[data-note="D#5"] { left: 539px; }

.key:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.key.pressed,
.key:active {
    transform: translateY(2px);
    box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.3);
}

.key.white.pressed,
.key.white:active {
    background: linear-gradient(180deg, #e9ecef 0%, #dee2e6 100%);
}

.key.black.pressed,
.key.black:active {
    background: linear-gradient(180deg, #495057 0%, #343a40 100%);
}

.key-label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: bold;
}

.key-hint {
    font-size: 0.7rem;
    opacity: 0.7;
    text-transform: uppercase;
}

.key.white .key-label {
    color: var(--primary-color);
}

.key.white .key-hint {
    color: var(--text-dark);
}

.key.black .key-label {
    color: #ffffff;
}

.key.black .key-hint {
    color: #ffffff;
}

.volume-control {
    max-width: 300px;
    margin: 0 auto;
}

.volume-control label {
    color: var(--text-dark);
    font-weight: bold;
}

.form-range {
    accent-color: var(--primary-color);
}

/* Responsive design */
@media (max-width: 1024px) {
    .piano-container {
        padding: 1.5rem;
    }
    
    .key.white {
        width: 50px;
        height: 170px;
    }
    
    .key.black {
        width: 35px;
        height: 110px;
    }
    
    /* Adjust black key positions for smaller screen */
    .key.black[data-note="C#4"] { left: 37px; }
    .key.black[data-note="D#4"] { left: 89px; }
    .key.black[data-note="F#4"] { left: 193px; }
    .key.black[data-note="G#4"] { left: 245px; }
    .key.black[data-note="A#4"] { left: 297px; }
    .key.black[data-note="C#5"] { left: 401px; }
    .key.black[data-note="D#5"] { left: 453px; }
}

@media (max-width: 768px) {
    .piano-container {
        padding: 1rem;
    }
    
    .key.white {
        width: 40px;
        height: 140px;
        font-size: 0.7rem;
    }
    
    .key.black {
        width: 28px;
        height: 90px;
        font-size: 0.6rem;
    }
    
    .key-label {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .key-hint {
        font-size: 0.6rem;
    }
    
    /* Adjust black key positions for mobile */
    .key.black[data-note="C#4"] { left: 30px; }
    .key.black[data-note="D#4"] { left: 72px; }
    .key.black[data-note="F#4"] { left: 155px; }
    .key.black[data-note="G#4"] { left: 197px; }
    .key.black[data-note="A#4"] { left: 239px; }
    .key.black[data-note="C#5"] { left: 322px; }
    .key.black[data-note="D#5"] { left: 364px; }
}

@media (max-width: 480px) {
    .piano-keys {
        padding: 0.5rem;
    }
    
    .key.white {
        width: 35px;
        height: 120px;
    }
    
    .key.black {
        width: 25px;
        height: 80px;
    }
    
    /* Adjust black key positions for very small screens */
    .key.black[data-note="C#4"] { left: 26px; }
    .key.black[data-note="D#4"] { left: 63px; }
    .key.black[data-note="F#4"] { left: 136px; }
    .key.black[data-note="G#4"] { left: 173px; }
    .key.black[data-note="A#4"] { left: 210px; }
    .key.black[data-note="C#5"] { left: 283px; }
    .key.black[data-note="D#5"] { left: 320px; }
}