/* Piano Page Specific Styles */

/* Override global body styles for piano page */
body.piano-page {
    background: var(--primary-bg) !important;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%) !important;
}

/* Piano Hero Section */
.piano-hero {
    padding: 6rem 0 2rem;
    text-align: center;
}

.piano-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.piano-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Piano Container */
.piano-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Control Panel */
.control-panel {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.control-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.control-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(100, 181, 246, 0.2);
    border-color: rgba(100, 181, 246, 0.3);
}

.control-card h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-card .value {
    color: var(--accent-blue);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Piano Keyboard */
.piano-keyboard {
    background: linear-gradient(145deg, #2a2a3e, #1a1a2e);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 
        inset 0 4px 8px rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.keyboard-container {
    display: flex;
    justify-content: center;
    position: relative;
    height: 200px;
    margin: 0 auto;
    max-width: 900px;
}

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

/* White Keys */
.key.white {
    width: 60px;
    height: 200px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 2px solid #ddd;
    border-radius: 0 0 8px 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 -4px 8px rgba(0, 0, 0, 0.1);
}

.key.white:hover {
    background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
    transform: translateY(2px);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.key.white.active {
    background: linear-gradient(145deg, #64b5f6, #42a5f5);
    color: white;
    transform: translateY(4px);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

/* Black Keys */
.key.black {
    width: 40px;
    height: 120px;
    background: linear-gradient(145deg, #333, #1a1a1a);
    border: 1px solid #000;
    border-radius: 0 0 6px 6px;
    position: absolute;
    cursor: pointer;
    z-index: 2;
    transition: all 0.1s ease;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 -2px 4px rgba(255, 255, 255, 0.1);
}

.key.black:hover {
    background: linear-gradient(145deg, #444, #2a2a2a);
    transform: translateY(2px);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 -1px 2px rgba(255, 255, 255, 0.2);
}

.key.black.active {
    background: linear-gradient(145deg, #64b5f6, #42a5f5);
    transform: translateY(4px);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.6),
        inset 0 -1px 1px rgba(255, 255, 255, 0.3);
}

/* Key Labels */
.key-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    pointer-events: none;
}

.key.black .key-label {
    color: #aaa;
    bottom: 8px;
    font-size: 0.7rem;
}

/* Octave Controls */
.octave-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.octave-btn {
    background: linear-gradient(145deg, var(--accent-blue), #1976d2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.octave-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4);
}

.octave-btn:active {
    transform: translateY(0);
}

.current-octave {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Recording Controls */
.recording-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.record-btn,
.play-btn,
.stop-btn,
.download-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.record-btn {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.record-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
}

.record-btn.recording {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.play-btn {
    background: linear-gradient(145deg, #4caf50, #388e3c);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.stop-btn {
    background: linear-gradient(145deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

.download-btn {
    background: linear-gradient(145deg, var(--accent-purple), #7b1fa2);
    color: white;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(156, 39, 176, 0.4);
}

/* Metronome */
.metronome-container {
    text-align: center;
    margin: 2rem 0;
}

.metronome-display {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.bpm-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.bpm-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metronome-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.metronome-btn {
    background: linear-gradient(145deg, var(--accent-cyan), #00acc1);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

.metronome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 211, 238, 0.4);
}

.metronome-btn.active {
    background: linear-gradient(145deg, #00acc1, #0097a7);
    animation: metronomePulse 1s infinite ease-in-out;
}

@keyframes metronomePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .piano-container {
        padding: 0 1rem;
    }
    
    .control-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .control-card {
        padding: 1rem;
    }
    
    .keyboard-container {
        height: 150px;
        max-width: 100%;
        overflow-x: auto;
    }
    
    .key.white {
        width: 45px;
        height: 150px;
    }
    
    .key.black {
        width: 30px;
        height: 90px;
    }
    
    .key-label {
        font-size: 0.7rem;
        bottom: 8px;
    }
    
    .key.black .key-label {
        font-size: 0.6rem;
        bottom: 6px;
    }
    
    .recording-controls {
        gap: 0.5rem;
    }
    
    .record-btn,
    .play-btn,
    .stop-btn,
    .download-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .control-grid {
        grid-template-columns: 1fr;
    }
    
    .key.white {
        width: 35px;
        height: 120px;
    }
    
    .key.black {
        width: 25px;
        height: 70px;
    }
    
    .octave-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}