/* Piano Bridge CSS */
.piano-bridge-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: var(--text-primary);
}

.pb-panel {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.pb-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.pb-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 200px;
}

.pb-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pb-group input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.pb-value {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-color);
    min-width: 3ch;
    text-align: right;
}

.pb-visualizer-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid #333;
    margin-bottom: 24px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

#pbVisualizer {
    width: 100%;
    height: 200px;
    display: block;
}

/* Virtual Piano */
.pb-piano {
    display: flex;
    justify-content: center;
    height: 120px;
    /* Reduced from 150px */
    margin-bottom: 20px;
    background: #111;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
    position: relative;
}

.key {
    position: relative;
    float: left;
    width: 24px;
    /* Reduced from 30px */
    height: 100%;
    background: white;
    border: 1px solid #ccc;
    border-radius: 0 0 3px 3px;
    z-index: 1;
    transition: background 0.1s;
}

.key.black {
    width: 16px;
    /* Reduced from 20px */
    height: 60%;
    background: #111;
    margin-left: -8px;
    /* Reduced from -10px */
    margin-right: -8px;
    /* Reduced from -10px */
    z-index: 2;
    border: 1px solid #000;
}

.key.active {
    background: #4fd1c5 !important;
    box-shadow: 0 0 10px #4fd1c5;
}

.key.black.active {
    background: #38b2ac !important;
}

/* Log & Info */
.pb-log {
    background: #1a202c;
    color: #48bb78;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    height: 60px;
    overflow-y: auto;
    border: 1px solid #2d3748;
    margin-bottom: 20px;
}

.pb-info {
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.2);
    padding: 16px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.pb-info i {
    color: #4299e1;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .pb-row {
        flex-direction: column;
        align-items: stretch;
    }

    .pb-group {
        width: 100%;
    }

    .pb-piano {
        justify-content: flex-start;
        /* Allow scrolling on mobile */
    }
}