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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author {
    color: #1a1a1a;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    text-align: center;
}

h1 {
    color: #1a1a1a;
    margin-bottom: 2rem;
}

#piano-container {
    background: #1a1a1a;
    padding: 20px 20px 0 20px;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

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

.scroll-area {
    background: #06470c;
    height: 30px;
    overflow-x: auto;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.scroll-content {
    height: 1px;
    min-width: min-content;
}

.piano-key {
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s;
}

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

.piano-key.black {
    width: 40px;
    height: 60%;
    background: #1a1a1a;
    margin-left: -20px;
    margin-right: -20px;
    z-index: 2;
}

.piano-key.active {
    background: #4a90e2;
}

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

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

@media (max-width: 768px) {
    .piano-key.white {
        width: 45px;
    }
    
    .piano-key.black {
        width: 30px;
        margin-left: -15px;
        margin-right: -15px;
    }
}
