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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.piano-container {
    background: #2c3e50;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 100%;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.octave-control, .instrument-control, .percussion-control, .tempo-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.octave-control label, .instrument-control label, .percussion-control label, .tempo-control label {
    color: white;
    font-weight: bold;
    font-size: 1.1em;
}

.octave-btn, .instrument-btn, .percussion-btn {
    background: #7f8c8d;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
}

.octave-btn:hover, .instrument-btn:hover, .percussion-btn:hover {
    background: #95a5a6;
    transform: translateY(-2px);
}

.octave-btn.active, .instrument-btn.active, .percussion-btn.active {
    background: #34495e;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.percussion-btn.active {
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.tempo-control {
    background: #1a252f;
    padding: 5px 15px;
    border-radius: 8px;
}

.tempo-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.tempo-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.tempo-btn:active {
    transform: scale(0.95);
}

#tempo-display {
    color: #3498db;
    font-weight: bold;
    font-size: 1.1em;
    min-width: 80px;
    text-align: center;
    display: inline-block;
}

.keyboard-octave-indicator {
    background: #34495e;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1em;
}

#keyboard-octave {
    color: #3498db;
    font-size: 1.2em;
}

#piano-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: #1a252f;
    border-radius: 10px;
    overflow-x: auto;
}

.piano-keys {
    position: relative;
    display: flex;
    height: 250px;
}

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

.white-key {
    width: 60px;
    height: 200px;
    background: white;
    border: 2px solid #333;
    border-radius: 0 0 5px 5px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    font-weight: bold;
    color: #333;
    z-index: 1;
}

.white-key:hover {
    background: #ecf0f1;
}

.white-key.active {
    background: #ffeb3b !important;
    transform: translateY(2px);
}

.black-key {
    width: 40px;
    height: 120px;
    background: black;
    border: 2px solid #000;
    border-radius: 0 0 3px 3px;
    position: absolute;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    font-weight: bold;
    font-size: 0.85em;
    color: white;
    z-index: 2;
}

.black-key:hover {
    background: #34495e;
}

.black-key.active {
    background: #555555 !important;
    transform: translateY(2px);
}

.instructions {
    color: white;
    text-align: center;
    margin-top: 20px;
    line-height: 1.8;
}

.instructions p {
    margin: 5px 0;
}

.instructions strong {
    color: #3498db;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .white-key {
        width: 50px;
        height: 180px;
    }
    
    .black-key {
        width: 35px;
        height: 110px;
    }
}

