/* Piano-specific styles */

.piano-section {
    padding: 2rem 0;
    background: #f8fafc;
    min-height: 80vh;
}

.piano-header {
    text-align: center;
    margin-bottom: 2rem;
}

.piano-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.piano-description {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Piano Controls */
.piano-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.control-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    font-size: 1rem;
    cursor: pointer;
}

.volume-slider {
    width: 100px;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: none;
}

#volume-display {
    font-weight: 500;
    color: #374151;
    min-width: 40px;
}

/* Piano Keyboard */
.piano-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 1rem;
}

.piano-keyboard {
    display: flex;
    position: relative;
    background: #1f2937;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 1200px;
    height: 200px;
}

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

.piano-key.white {
    width: 50px;
    height: 180px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #d1d5db;
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
    font-weight: 500;
    color: #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: absolute;
}

.piano-key.white:hover {
    background: linear-gradient(to bottom, #f1f5f9 0%, #e2e8f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.piano-key.white.active {
    background: linear-gradient(to bottom, #dbeafe 0%, #bfdbfe 100%);
    transform: translateY(2px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.piano-key.black {
    width: 30px;
    height: 120px;
    background: linear-gradient(to bottom, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    border-radius: 0 0 4px 4px;
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.piano-key.black:hover {
    background: linear-gradient(to bottom, #374151 0%, #1f2937 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.piano-key.black.active {
    background: linear-gradient(to bottom, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Chord highlighting styles */
.piano-key.chord-highlight {
    background: linear-gradient(to bottom, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.6) !important;
    transform: translateY(-3px) !important;
    z-index: 10 !important;
    animation: chordPulse 0.6s ease-in-out;
}

.piano-key.black.chord-highlight {
    background: linear-gradient(to bottom, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.6) !important;
    transform: translateY(-2px) !important;
    z-index: 10 !important;
    animation: chordPulse 0.6s ease-in-out;
}

.piano-key.chord-highlight::after {
    content: '♪';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    color: #1f2937;
    font-weight: bold;
    animation: noteIconPulse 0.6s ease-in-out;
}

@keyframes chordPulse {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
    }
    50% {
        transform: translateY(-4px) scale(1.05);
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    }
    100% {
        transform: translateY(-3px) scale(1);
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
    }
}

@keyframes noteIconPulse {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Black key positioning */
.piano-key.black[data-note*="#"] {
    left: 30px;
}

.piano-key.black[data-note="D#"] {
    left: 70px;
}

.piano-key.black[data-note="F#"] {
    left: 150px;
}

.piano-key.black[data-note="G#"] {
    left: 190px;
}

.piano-key.black[data-note="A#"] {
    left: 230px;
}

/* Note Display */
.note-display {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.note-display h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.notes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2rem;
}

.note-item {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Chord Helper */
.chord-helper {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.chord-helper h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.chord-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chord-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chord-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.chord-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .piano-title {
        font-size: 2rem;
    }
    
    .piano-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .control-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .piano-keyboard {
        min-width: 400px;
        padding: 0.5rem;
    }
    
    .piano-key.white {
        width: 30px;
        height: 150px;
    }
    
    .piano-key.black {
        width: 18px;
        height: 90px;
    }
    
    .piano-key.black[data-note*="#"] {
        left: 22px;
    }
    
    .piano-key.black[data-note="D#"] {
        left: 52px;
    }
    
    .piano-key.black[data-note="F#"] {
        left: 112px;
    }
    
    .piano-key.black[data-note="G#"] {
        left: 142px;
    }
    
    .piano-key.black[data-note="A#"] {
        left: 172px;
    }
}

@media (max-width: 480px) {
    .piano-keyboard {
        min-width: 300px;
    }
    
    .piano-key.white {
        width: 25px;
        height: 120px;
        font-size: 0.75rem;
    }
    
    .piano-key.black {
        width: 15px;
        height: 70px;
        font-size: 0.75rem;
    }
    
    .piano-key.black[data-note*="#"] {
        left: 18px;
    }
    
    .piano-key.black[data-note="D#"] {
        left: 43px;
    }
    
    .piano-key.black[data-note="F#"] {
        left: 93px;
    }
    
    .piano-key.black[data-note="G#"] {
        left: 118px;
    }
    
    .piano-key.black[data-note="A#"] {
        left: 143px;
    }
}

/* Active navigation link */
.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}
