/* ---------------------------------------------------------
   Piano Bar Container (Glass Block)
   --------------------------------------------------------- */
.pianobar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100px;
    /* Container height */
    margin-bottom: 8px;
    /* Gap above main content */

    overflow: hidden;
    position: relative;
    z-index: 50;
    box-shadow: none;
}

.header-piano-ribbon {
    width: 100%;
    height: 100%;
    position: relative;
    background: transparent;
    overflow: hidden;
    border-radius: 16px;
    /* Inner radius for keys container */
}

/* ---------------------------------------------------------
   Piano Belt & Keys
   --------------------------------------------------------- */
.piano-belt {
    display: flex;
    height: 100%;
    width: 100%;
}

.piano-key {
    flex: 1 0 auto;
    position: relative;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s;
    user-select: none;
}

.piano-key.white {
    background: var(--octave-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 0 0 4px 4px;
}

.piano-key.black {
    flex: 0 0 16px;
    height: 65%;
    margin-left: -9px;
    margin-right: -9px;
    background: #111;
    border-radius: 0 0 3px 3px;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.piano-key:active,
.piano-key.active {
    opacity: 0.8;
    transform: translateY(2px);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.piano-key.black:active,
.piano-key.black.active {
    background: #333;
}

/* ---------------------------------------------------------
   Notation Labels
   --------------------------------------------------------- */
.key-label {
    position: absolute;
    width: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

.piano-key.white .letter {
    bottom: 12px;
    font-size: 1rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.piano-key.white:hover .letter,
.piano-key.white.active .letter {
    color: #333;
    transform: scale(1.1);
}

.piano-key.black .symbols {
    height: 100%;
    top: 0;
    justify-content: center;
    gap: 1px;
    font-size: 0.6rem;
    color: #fff;
}

.piano-key.black .symbols .or {
    font-size: 0.45rem;
    opacity: 0.5;
    font-weight: 400;
}

.piano-key.black .symbols span {
    display: block;
    line-height: 1.1;
}

.piano-key.black .symbols sup {
    font-size: 0.55rem;
    vertical-align: super;
    margin-left: 1px;
}

/* Middle C Animation */
.piano-key.middle-c {
    animation: ribbon-pulse 3s infinite ease-in-out;
}

@keyframes ribbon-pulse {
    0% {
        box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
    }

    50% {
        box-shadow: inset 0 0 50px 10px rgba(255, 255, 255, 0.6);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.piano-key.middle-c .letter {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* Hide Piano on Mobile */
@media (max-width: 768px) {
    .pianobar {
        display: none !important;
    }
}