* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    font-family: Arial, sans-serif;
    overflow-x: auto;
    padding: 20px;
}

.container {
    padding: 2rem;
    transform: perspective(1000px) rotateX(5deg);
    transform-style: preserve-3d;
}

.piano {
    display: flex;
    position: relative;
    background: linear-gradient(to bottom, #272727, #1a1a1a);
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5),
                0 5px 15px rgba(0, 0, 0, 0.3);
    min-width: max-content;
}

.key {
    width: 45px;
    height: 220px;
    background: linear-gradient(to bottom, #fff 0%, #eee 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 6px 6px;
    margin: 0 1px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 10px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.1s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.key:active,
.key.active {
    background: linear-gradient(to bottom, #eee 0%, #ddd 100%);
    transform: translateY(4px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.black-key {
    width: 30px;
    height: 140px;
    background: linear-gradient(to bottom, #444 0%, #222 100%);
    position: absolute;
    z-index: 2;
    border: 1px solid #000;
    border-radius: 0 0 3px 3px;
    color: #fff;
    box-shadow: -1px -1px 2px rgba(255, 255, 255, 0.2) inset,
                0 -5px 2px 3px rgba(0, 0, 0, 0.6) inset,
                0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease;
}

.black-key:active,
.black-key.active {
    background: linear-gradient(to bottom, #222 0%, #111 100%);
    transform: translateY(4px);
    box-shadow: -1px -1px 2px rgba(255, 255, 255, 0.2) inset,
                0 -2px 2px 3px rgba(0, 0, 0, 0.6) inset,
                0 1px 2px rgba(0, 0, 0, 0.5);
}

.key span {
    position: absolute;
    bottom: 10px;
    text-transform: uppercase;
    font-size: 11px;
    opacity: 0.5;
}

.instructions {
    position: relative;
    left: 20%;
    color: #fff;
    margin-top: 2rem;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    max-width: 600px;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.key::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: rgba(73, 187, 255, 0.2);
    transition: height 0.1s ease;
}

.key.active::after {
    height: 100%;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

.volume-control {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.volume-control input {
    width: 150px;
}

.song-controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.control-button {
    background: #444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.control-button:hover {
    background: #555;
}