/* =============================================================================
   METRONOME PANEL - Carousel Style
   ============================================================================= */

.sb-panel {
    /* Base panel styles */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: #1e293b !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    padding: 16px !important;
    width: 300px !important;
    max-height: 520px !important;
    overflow: visible !important;
    z-index: var(--z-panel) !important;
}

/* Modifier panel - no padding (carousel has its own) */
.sb-panel--modifier {
    padding: 0 !important;
}

[data-theme="light"] .sb-panel {
    /* Base panel styles */
    background: #ffffff !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
}

/* Carousel Container */
.sb-carousel-container {
    width: 100%;
    overflow: hidden;
}

.sb-carousel-slide {
    padding: 16px 16px 24px 16px;
    animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Panel Title */
.sb-panel .sb-panel-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #334155 !important;
}

[data-theme="light"] .sb-panel .sb-panel-title {
    color: #94a3b8 !important;
    border-bottom-color: #e2e8f0 !important;
}

/* Panel List */
.sb-panel .sb-panel-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Modifier Row - Clickeable completo */
.sb-modifier-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #334155;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

[data-theme="light"] .sb-modifier-row {
    background: #f1f5f9;
}

.sb-modifier-row:hover {
    background: #3d4f63;
}

[data-theme="light"] .sb-modifier-row:hover {
    background: #e2e8f0;
}

.sb-modifier-row.active {
    background: rgba(78, 205, 196, 0.15);
    border: 2px solid #4ecdc4;
}

.sb-modifier-row i:first-child {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #94a3b8;
}

.sb-modifier-row.active i:first-child {
    color: #4ecdc4;
}

.sb-modifier-info {
    flex: 1;
    min-width: 0;
}

.sb-modifier-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

[data-theme="light"] .sb-modifier-name {
    color: #334155;
}

.sb-modifier-desc {
    display: block;
    font-size: 10px;
    color: #64748b;
}

.sb-chevron {
    font-size: 12px;
    color: #64748b;
}

/* ================================
   CONFIG VIEW (Second slide)
   ================================ */

.sb-config-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #334155;
}

[data-theme="light"] .sb-config-header {
    border-bottom-color: #e2e8f0;
}

.sb-back-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #334155;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}

[data-theme="light"] .sb-back-btn {
    background: #f1f5f9;
}

.sb-back-btn:hover {
    background: #475569;
    color: #e2e8f0;
}

[data-theme="light"] .sb-back-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.sb-config-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

[data-theme="light"] .sb-config-title {
    color: #334155;
}

.sb-config-title i {
    color: #4ecdc4;
}

.sb-config-toggle {
    flex-shrink: 0;
}

/* Config Body */
.sb-config-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Config Tabs */
.sb-config-tabs {
    display: flex !important;
    gap: 4px !important;
    background: #0f172a !important;
    padding: 4px !important;
    border-radius: 10px !important;
    width: 100% !important;
}

[data-theme="light"] .sb-config-tabs {
    background: #e2e8f0 !important;
}

.sb-config-tabs .sb-config-tab {
    flex: 1 1 0 !important;
    padding: 8px 6px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    cursor: pointer !important;
    text-align: center !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.sb-config-tabs .sb-config-tab:hover {
    color: #94a3b8 !important;
}

.sb-config-tabs .sb-config-tab.active {
    background: #4ecdc4 !important;
    color: #ffffff !important;
}

/* Config Hint */
.sb-config-hint {
    font-size: 11px;
    color: #64748b;
    margin: 0;
    padding: 8px 10px;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 8px;
    line-height: 1.4;
}

/* Config Fields */
.sb-config-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sb-field-row {
    display: flex;
    gap: 10px;
}

.sb-field-row .sb-field-group {
    flex: 1;
}

.sb-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sb-field-group label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Number Input */
.sb-number-input {
    display: flex;
    align-items: center;
    background: #334155;
    border-radius: 10px;
    overflow: hidden;
}

[data-theme="light"] .sb-number-input {
    background: #f1f5f9;
}

.sb-number-input button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sb-number-input button:hover {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
}

.sb-number-input button:active {
    background: rgba(78, 205, 196, 0.3);
}

.sb-number-value {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #e2e8f0;
}

[data-theme="light"] .sb-number-value {
    color: #334155;
}

/* Radio Group */
.sb-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sb-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #334155;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    color: #e2e8f0;
    transition: all 0.15s ease;
}

[data-theme="light"] .sb-radio {
    background: #f1f5f9;
    color: #334155;
}

.sb-radio:hover {
    background: #3d4f63;
}

[data-theme="light"] .sb-radio:hover {
    background: #e2e8f0;
}

.sb-radio.selected {
    background: rgba(78, 205, 196, 0.15);
    border: 1px solid #4ecdc4;
}

.sb-radio-dot {
    width: 16px;
    height: 16px;
    border: 2px solid #64748b;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.sb-radio.selected .sb-radio-dot {
    border-color: #4ecdc4;
}

.sb-radio.selected .sb-radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #4ecdc4;
    border-radius: 50%;
}

/* Action Button */
.sb-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #475569;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
}

[data-theme="light"] .sb-action-btn {
    background: #e2e8f0;
    color: #334155;
}

.sb-action-btn:hover {
    background: #64748b;
}

[data-theme="light"] .sb-action-btn:hover {
    background: #cbd5e1;
}

/* ================================
   Original Panel Styles (subdivision, time signature)
   ================================ */

.sb-panel .sb-panel-list-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    background: #334155 !important;
    border: 2px solid transparent !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #e2e8f0 !important;
}

[data-theme="light"] .sb-panel .sb-panel-list-item {
    background: #f1f5f9 !important;
    color: #334155 !important;
}

.sb-panel .sb-panel-list-item:hover {
    background: #475569 !important;
}

[data-theme="light"] .sb-panel .sb-panel-list-item:hover {
    background: #e2e8f0 !important;
}

.sb-panel .sb-panel-list-item.active {
    background: #4ecdc4 !important;
    color: #ffffff !important;
}

.sb-panel .sb-panel-list-item i {
    font-size: 14px !important;
    width: 18px !important;
    text-align: center !important;
    color: #94a3b8 !important;
}

.sb-panel .sb-panel-list-item.active i {
    color: #ffffff !important;
}

.sb-panel .sb-subdiv-icon {
    width: 20px !important;
    height: 20px !important;
}

.sb-panel .sb-panel-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
}

.sb-panel .sb-panel-option {
    padding: 10px !important;
    background: #334155 !important;
    border: 2px solid transparent !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    text-align: center !important;
}

[data-theme="light"] .sb-panel .sb-panel-option {
    background: #f1f5f9 !important;
    color: #334155 !important;
}

.sb-panel .sb-panel-option:hover {
    background: #475569 !important;
}

.sb-panel .sb-panel-option.active {
    background: #4ecdc4 !important;
    color: #ffffff !important;
}

/* OK Button */
.sb-ok-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 12px;
    background: #4ecdc4;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sb-ok-btn:hover {
    background: #3dbdb5;
}

.sb-ok-btn:active {
    transform: scale(0.98);
}


/* =============================================================================
   CONSOLIDATED FROM responsive-fixes.css
   ============================================================================= */

/* =============================================================================
   17. METRONOME - Dial beat glow animation
   ============================================================================= */

/* Dial ring glow on beat */
.sb-dial.beat-pulse {
    animation: dialPulse 0.15s ease-out;
}

.sb-dial.beat-pulse .sb-dial-fill {
    filter: brightness(1.5) drop-shadow(0 0 15px rgba(78, 205, 196, 0.8));
}

.sb-dial.beat-pulse .sb-dial-knob {
    box-shadow: 0 0 25px rgba(78, 205, 196, 1), 0 0 50px rgba(78, 205, 196, 0.6);
    transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-102px) scale(1.2);
}

@keyframes dialPulse {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
    100% {
        filter: brightness(1);
    }
}

/* Dial track glow effect layer */
.sb-dial::after {
    content: '';
    position: absolute;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    box-shadow: inset 0 0 30px rgba(78, 205, 196, 0.4);
}

.sb-dial.beat-pulse::after {
    opacity: 1;
}


/* =============================================================================
   47. FIX: BPM badge colors in song table
   ============================================================================= */
.song-badge-bpm {
    background: var(--bg-tertiary, #334155) !important;
    color: var(--text-secondary, #94a3b8) !important;
}

[data-theme="dark"] .song-badge-bpm {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #a5b4fc !important;
}

[data-theme="dark"] .song-card-modern .song-badge-bpm,

.song-lyrics-modern .tab-line {
    font-size: 0.85em !important;
}

/* =============================================================================
   56. FIX: Chord editor - rectangular chords on mobile like desktop
   ============================================================================= */
/* Override the touch mode min-width/min-height to keep rectangular shape */
@media (pointer: coarse) {

    
    .sb-settings-volume input[type="range"] {
        flex: 1;
        height: 6px;
        background: #1a1d2e;
        border-radius: 3px;
        -webkit-appearance: none;
    }
    
    .sb-settings-volume input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        background: #4ecdc4;
        border-radius: 50%;
        cursor: pointer;
    }
}

/* =============================================================================
   65. Settings panel styling for metronome
   ============================================================================= */
.sb-settings-content {
    padding: 8px 0;
}

.sb-setting-item {
    display: flex;

    gap: 8px;
    margin-bottom: 16px;
}

.sb-setting-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0aec0;
    font-size: 14px;
}

.sb-setting-item label i {
    color: #4ecdc4;
    width: 20px;
}

.sb-settings-volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sb-volume-slider {
    flex: 1;
    height: 6px;
    background: #1a1d2e;
    border-radius: 3px;
    -webkit-appearance: none;
    cursor: pointer;
}

.sb-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #4ecdc4;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(78, 205, 196, 0.4);
}

.sb-volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #4ecdc4;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.sb-volume-value {
    min-width: 40px;
    color: #4ecdc4;
    font-weight: 600;
    font-size: 14px;
}

.sb-sound-select {
    width: 100%;
    padding: 10px 12px;
    background: #1a1d2e;
    border: 1px solid #3d4a5c;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.sb-sound-select:focus {
    outline: none;
    border-color: #4ecdc4;
}


.sb-sound-select option {
    background: #1a1d2e;
    color: white;
}

/* Panel styling for tablet */
@media (min-width: 481px) and (max-width: 1024px) {
/* REMOVED - sb-panel moved to metronome-panel.css */
    
    .sb-panel-title {
        color: #a0aec0 !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-bottom: 16px !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid #3d4a5c !important;
    }
    
    .sb-panel-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .sb-panel-option {
        padding: 12px 16px !important;
        background: #1a1d2e !important;
        border: none !important;
        border-radius: 8px !important;
        color: #a0aec0 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.2s !important;
    }
    
    .sb-panel-option:hover {
        background: #3d4a5c !important;
    }
    
    .sb-panel-option.active {
        background: #4ecdc4 !important;
        color: #1a1d2e !important;
    }
    
    .sb-panel-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .sb-panel-list-item {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px !important;
        background: #1a1d2e !important;
        border: none !important;
        border-radius: 8px !important;
        color: #a0aec0 !important;
        cursor: pointer !important;
        transition: all 0.2s !important;
        text-align: left !important;
    }
    
    .sb-panel-list-item:hover {
        background: #3d4a5c !important;
    }
    
    .sb-panel-list-item.active {
        background: rgba(78, 205, 196, 0.2) !important;
        color: #4ecdc4 !important;
    }
    
    .sb-panel-list-item i {
        width: 24px !important;
        font-size: 18px !important;
    }
}

/* =============================================================================
   66. Additional tablet metronome refinements
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1024px) {
    /* Ensure proper container sizing */
    .metronome-module .sb-container,
    #app-main .sb-container {
        width: 100%;
        max-width: 380px;
        min-height: 580px;
        padding: 24px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Beat indicators - 4 columns with equal spacing */
    .sb-beats {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 280px !important;
        padding: 0 !important;
        margin-bottom: 16px !important;
        background: transparent !important;
    }
    
    .sb-beat {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 8px !important;
        border-radius: 12px !important;
        background: rgba(45, 55, 72, 0.5) !important;
        transition: all 0.15s !important;
    }
    
    .sb-beat.playing {
        background: rgba(78, 205, 196, 0.2) !important;
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.3) !important;
    }
    
    .sb-beat-bars {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        width: 100% !important;
    }
    
    .sb-bar {
        height: 14px !important;
        background: #2d3748 !important;
        border-radius: 4px !important;
    }
    
    .sb-bar.active {
        background: #4ecdc4 !important;
        box-shadow: 0 0 8px rgba(78, 205, 196, 0.5) !important;
    }
    
    /* Compass counter pill */
    .sb-compass-counter {
        background: rgba(78, 205, 196, 0.15) !important;
        color: #4ecdc4 !important;
        padding: 8px 20px !important;
        border-radius: 20px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 20px !important;
        display: inline-flex !important;
        gap: 4px !important;
    }
    
    /* Modifier status - show when active */
    .sb-modifier-status {
        display: none !important;
    }
    
    .sb-modifier-status.active {
        display: flex !important;
    }
    
    /* Hide the settings popup div that's inside container */
    .sb-settings-popup {
        display: none !important;
    }
    
    /* Dial refinements */
    .sb-dial {
        position: relative !important;
    }
    
    .sb-dial-track {
        border-width: 6px !important;
        border-color: #3d4a5c !important;
    }
    
    .sb-dial-fill {
        background: conic-gradient(
            from -90deg,
            #4ecdc4 0deg,
            #4ecdc4 calc(var(--progress, 0) * 360deg),
            transparent calc(var(--progress, 0) * 360deg),
            transparent 360deg
        ) !important;
    }
    
    /* Bottom row positioning */
    .sb-bottom-row {
        width: 100% !important;
        margin-top: 20px !important;
        padding: 0 8px !important;
    }
    
    /* Play button - large and prominent */
    .sb-play-btn {
        box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4) !important;
    }
    
    .sb-play-btn:hover {
        transform: scale(1.05) !important;
    }
    
    .sb-play-btn.playing {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4) !important;
    }
    
    /* TAP button refinements */
    .sb-tap-btn span {
        font-size: 10px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }
    
    /* Volume bar - hidden on tablet (use settings panel instead) */
    .sb-volume {
        display: none !important;
    }
}

/* =============================================================================
   67. METRONOME TABLET FIX - Full screen, no container box
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1024px) {
    /* Remove the boxed container - use full screen */
    .sb-container {
        min-height: calc(100vh - 80px) !important;
        min-height: calc(100dvh - 80px) !important;
        max-width: none !important;
        width: 100% !important;
        padding: 32px 24px !important;
        background: transparent !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    /* Beat indicators - larger and more spread out */
    .sb-beats {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 400px !important;
        padding: 0 !important;
        margin-bottom: 24px !important;
        background: transparent !important;
    }
    
    .sb-beat {
        padding: 12px !important;
        border-radius: 16px !important;
        background: rgba(45, 55, 72, 0.4) !important;
    }
    
    .sb-beat-bars {
        width: 100% !important;
        gap: 6px !important;
    }
    
    .sb-bar {
        height: 18px !important;
        border-radius: 6px !important;
    }
    
    /* Compass counter - larger */
    .sb-compass-counter {
        padding: 10px 24px !important;
        font-size: 16px !important;
        margin-bottom: 28px !important;
    }
    
    /* Control buttons - larger */
    .sb-controls-row {
        gap: 16px !important;
        margin-bottom: 32px !important;
    }
    
    .sb-ctrl-btn {
        width: 64px !important;
        height: 64px !important;
        border-radius: 18px !important;
        font-size: 20px !important;
    }
    
    /* Tempo section - larger text */
    .sb-tempo-section {
        margin-bottom: 28px !important;
    }
    
    .sb-tempo-name {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    
    .sb-tempo-input {
        font-size: 80px !important;
        width: 180px !important;
    }
    
    .sb-tempo-unit {
        font-size: 20px !important;
    }
    
    /* Dial - larger */
    .sb-dial-container {
        gap: 32px !important;
        margin-bottom: 40px !important;
    }
    
    .sb-dial {
        width: 220px !important;
        height: 220px !important;
    }
    
    .sb-dial-btn {
        width: 56px !important;
        height: 56px !important;
        font-size: 24px !important;
    }
    
    .sb-dial-center {
        width: 60px !important;
        height: 60px !important;
        font-size: 20px !important;
    }
    
    .sb-dial-knob {
        width: 18px !important;
        height: 18px !important;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-95px) !important;
    }
    
    /* Bottom row - full width with more space */
    .sb-bottom-row {
        width: 100% !important;
        max-width: 400px !important;
        margin-top: auto !important;
        padding: 0 !important;
        padding-bottom: 20px !important;
    }
    
    /* Play button - larger */
    .sb-play-btn {
        width: 88px !important;
        height: 88px !important;
        border-radius: 24px !important;
        font-size: 32px !important;
    }
    
    /* TAP button - larger */
    .sb-tap-btn {
        width: 76px !important;
        height: 76px !important;
        border-radius: 20px !important;
    }
    
    .sb-tap-btn i {
        font-size: 24px !important;
    }
    
    .sb-tap-btn span {
        font-size: 11px !important;
    }
}

/* For larger tablets like iPad Pro */
@media (min-width: 1025px) and (max-width: 1366px) {
    .sb-container {
        min-height: calc(100vh - 80px) !important;
        min-height: calc(100dvh - 80px) !important;
        max-width: none !important;
        width: 100% !important;
        padding: 40px 32px !important;
        background: transparent !important;
        border-radius: 0 !important;
    }
    
    .sb-beats {
        max-width: 500px !important;
        gap: 24px !important;
    }
    
    .sb-dial {
        width: 260px !important;
        height: 260px !important;
    }
    
    .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-115px) !important;
    }
    
    .sb-tempo-input {
        font-size: 96px !important;
        width: 220px !important;
    }
    
    .sb-play-btn {
        width: 100px !important;
        height: 100px !important;
    }
    
    .sb-tap-btn {
        width: 88px !important;
        height: 88px !important;
    }
}

/* =============================================================================
   68. METRONOME FIXES - Larger dial, BPM below, flash effect on beats
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Tempo display - BPM below the number */
    .sb-tempo-display {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0 !important;
    }
    
    .sb-tempo-input {
        font-size: 90px !important;
        width: 200px !important;
        text-align: center !important;
    }
    
    .sb-tempo-unit {
        margin-left: 0 !important;
        margin-top: -8px !important;
        font-size: 18px !important;
        color: #718096 !important;
    }
    
    /* Much larger dial */
    .sb-dial-container {
        gap: 40px !important;
        margin-bottom: 48px !important;
    }
    
    .sb-dial {
        width: 280px !important;
        height: 280px !important;
    }
    
    .sb-dial-center {
        width: 70px !important;
        height: 70px !important;
        font-size: 22px !important;
    }
    
    .sb-dial-knob {
        width: 20px !important;
        height: 20px !important;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-125px) !important;
    }
    
    .sb-dial-btn {
        width: 60px !important;
        height: 60px !important;
        font-size: 26px !important;
    }
    
    /* Beat flash animation - quick flash instead of staying lit */
    .sb-beat.playing {
        animation: beatFlash 0.1s ease-out !important;
    }
    
    .sb-beat.playing .sb-bar.active {
        animation: barFlash 0.1s ease-out !important;
    }
    
    @keyframes beatFlash {
        0% {
            background: rgba(78, 205, 196, 0.4) !important;
            box-shadow: 0 0 30px rgba(78, 205, 196, 0.6) !important;
        }
        100% {
            background: rgba(45, 55, 72, 0.4) !important;
            box-shadow: none !important;
        }
    }
    
    @keyframes barFlash {
        0% {
            background: #4ecdc4 !important;
            box-shadow: 0 0 15px rgba(78, 205, 196, 0.8) !important;
        }
        100% {
            background: #4ecdc4 !important;
            box-shadow: 0 0 4px rgba(78, 205, 196, 0.3) !important;
        }
    }
}

/* For iPad Pro - even larger */
@media (min-width: 1025px) and (max-width: 1366px) {
    .sb-dial {
        width: 320px !important;
        height: 320px !important;
    }
    
    .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-145px) !important;
    }
    
    .sb-dial-center {
        width: 80px !important;
        height: 80px !important;
    }
    
    .sb-tempo-input {
        font-size: 100px !important;
    }
}

/* =============================================================================
   69. METRONOME TABLET FIXES - Dial stability, button sizes, positioning
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* FIX: Dial should NOT disappear on beat - override problematic transforms */
    .sb-dial.beat-pulse {
        animation: none !important;
        filter: none !important;
    }
    
    .sb-dial.beat-pulse .sb-dial-fill {
        filter: brightness(1.2) drop-shadow(0 0 10px rgba(78, 205, 196, 0.6)) !important;
    }
    
    /* Keep knob in place - just add glow, no transform change */
    .sb-dial.beat-pulse .sb-dial-knob {
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.8) !important;
        /* Keep the same transform as non-pulse state */
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-125px) !important;
    }
    
    .sb-dial::after {
        display: none !important;
    }
    
    /* Bottom row - Play left, TAP right with proper margins */
    .sb-bottom-row {
        position: absolute !important;
        bottom: 32px !important;
        left: 32px !important;
        right: 32px !important;
        width: auto !important;
        max-width: none !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Both buttons same size */
    .sb-play-btn,
    .sb-tap-btn {
        width: 72px !important;
        height: 72px !important;
        border-radius: 20px !important;
    }
    
    .sb-play-btn {
        font-size: 28px !important;
    }
    
    .sb-tap-btn {
        flex-direction: column !important;
        gap: 4px !important;
    }
    
    .sb-tap-btn i {
        font-size: 22px !important;
    }
    
    .sb-tap-btn span {
        font-size: 10px !important;
    }
}

/* iPad Pro - larger dial knob position */
@media (min-width: 1025px) and (max-width: 1366px) {
    .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-145px) !important;
    }
    
    .sb-bottom-row {
        bottom: 40px !important;
        left: 40px !important;
        right: 40px !important;
    }
    
    .sb-play-btn,
    .sb-tap-btn {
        width: 80px !important;
        height: 80px !important;
        border-radius: 22px !important;
    }
    
    .sb-play-btn {
        font-size: 32px !important;
    }
    
    .sb-tap-btn i {
        font-size: 26px !important;
    }
}

/* =============================================================================
   70. METRONOME - Fixed height, no scroll, exact fit to screen
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Prevent any scrolling on metronome page */
    body:has(.sb-container) {
        overflow: hidden !important;
    }
    
    .main-content:has(.sb-container),
    #app-main:has(.sb-container) {
        overflow: hidden !important;
        height: 100% !important;
    }
    
    /* Container takes exact viewport height minus header/nav */
    .sb-container {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 70px !important;
        min-height: unset !important;
        max-height: unset !important;
        height: auto !important;
        overflow: hidden !important;
        padding: 20px 24px 100px 24px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-evenly !important;
    }
    
    /* Adjust spacing to fit everything */
    .sb-beats {
        margin-bottom: 12px !important;
        flex-shrink: 0 !important;
    }
    
    .sb-compass-counter {
        margin-bottom: 12px !important;
        flex-shrink: 0 !important;
    }
    
    .sb-controls-row {
        margin-bottom: 16px !important;
        flex-shrink: 0 !important;
    }
    
    .sb-tempo-section {
        margin-bottom: 12px !important;
        flex-shrink: 0 !important;
    }
    
    .sb-dial-container {
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }
    
    /* Bottom buttons - fixed at bottom */
    .sb-bottom-row {
        position: fixed !important;
        bottom: 90px !important;
        left: 32px !important;
        right: 32px !important;
    }
}

/* For devices with sidebar visible */
@media (min-width: 821px) and (max-width: 1366px) {
    .sb-container {
        left: var(--sidebar-width, 240px) !important;
    }
    
    .sb-bottom-row {
        left: calc(var(--sidebar-width, 240px) + 32px) !important;
    }
}

/* =============================================================================
   71. METRONOME BEATS - Wider spacing, single row always, centered
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Beats container - always single row, centered, wider gaps */
    .sb-beats {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 24px !important;
        width: 100% !important;
        max-width: none !important;
        padding: 0 16px !important;
        overflow: visible !important;
    }
    
    /* Each beat - shrink if needed to fit in one row */
    .sb-beat {
        flex: 0 1 auto !important;
        min-width: 40px !important;
        max-width: 70px !important;
        padding: 10px !important;
    }
    
    /* For many beats (7+), make them smaller */
    .sb-beats:has(.sb-beat:nth-child(7)) .sb-beat {
        min-width: 32px !important;
        max-width: 50px !important;
        padding: 6px !important;
    }
    
    .sb-beats:has(.sb-beat:nth-child(7)) .sb-bar {
        height: 12px !important;
    }
    
    /* For 9+ beats, even smaller */
    .sb-beats:has(.sb-beat:nth-child(9)) .sb-beat {
        min-width: 28px !important;
        max-width: 42px !important;
        padding: 4px !important;
        gap: 16px !important;
    }
    
    .sb-beats:has(.sb-beat:nth-child(9)) .sb-bar {
        height: 10px !important;
    }
    
    /* For 12 beats */
    .sb-beats:has(.sb-beat:nth-child(12)) .sb-beat {
        min-width: 24px !important;
        max-width: 36px !important;
        padding: 3px !important;
    }
    
    .sb-beats:has(.sb-beat:nth-child(12)) {
        gap: 12px !important;
    }
    
    .sb-beats:has(.sb-beat:nth-child(12)) .sb-bar {
        height: 8px !important;
    }
}

/* =============================================================================
   72. Header refresh button - only visible on mobile/tablet
   ============================================================================= */
/* Hide on desktop */
.mobile-refresh-btn {
    display: none !important;
}

/* Show on mobile and tablet */
@media (max-width: 1024px) {
    .mobile-refresh-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-refresh-btn.spinning svg {
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
}

/* =============================================================================
   73. METRONOME BEATS - Progressive sizing based on beat count
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Reset previous rules - base styling for normal beats (2-6) */
    .sb-beats {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 20px !important;
        width: auto !important;
        max-width: none !important;
        padding: 0 24px !important;
        overflow: visible !important;
    }
    
    /* Normal size for 2-6 beats */
    .sb-beat {
        flex: 0 0 auto !important;
        width: 60px !important;
        min-width: unset !important;
        max-width: unset !important;
        padding: 10px !important;
        border-radius: 14px !important;
    }
    
    .sb-beat-bars {
        gap: 5px !important;
    }
    
    .sb-bar {
        height: 16px !important;
        border-radius: 5px !important;
    }
    
    /* 7 beats - slightly smaller */
    .sb-beats:has(.sb-beat:nth-child(7)) {
        gap: 16px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(7)) .sb-beat {
        width: 52px !important;
        padding: 8px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(7)) .sb-bar {
        height: 14px !important;
    }
    
    /* 8 beats - a bit smaller */
    .sb-beats:has(.sb-beat:nth-child(8)) {
        gap: 14px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(8)) .sb-beat {
        width: 48px !important;
        padding: 7px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(8)) .sb-bar {
        height: 13px !important;
    }
    
    /* 9 beats - smaller */
    .sb-beats:has(.sb-beat:nth-child(9)) {
        gap: 12px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(9)) .sb-beat {
        width: 42px !important;
        padding: 6px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(9)) .sb-bar {
        height: 12px !important;
    }
    
    /* 12 beats - smallest */
    .sb-beats:has(.sb-beat:nth-child(12)) {
        gap: 8px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(12)) .sb-beat {
        width: 34px !important;
        padding: 5px !important;
        border-radius: 10px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(12)) .sb-bar {
        height: 10px !important;
        border-radius: 3px !important;
    }
    .sb-beats:has(.sb-beat:nth-child(12)) .sb-beat-bars {
        gap: 3px !important;
    }
}

/* =============================================================================
   74. METRONOME - Restore timer display (topbar)
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    .sb-timer-display {
        display: block !important;
        position: absolute !important;
        top: 16px !important;
        left: 24px !important;
        font-size: 14px !important;
        color: #4ecdc4 !important;
        font-weight: 500 !important;
    }
}

/* =============================================================================
   75. METRONOME - Keep header visible, timer below compass pill
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Ensure header stays on top */
    .header {
        position: relative !important;
        
    }
    
    /* Container should not cover header - use relative positioning */
    .sb-container {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        min-height: calc(100vh - 140px) !important;
        min-height: calc(100dvh - 140px) !important;
        height: auto !important;
        overflow: hidden !important;
        padding: 20px 24px !important;
        padding-bottom: 120px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 12px !important;
    }
    
    /* Timer display - below compass pill, not absolute */
    .sb-timer-display {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        display: block !important;
        order: 2 !important;
        font-size: 13px; /* Base size - JS zoom overrides this */
        color: #4ecdc4 !important;
        font-weight: 500 !important;
        margin-bottom: 8px !important;
    }
    
    /* Reorder elements using flexbox order */
    .sb-beats {
        order: 1 !important;
    }
    
    .sb-compass-counter {
        order: 2 !important;
    }
    
    .sb-timer-display {
        order: 3 !important;
    }
    
    .sb-modifier-status {
        order: 4 !important;
    }
    
    .sb-controls-row {
        order: 5 !important;
    }
    
    .sb-tempo-section {
        order: 6 !important;
    }
    
    .sb-dial-container {
        order: 7 !important;
    }
    
    .sb-volume {
        order: 8 !important;
    }
    
    /* Bottom row stays at bottom */
    .sb-bottom-row {
        position: fixed !important;
        bottom: 85px !important;
        left: 24px !important;
        right: 24px !important;
        order: 9 !important;
        z-index: 100 !important;
    }
}

/* =============================================================================
   76. METRONOME TABLET - FINAL DEFINITIVE STYLES
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    .sb-container {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        min-height: calc(100vh - 140px) !important;
        min-height: calc(100dvh - 140px) !important;
        width: 100% !important;
        padding: 24px !important;
        padding-bottom: 140px !important;
        background: transparent !important;
        overflow: visible !important;
    }
    
    .sb-beats {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 28px !important;
        margin-bottom: 20px !important;
    }
    
    .sb-beat {
        display: flex !important;
        flex-direction: column !important;
        width: 70px !important;
        padding: 12px !important;
        border-radius: 16px !important;
        background: rgba(45, 55, 72, 0.4) !important;
    }
    
    .sb-beat-bars {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    .sb-bar {
        height: 18px !important;
        background: #2d3748 !important;
        border-radius: 6px !important;
    }
    
    .sb-bar.active {
        background: #4ecdc4 !important;
    }
    
    .sb-beats:has(.sb-beat:nth-child(7)) { gap: 22px !important; }
    .sb-beats:has(.sb-beat:nth-child(7)) .sb-beat { width: 58px !important; padding: 10px !important; }
    .sb-beats:has(.sb-beat:nth-child(7)) .sb-bar { height: 15px !important; }
    
    .sb-beats:has(.sb-beat:nth-child(8)) { gap: 18px !important; }
    .sb-beats:has(.sb-beat:nth-child(8)) .sb-beat { width: 52px !important; padding: 9px !important; }
    .sb-beats:has(.sb-beat:nth-child(8)) .sb-bar { height: 14px !important; }
    
    .sb-beats:has(.sb-beat:nth-child(9)) { gap: 14px !important; }
    .sb-beats:has(.sb-beat:nth-child(9)) .sb-beat { width: 46px !important; padding: 8px !important; }
    
    .sb-beats:has(.sb-beat:nth-child(12)) { gap: 10px !important; }
    .sb-beats:has(.sb-beat:nth-child(12)) .sb-beat { width: 38px !important; padding: 6px !important; }
    
    .sb-compass-counter {
        display: inline-flex !important;
        background: rgba(78, 205, 196, 0.15) !important;
        color: #4ecdc4 !important;
        padding: 10px 24px !important;
        border-radius: 20px !important;
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }
    
    .sb-timer-display {
        display: block !important;
        color: #4ecdc4 !important;
        font-size: 14px !important;
        margin-bottom: 16px !important;
    }
    
    .sb-controls-row {
        display: flex !important;
        gap: 16px !important;
        margin-bottom: 24px !important;
    }
    
    .sb-ctrl-btn {
        display: flex !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 16px !important;
        background: #2d3748 !important;
        color: #a0aec0 !important;
        font-size: 18px !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
    }
    
    .sb-ctrl-btn.active {
        background: #4ecdc4 !important;
        color: #1a1d2e !important;
    }
    
    .sb-tempo-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-bottom: 20px !important;
    }
    
    .sb-tempo-name {
        font-size: 16px !important;
        color: #718096 !important;
    }
    
    .sb-tempo-display {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .sb-tempo-input {
        font-size: 80px !important;
        width: 180px !important;
        color: white !important;
        background: transparent !important;
        border: none !important;
        text-align: center !important;
    }
    
    .sb-tempo-unit {
        font-size: 18px !important;
        color: #718096 !important;
    }
    
    .sb-dial-container {
        display: flex !important;
        align-items: center !important;
        gap: 32px !important;
        margin-bottom: 24px !important;
    }
    
    .sb-dial {
        display: block !important;
        width: 240px !important;
        height: 240px !important;
        position: relative !important;
    }
    
    .sb-dial-btn {
        display: flex !important;
        width: 56px !important;
        height: 56px !important;
        border-radius: 50% !important;
        background: #2d3748 !important;
        border: 2px solid #3d4a5c !important;
        color: #a0aec0 !important;
        font-size: 22px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .sb-dial-center {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 60px !important;
        height: 60px !important;
        background: #2d3748 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #a0aec0 !important;
    }
    
    .sb-dial-knob {
        position: absolute !important;
        width: 18px !important;
        height: 18px !important;
        background: #4ecdc4 !important;
        border-radius: 50% !important;
        top: 50% !important;
        left: 50% !important;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-105px) !important;
    }
    
    .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-105px) !important;
        box-shadow: 0 0 15px rgba(78, 205, 196, 0.6) !important;
    }
    
    .sb-bottom-row {
        position: fixed !important;
        display: flex !important;
        bottom: 90px !important;
        left: 32px !important;
        right: 32px !important;
        justify-content: space-between !important;
        z-index: 100 !important;
    }
    
    .sb-play-btn, .sb-tap-btn {
        display: flex !important;
        width: 72px !important;
        height: 72px !important;
        border-radius: 20px !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
    }
    
    .sb-play-btn {
        background: #4ecdc4 !important;
        color: #1a1d2e !important;
        font-size: 28px !important;
    }
    
    .sb-play-btn.playing {
        background: #ff6b6b !important;
    }
    
    .sb-tap-btn {
        background: #2d3748 !important;
        color: #a0aec0 !important;
        flex-direction: column !important;
        gap: 4px !important;
    }
    
    .sb-tap-btn i { font-size: 22px !important; }
    .sb-tap-btn span { font-size: 10px !important; }
    
    .sb-volume { display: none !important; }
}

/* =============================================================================
   77. METRONOME FIXES - Fixed height beats, dial fix, larger control buttons
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Beats container - fixed height so nothing moves below */
    .sb-beats {
        min-height: 90px !important;
        align-items: center !important;
    }
    
    /* All beats same height regardless of count */
    .sb-beat {
        height: 80px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
    
    /* Fixed bar height - never changes */
    .sb-bar {
        height: 16px !important;
    }
    
    /* Override progressive bar heights - keep them all the same */
    .sb-beats:has(.sb-beat:nth-child(7)) .sb-bar,
    .sb-beats:has(.sb-beat:nth-child(8)) .sb-bar,
    .sb-beats:has(.sb-beat:nth-child(9)) .sb-bar,
    .sb-beats:has(.sb-beat:nth-child(12)) .sb-bar {
        height: 16px !important;
    }
    
    /* Control buttons - LARGER */
    .sb-ctrl-btn {
        width: 68px !important;
        height: 68px !important;
        border-radius: 18px !important;
        font-size: 22px !important;
    }
    
    .sb-controls-row {
        gap: 18px !important;
    }
    
    /* DIAL FIX - Complete styling */
    .sb-dial {
        width: 220px !important;
        height: 220px !important;
        position: relative !important;
        border-radius: 50% !important;
    }
    
    .sb-dial-track {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        border: 6px solid #3d4a5c !important;
        border-radius: 50% !important;
        box-sizing: border-box !important;
    }
    
    .sb-dial-fill {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        width: 200px !important;
        height: 200px !important;
        border-radius: 50% !important;
        background: conic-gradient(
            from -90deg,
            #4ecdc4 0deg,
            #4ecdc4 calc(var(--progress, 0) * 360deg),
            transparent calc(var(--progress, 0) * 360deg),
            transparent 360deg
        ) !important;
        -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #fff calc(100% - 7px)) !important;
        mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #fff calc(100% - 7px)) !important;
    }
    
    .sb-dial-center {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 60px !important;
        height: 60px !important;
        background: #2d3748 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #a0aec0 !important;
        font-size: 20px !important;
        z-index: 5 !important;
    }
    
    .sb-dial-knob {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 18px !important;
        height: 18px !important;
        margin-top: -9px !important;
        margin-left: -9px !important;
        background: #4ecdc4 !important;
        border-radius: 50% !important;
        border: 3px solid #1a1d2e !important;
        box-shadow: 0 0 10px rgba(78, 205, 196, 0.5) !important;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-95px) !important;
        transform-origin: center center !important;
        z-index: 10 !important;
    }
    
    .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-95px) !important;
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.8) !important;
    }
    
    .sb-dial-input {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0 !important;
        cursor: ns-resize !important;
        z-index: 20 !important;
    }
    
    .sb-dial-btn {
        width: 52px !important;
        height: 52px !important;
        border-radius: 50% !important;
        background: #2d3748 !important;
        border: 2px solid #3d4a5c !important;
        color: #a0aec0 !important;
        font-size: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    
    .sb-dial-btn:hover {
        background: #3d4a5c !important;
        color: #4ecdc4 !important;
    }
}

/* =============================================================================
   78. METRONOME DIAL - COMPLETE RESET AND PROPER STYLING
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Dial container - more space, moved down */
    .sb-dial-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 28px !important;
        margin-top: 16px !important;
        margin-bottom: 32px !important;
    }
    
    /* Main dial - LARGER */
    .sb-dial {
        width: 260px !important;
        height: 260px !important;
        position: relative !important;
        border-radius: 50% !important;
        background: #2d3748 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Inner dark circle */
    .sb-dial::before {
        content: "" !important;
        position: absolute !important;
        width: calc(100% - 40px) !important;
        height: calc(100% - 40px) !important;
        border-radius: 50% !important;
        background: #1a1a2e !important;
    }
    
    /* Track ring */
    .sb-dial-track {
        position: absolute !important;
        width: calc(100% - 20px) !important;
        height: calc(100% - 20px) !important;
        border-radius: 50% !important;
        border: 8px solid #3d4a5c !important;
        box-sizing: border-box !important;
    }
    
    /* Progress fill arc */
    .sb-dial-fill {
        position: absolute !important;
        width: calc(100% - 20px) !important;
        height: calc(100% - 20px) !important;
        border-radius: 50% !important;
        background: conic-gradient(
            from -90deg,
            #4ecdc4 0deg,
            #4ecdc4 calc(var(--progress, 0) * 360deg),
            transparent calc(var(--progress, 0) * 360deg),
            transparent 360deg
        ) !important;
        -webkit-mask: radial-gradient(transparent 55%, black 56%, black 100%) !important;
        mask: radial-gradient(transparent 55%, black 56%, black 100%) !important;
    }
    
    /* Knob on the arc - larger dial = larger translateY */
    .sb-dial-knob {
        position: absolute !important;
        width: 20px !important;
        height: 20px !important;
        background: #4ecdc4 !important;
        border-radius: 50% !important;
        box-shadow: 0 0 12px rgba(78, 205, 196, 0.7) !important;
        border: 3px solid #1a1a2e !important;
        left: 50% !important;
        top: 50% !important;
        margin-left: -10px !important;
        margin-top: -10px !important;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-112px) !important;
        z-index: 6 !important;
        pointer-events: none !important;
    }
    
    /* Beat pulse - only glow, no position change */
    .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-112px) !important;
        box-shadow: 0 0 25px rgba(78, 205, 196, 1) !important;
    }
    
    /* Center circle with icon */
    .sb-dial-center {
        position: absolute !important;
        width: 70px !important;
        height: 70px !important;
        background: #2d3748 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #a0aec0 !important;
        font-size: 22px !important;
        z-index: 4 !important;
    }
    
    /* Hidden range input for interaction */
    .sb-dial-input {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0 !important;
        cursor: ns-resize !important;
        z-index: 10 !important;
    }
    
    /* +/- buttons on sides */
    .sb-dial-btn {
        width: 56px !important;
        height: 56px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #2d3748 !important;
        border: 2px solid #3d4a5c !important;
        border-radius: 50% !important;
        color: #a0aec0 !important;
        font-size: 24px !important;
        cursor: pointer !important;
    }
    
    .sb-dial-btn:hover {
        background: #3d4a5c !important;
        color: #4ecdc4 !important;
    }
    
    /* Hide tick marks if any */
    .sb-dial-ticks {
        display: none !important;
    }
}

/* =============================================================================
   79. METRONOME DIAL - FINAL DEFINITIVE FIX (overrides ALL previous rules)
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Reset and restyle dial container */
    .metronome-page .sb-dial-container,
    .sb-container .sb-dial-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 30px !important;
        margin-top: 24px !important;
        margin-bottom: 40px !important;
        width: 100% !important;
    }
    
    /* Main dial - DEFINITIVELY styled */
    .metronome-page .sb-dial,
    .sb-container .sb-dial {
        width: 280px !important;
        height: 280px !important;
        min-width: 280px !important;
        min-height: 280px !important;
        max-width: 280px !important;
        max-height: 280px !important;
        position: relative !important;
        border-radius: 50% !important;
        background: #2d3748 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: ns-resize !important;
        user-select: none !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Dark inner circle */
    .metronome-page .sb-dial::before,
    .sb-container .sb-dial::before {
        content: '' !important;
        position: absolute !important;
        width: calc(100% - 40px) !important;
        height: calc(100% - 40px) !important;
        border-radius: 50% !important;
        background: #1a1a2e !important;
        z-index: 1 !important;
    }
    
    /* Hidden range input */
    .metronome-page .sb-dial-input,
    .sb-container .sb-dial-input {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0 !important;
        cursor: ns-resize !important;
        z-index: 10 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Track ring */
    .metronome-page .sb-dial-track,
    .sb-container .sb-dial-track {
        position: absolute !important;
        width: calc(100% - 20px) !important;
        height: calc(100% - 20px) !important;
        border-radius: 50% !important;
        border: 8px solid #3d4a5c !important;
        box-sizing: border-box !important;
        background: transparent !important;
        z-index: 2 !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    /* Ticks container */
    .metronome-page .sb-dial-ticks,
    .sb-container .sb-dial-ticks {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 2 !important;
    }
    
    /* Progress fill arc */
    .metronome-page .sb-dial-fill,
    .sb-container .sb-dial-fill {
        position: absolute !important;
        width: calc(100% - 20px) !important;
        height: calc(100% - 20px) !important;
        border-radius: 50% !important;
        background: conic-gradient(
            from -90deg,
            #4ecdc4 0deg,
            #4ecdc4 calc(var(--progress, 0) * 360deg),
            transparent calc(var(--progress, 0) * 360deg),
            transparent 360deg
        ) !important;
        -webkit-mask: radial-gradient(transparent 55%, black 56%, black 100%) !important;
        mask: radial-gradient(transparent 55%, black 56%, black 100%) !important;
        z-index: 3 !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        pointer-events: none !important;
    }
    
    /* Knob on the arc - positioned correctly for 280px dial */
    .metronome-page .sb-dial-knob,
    .sb-container .sb-dial-knob {
        position: absolute !important;
        width: 22px !important;
        height: 22px !important;
        background: #4ecdc4 !important;
        border-radius: 50% !important;
        box-shadow: 0 0 14px rgba(78, 205, 196, 0.8) !important;
        border: 3px solid #1a1a2e !important;
        left: 50% !important;
        top: 50% !important;
        margin-left: -11px !important;
        margin-top: -11px !important;
        /* 280px dial = 130px - 10px padding = ~120px radius for knob */
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-120px) !important;
        z-index: 7 !important;
        pointer-events: none !important;
        transition: none !important;
    }
    
    /* Knob during beat pulse - MUST NOT CHANGE translateY */
    .metronome-page .sb-dial.beat-pulse .sb-dial-knob,
    .sb-container .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-120px) !important;
        box-shadow: 0 0 20px rgba(78, 205, 196, 1) !important;
    }
    
    /* Center icon area */
    .metronome-page .sb-dial-center,
    .sb-container .sb-dial-center {
        position: absolute !important;
        width: 70px !important;
        height: 70px !important;
        background: #2d3748 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #a0aec0 !important;
        font-size: 1.4rem !important;
        z-index: 5 !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    /* +/- buttons */
    .metronome-page .sb-dial-btn,
    .sb-container .sb-dial-btn {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #2d3748 !important;
        border: 2px solid #3d4a5c !important;
        border-radius: 50% !important;
        color: #a0aec0 !important;
        font-size: 1.5rem !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        transition: all 0.2s ease !important;
    }
    
    .metronome-page .sb-dial-btn:hover,
    .sb-container .sb-dial-btn:hover {
        background: #3d4a5c !important;
        color: #4ecdc4 !important;
        border-color: #4ecdc4 !important;
    }
    
    /* Remove any aftereffects */
    .metronome-page .sb-dial::after,
    .sb-container .sb-dial::after {
        display: none !important;
    }
}

/* =============================================================================
   80. TIMER DISPLAY - Fixed height to prevent layout shift
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Container for compass info and timer - fixed height */
    .metronome-page .sb-info-row,
    .sb-container .sb-info-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-height: 70px !important;
        height: 70px !important;
        margin-bottom: 16px !important;
    }
    
    /* Timer display - always takes space even when hidden */
    .metronome-page .sb-timer-display,
    .sb-container .sb-timer-display {
        display: block !important;
        visibility: hidden !important;
        color: #4ecdc4 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        height: 20px !important;
        line-height: 20px !important;
        margin-top: 8px !important;
        margin-bottom: 0 !important;
    }
    
    /* When timer is active/visible */
    .metronome-page .sb-timer-display.active,
    .metronome-page .sb-timer-display:not(:empty),
    .sb-container .sb-timer-display.active,
    .sb-container .sb-timer-display:not(:empty) {
        visibility: visible !important;
    }
    
    /* If timer uses different show/hide mechanism */
    .metronome-page .sb-timer-display[style*=display: block],
    .metronome-page .sb-timer-display[style*=display:block],
    .sb-container .sb-timer-display[style*=display: block],
    .sb-container .sb-timer-display[style*=display:block] {
        visibility: visible !important;
        display: block !important;
    }
    
    /* Compass pill - consistent styling */
    .metronome-page .sb-compass-counter,
    .sb-container .sb-compass-counter {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        background: rgba(78, 205, 196, 0.15) !important;
        padding: 8px 20px !important;
        border-radius: 20px !important;
        font-size: 15px !important;
        color: #4ecdc4 !important;
    }
}

/* =============================================================================
   81. TIMER DISPLAY - Better approach with min-height wrapper
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Override previous rules - timer always reserves its space */
    .metronome-page .sb-timer-display,
    .sb-container .sb-timer-display {
        display: block !important;
        visibility: visible !important;
        color: #4ecdc4 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        min-height: 20px !important;
        height: 20px !important;
        line-height: 20px !important;
        text-align: center !important;
        margin-top: 8px !important;
        margin-bottom: 0 !important;
    }
    
    /* When empty, still takes the same space but shows nothing */
    .metronome-page .sb-timer-display:empty,
    .sb-container .sb-timer-display:empty {
        min-height: 20px !important;
        height: 20px !important;
    }
}

/* =============================================================================
   82. TIMER CLOSER TO PILL + POPUP SIZES FIT CONTENT
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Timer display - closer to compass pill */
    .metronome-page .sb-timer-display,
    .sb-container .sb-timer-display {
        margin-top: 2px !important;
    }
    
    /* Compass pill - reduce bottom margin */
    .metronome-page .sb-compass-counter,
    .sb-container .sb-compass-counter {
        margin-bottom: 0 !important;
    }
    
    /* Info row - tighter spacing */
    .metronome-page .sb-info-row,
    .sb-container .sb-info-row {
        min-height: 50px !important;
        height: auto !important;
        gap: 2px !important;
    }
    
    
    /* Time signature grid - compact */
    .metronome-page .sb-panel-grid,
    .sb-container .sb-panel-grid {
        display: grid !important;
        grid-template-columns: repeat(3, auto) !important;
        gap: 10px !important;
        width: auto !important;
    }
    
    /* Time signature options - compact */
    .metronome-page .sb-panel-option,
    .sb-container .sb-panel-option {
        padding: 10px 16px !important;
        min-width: 50px !important;
        width: auto !important;
    }
    
    /* Subdivision list - compact */
    .metronome-page .sb-panel-list,
    .sb-container .sb-panel-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: auto !important;
    }
    
    /* Subdivision list items - fit content */
    .metronome-page .sb-panel-list-item,
    .sb-container .sb-panel-list-item {
        padding: 10px 16px !important;
        width: auto !important;
        white-space: nowrap !important;
    }
    
    /* Panel title */
    .metronome-page .sb-panel-title,
    .sb-container .sb-panel-title {
        margin-bottom: 12px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    /* Settings popup - fit content */
    .metronome-page .sb-settings-popup,
    .sb-container .sb-settings-popup {
        width: auto !important;
        min-width: 200px !important;
        padding: 16px !important;
    }
}

/* =============================================================================
   83. SUBDIVISION BUTTON - Musical symbol styling
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Subdivision button should show symbol properly */
    .metronome-page .sb-ctrl-btn[data-panel="subdivision"] span,
    .sb-container .sb-ctrl-btn[data-panel="subdivision"] span {
        font-size: 1.5rem !important;
        font-weight: normal !important;
        line-height: 1 !important;
    }
}

/* =============================================================================
   84. SETTINGS PANEL STYLING
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    .sb-settings-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .sb-settings-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .sb-settings-label {
        font-size: 13px; /* Base size - JS zoom overrides this */
        color: #a0aec0 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .sb-settings-volume {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .sb-settings-volume i {
        color: #a0aec0 !important;
        font-size: 14px !important;
    }
    
    .sb-settings-volume input[type="range"] {
        flex: 1 !important;
        height: 6px !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        background: #3d4a5c !important;
        border-radius: 3px !important;
        outline: none !important;
    }
    
    .sb-settings-volume input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none !important;
        appearance: none !important;
        width: 18px !important;
        height: 18px !important;
        background: #4ecdc4 !important;
        border-radius: 50% !important;
        cursor: pointer !important;
    }
    
    .sb-sound-options {
        display: flex !important;
        gap: 10px !important;
    }
    
    .sb-sound-option {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 12px 8px !important;
        background: #2d3748 !important;
        border: 2px solid #3d4a5c !important;
        border-radius: 10px !important;
        color: #a0aec0 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }
    
    .sb-sound-option i {
        font-size: 20px !important;
    }
    
    .sb-sound-option span {
        font-size: 11px !important;
    }
    
    .sb-sound-option:hover {
        border-color: #4ecdc4 !important;
        color: #4ecdc4 !important;
    }
    
    .sb-sound-option.active {
        background: rgba(78, 205, 196, 0.15) !important;
        border-color: #4ecdc4 !important;
        color: #4ecdc4 !important;
    }
}

/* =============================================================================
   85. DIAL BEAT-PULSE FLASH EFFECT
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    /* Dial pulse on beat */
    .metronome-page .sb-dial.beat-pulse,
    .sb-container .sb-dial.beat-pulse {
        box-shadow: 0 0 30px rgba(78, 205, 196, 0.6), 
                    0 0 60px rgba(78, 205, 196, 0.3) !important;
    }
    
    .metronome-page .sb-dial.beat-pulse .sb-dial-fill,
    .sb-container .sb-dial.beat-pulse .sb-dial-fill {
        filter: brightness(1.3) !important;
    }
    
    .metronome-page .sb-dial.beat-pulse .sb-dial-knob,
    .sb-container .sb-dial.beat-pulse .sb-dial-knob {
        box-shadow: 0 0 20px rgba(78, 205, 196, 1), 
                    0 0 40px rgba(78, 205, 196, 0.6) !important;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-120px) !important;
    }
}

/* Also for mobile */
@media (max-width: 480px) {
    .sb-dial.beat-pulse {
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.5), 
                    0 0 40px rgba(78, 205, 196, 0.25) !important;
    }
    
    .sb-dial.beat-pulse .sb-dial-fill {
        filter: brightness(1.3) !important;
    }
    
    .sb-dial.beat-pulse .sb-dial-knob {
        box-shadow: 0 0 15px rgba(78, 205, 196, 1) !important;
    }
}

/* =============================================================================
   86. SOUND SELECT DROPDOWN STYLING
   ============================================================================= */
@media (min-width: 481px) and (max-width: 1366px) {
    .sb-sound-select {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 15px !important;
        background: #2d3748 !important;
        border: 2px solid #3d4a5c !important;
        border-radius: 10px !important;
        color: #e2e8f0 !important;
        cursor: pointer !important;
        outline: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 12px center !important;
        padding-right: 36px !important;
    }
    
    .sb-sound-select:hover,
    .sb-sound-select:focus {
        border-color: #4ecdc4 !important;
    }
    
    .sb-sound-select option {
        background: #2d3748 !important;
        color: #e2e8f0 !important;
        padding: 10px !important;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .sb-sound-select {
        width: 100% !important;
        padding: 10px 14px !important;
        font-size: 14px !important;
        background: #2d3748 !important;
        border: 2px solid #3d4a5c !important;
        border-radius: 8px !important;
        color: #e2e8f0 !important;
        cursor: pointer !important;
        outline: none !important;
    }
}

/* =============================================================================
   87. SCREEN FLASH AND VISUAL EFFECTS FOR METRONOME
   ============================================================================= */
/* Screen flash animation */
@keyframes screenFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: var(--z-loading);

}

/* Beat counter flash */
.sb-compass-counter.flash {
    animation: counterFlash 0.15s ease-out;
}

@keyframes counterFlash {
    0% { transform: scale(1.1); background: rgba(78, 205, 196, 0.4); }
    100% { transform: scale(1); background: rgba(78, 205, 196, 0.15); }
}

/* Dynamic accent colors for beats */
.sb-beat {
    --accent-color: #4ecdc4;
}

.sb-beat.playing .sb-bar.active {
    background: var(--accent-color) !important;
    box-shadow: 0 0 8px var(--accent-color);
}

/* ============================================================================= 
   88. Metronome visual effects - accent flash and beat counter flash
   ============================================================================= */
.sb-dial.accent-flash {
    animation: accentFlash 0.15s ease-out;
}

@keyframes accentFlash {
    0% { filter: brightness(2); }
    100% { filter: brightness(1); }
}

.sb-tempo-display.beat-flash {
    animation: beatCounterFlash 0.1s ease-out;
}

@keyframes beatCounterFlash {
    0% { 
        color: #fff;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
    100% { 
        color: inherit;
        text-shadow: none;
    }
}

/* Metronome settings styles */
.metro-accent-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.accent-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.accent-marker:hover {
    background: rgba(255, 255, 255, 0.1);
}

.accent-marker.selected {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ecdc4;
}

.accent-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.accent-bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 24px;
}

.accent-bar {
    width: 6px;
    height: 8px;
    background: #4ecdc4;
    border-radius: 2px;
}

.accent-bars .accent-bar:nth-child(2) {
    height: 14px;
}

.accent-bars .accent-bar:nth-child(3) {
    height: 20px;
}

.metro-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metro-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.metro-option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.metro-option-label i {
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.color-option {

    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.volume-slider-container {
    margin-top: 15px;
}

.volume-slider-container label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-bottom: 8px;
}

.volume-slider-container input[type=range] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider-container input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4ecdc4;
    cursor: pointer;
}

.metro-sounds-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 15px;
}

.sound-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sound-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sound-item.selected {
    background: rgba(78, 205, 196, 0.15);
    border-left: 3px solid #4ecdc4;
}

.sound-item-name {
    color: rgba(255, 255, 255, 0.9);
}

.sound-item-actions {
    display: flex;
    gap: 8px;
}

.sound-item-actions button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sound-item-actions button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sound-item-actions button.delete-sound:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.import-sound-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: rgba(78, 205, 196, 0.1);
    border: 1px dashed rgba(78, 205, 196, 0.3);
    border-radius: 8px;
    color: #4ecdc4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.import-sound-btn:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ecdc4;
}

/* ============================================================================= 
   89. Enhanced visual effects - screen flash, beat counter, accent colors
   ============================================================================= */

/* Screen flash animation - more visible */
@keyframes screenFlashAnim {
    0% { opacity: 0.6; }
    100% { opacity: 0; }
}

/* Beat counter pulse animation */
@keyframes beatCounterPulse {
    0% { 
        transform: scale(0.5);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% { 
        transform: scale(1);
        opacity: 0;
    }
}

.beat-counter-overlay {
    font-family: 'Inter', -apple-system, sans-serif;
}

.beat-counter-overlay .beat-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
}

/* Dial with custom accent color */
.sb-dial {
    --accent-color: #4ecdc4;
}

.sb-dial.accent-flash {
    box-shadow: 0 0 40px var(--accent-color), 0 0 80px var(--accent-color);
}

.sb-dial.beat-pulse {
    animation: dialPulseEnhanced 0.15s ease-out;
}

@keyframes dialPulseEnhanced {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 20px var(--accent-color, #4ecdc4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 50px var(--accent-color, #4ecdc4), 0 0 80px var(--accent-color, #4ecdc4);
    }
    100% { 
        transform: scale(1);
        box-shadow: none;
    }
}

/* Enhanced accent flash effect */
@keyframes accentFlashEnhanced {
    0% { 
        filter: brightness(2);
        box-shadow: 0 0 60px var(--accent-color, #4ecdc4);
    }
    100% { 
        filter: brightness(1);
        box-shadow: none;
    }
}

/* ============================================================================= 
   90. Improved screen flash and beat counter animations
   ============================================================================= */

/* Screen flash - starts at 0.8 opacity and fades out */
@keyframes screenFlashAnim {
    0% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* Beat counter pulse - large number animation */
@keyframes beatCounterPulse {
    0% { 
        transform: scale(0.6);
        opacity: 1;
    }
    30% {
        transform: scale(1.15);
        opacity: 0.95;
    }
    100% { 
        transform: scale(1);
        opacity: 0;
    }
}

/* Beat indicators should flash on/off, not stay lit */
.sb-beat {
    transition: none !important;
}

.sb-beat.playing {
    transition: none !important;
}

/* ============================================================================= 
   91. Dynamic accent color for dial effects - overrides hardcoded colors
   ============================================================================= */
.sb-dial {
    --accent-color: #4ecdc4;
}

.sb-dial.beat-pulse {
    box-shadow: 0 0 40px var(--accent-color), 0 0 80px var(--accent-color) !important;
}

.sb-dial.beat-pulse .sb-dial-fill {
    filter: brightness(1.8) drop-shadow(0 0 25px var(--accent-color)) !important;
}

.sb-dial.beat-pulse .sb-dial-knob {
    box-shadow: 0 0 30px var(--accent-color), 0 0 60px var(--accent-color) !important;
}

.sb-dial.beat-pulse::after {
    box-shadow: inset 0 0 40px var(--accent-color) !important;
    opacity: 1;
}

/* Beat indicator dynamic colors */
.sb-beat.playing {
    background-color: var(--accent-color, #4ecdc4) !important;
    box-shadow: 0 0 25px var(--accent-color, #4ecdc4) !important;
}


/* =============================================================================
   92. MASTER: Dynamic accent color for ALL metronome effects
   ============================================================================= */

/* Base accent color variable */
.sb-dial {
    --accent-color: #4ecdc4;
}

/* Override ALL hardcoded colors in beat-pulse states */
.sb-dial.beat-pulse {
    box-shadow: 0 0 50px var(--accent-color), 0 0 100px var(--accent-color) !important;
    filter: brightness(1.2) !important;
}

.sb-dial.beat-pulse .sb-dial-fill {
    filter: brightness(2) drop-shadow(0 0 30px var(--accent-color)) !important;
    stroke: var(--accent-color) !important;
}

.sb-dial.beat-pulse .sb-dial-knob {
    box-shadow: 0 0 35px var(--accent-color), 0 0 70px var(--accent-color) !important;
    background: var(--accent-color) !important;
}

.sb-dial::after {
    box-shadow: inset 0 0 50px var(--accent-color) !important;
}

.sb-dial.beat-pulse::after {
    opacity: 1 !important;
    box-shadow: inset 0 0 60px var(--accent-color) !important;
}

/* BPM pill glow */
.bpm-pill.beat-pulse {
    box-shadow: 0 0 0 4px var(--accent-color), 0 0 25px var(--accent-color) !important;
}

/* Color picker row styling */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
}

.color-picker-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.color-preview {
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-preview:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px currentColor;
}

.color-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.color-info .color-hex {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    font-family: monospace;
}

.color-info p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Mobile responsive for dial pulse */
@media (max-width: 820px) {
    .sb-dial.beat-pulse {
        box-shadow: 0 0 30px var(--accent-color), 0 0 60px var(--accent-color) !important;
    }

    .sb-dial.beat-pulse .sb-dial-knob {
        box-shadow: 0 0 20px var(--accent-color), 0 0 40px var(--accent-color) !important;
    }

    .sb-dial.beat-pulse .sb-dial-fill {
        filter: brightness(1.8) drop-shadow(0 0 20px var(--accent-color)) !important;
    }
}


/* =============================================================================
   99. MASTER OVERRIDE: Remove ALL hardcoded teal colors from dial pulse effects
   This section MUST be at the end to override everything else
   ============================================================================= */

/* Remove the ::after pseudo-element glow or make it use CSS variable */
.sb-dial::after {
    box-shadow: none !important;
    display: none !important;
}

/* Override ALL beat-pulse styles with CSS variable */
.sb-dial.beat-pulse,
.metronome-page .sb-dial.beat-pulse,
.sb-container .sb-dial.beat-pulse {
    box-shadow: 0 0 50px var(--accent-color, #4ecdc4), 0 0 100px var(--accent-color, #4ecdc4) !important;
    filter: brightness(1.3) !important;
    animation: none !important;
    transition: box-shadow 0.15s ease-out, filter 0.15s ease-out !important;
}

.sb-dial.beat-pulse .sb-dial-fill,
.metronome-page .sb-dial.beat-pulse .sb-dial-fill,
.sb-container .sb-dial.beat-pulse .sb-dial-fill {
    filter: brightness(2) drop-shadow(0 0 30px var(--accent-color, #4ecdc4)) !important;
    stroke: var(--accent-color, #4ecdc4) !important;
    transition: filter 0.15s ease-out, stroke 0.15s ease-out !important;
}

.sb-dial.beat-pulse .sb-dial-knob,
.metronome-page .sb-dial.beat-pulse .sb-dial-knob,
.sb-container .sb-dial.beat-pulse .sb-dial-knob {
    background: var(--accent-color, #4ecdc4) !important;
    box-shadow: 0 0 35px var(--accent-color, #4ecdc4), 0 0 70px var(--accent-color, #4ecdc4) !important;
    transition: background 0.15s ease-out, box-shadow 0.15s ease-out !important;
}

/* Beat indicators sync */
.sb-beat {
    transition: background-color 0.15s ease-out, box-shadow 0.15s ease-out !important;
}

.sb-beat.playing {
    transition: none !important;
}

/* Screen flash animation - synced to 150ms */
@keyframes screenFlashAnim {
    0% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* Beat counter animation - synced to 150ms */
@keyframes beatCounterPulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* BPM pill sync */
.bpm-pill.beat-pulse {
    box-shadow: 0 0 0 4px var(--accent-color, #4ecdc4), 0 0 25px var(--accent-color, #4ecdc4) !important;
    transition: box-shadow 0.15s ease-out !important;
}

/* Mobile overrides */
@media (max-width: 820px) {
    .sb-dial.beat-pulse,
    .metronome-page .sb-dial.beat-pulse,
    .sb-container .sb-dial.beat-pulse {
        box-shadow: 0 0 30px var(--accent-color, #4ecdc4), 0 0 60px var(--accent-color, #4ecdc4) !important;
    }

    .sb-dial.beat-pulse .sb-dial-knob,
    .metronome-page .sb-dial.beat-pulse .sb-dial-knob,
    .sb-container .sb-dial.beat-pulse .sb-dial-knob {
        box-shadow: 0 0 25px var(--accent-color, #4ecdc4), 0 0 50px var(--accent-color, #4ecdc4) !important;
    }
}

/* =============================================================================
   100. Metronome Modifier Configuration Panels - Soundbrenner Style
   ============================================================================= */

.sb-modifier-config {
    padding: 16px 0;
}

.sb-config-section {
    background: transparent;
}

.sb-config-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.sb-config-tab {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sb-config-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sb-config-tab.active {
    background: #4ecdc4;
    color: #1a1a2e;
    font-weight: 600;
}

.sb-config-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    line-height: 1.5;
    margin: 16px 0;
    text-align: center;
}

/* Picker Scroll Styles */
.sb-config-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
}

.sb-picker-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    min-width: 80px;
}

.sb-picker-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sb-picker-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 120px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 40px 16px;
    min-width: 60px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sb-picker-scroll::-webkit-scrollbar {
    display: none;
}

.sb-picker-value {
    scroll-snap-align: center;
    padding: 8px 12px;
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-picker-value:hover {
    color: rgba(255, 255, 255, 0.6);
}

.sb-picker-value.selected {
    color: #fff;
    font-size: 28px;
    transform: scale(1.1);
}

.sb-picker-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-weight: 500;
}

/* Config Options (Radio Style) */
.sb-config-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.sb-config-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.sb-config-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sb-config-option.selected {
    background: rgba(78, 205, 196, 0.15);
}

.sb-config-option.selected .sb-option-radio {
    background: #4ecdc4;
    border-color: #4ecdc4;
}

.sb-config-option.selected .sb-option-radio::after {
    content: '✓';
    color: #1a1a2e;
    font-size: 12px;
    font-weight: bold;
}

.sb-option-radio {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sb-config-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.sb-config-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sb-config-btn:active {
    transform: scale(0.98);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .sb-config-tabs {
        flex-direction: column;
    }

    .sb-config-tab {
        padding: 14px 20px;
    }

    .sb-picker-scroll {
        min-width: 50px;
    }

    .sb-picker-value {
        font-size: 20px;
    }

    .sb-picker-value.selected {
        font-size: 24px;
    }
}

/* =============================================================================
   101. Fixed size for modifier config panel
   ============================================================================= */

.sb-modifier-config {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.sb-config-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

/* REMOVED - sb-panel moved to metronome-panel.css */

/* When modifier is active, panel has fixed content area */
.sb-panel .sb-modifier-config {
    min-height: 280px;
}

.sb-config-tabs {
    flex-shrink: 0;
}

.sb-config-desc {
    flex-shrink: 0;
}

.sb-config-options,
.sb-config-picker {
    flex-shrink: 0;
}

/* Placeholder space when no options shown */
.sb-config-section::after {
    content: '';
    flex: 1;
    min-height: 100px;
}

/* =============================================================================
   102. FORCE fixed size for modifier panel - overrides all
   ============================================================================= */

/* REMOVED - sb-panel moved to metronome-panel.css */

.sb-modifier-config {
    height: 320px !important;
    min-height: 320px !important;
    max-height: 320px !important;
    overflow-y: auto !important;
}

.sb-config-section {
    height: 100% !important;
    min-height: 300px !important;
}

/* Ensure panel list also has fixed height */
.sb-panel .sb-panel-list {
    max-height: 200px;
    overflow-y: auto;
}

/* =============================================================================
   103. MODIFIER CONFIG BOX - Wider and no scroll
   ============================================================================= */

.sb-modifier-config {
    width: 100% !important;
    min-width: 320px !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.sb-config-section {
    width: 100% !important;
}

.sb-config-tabs {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
}

.sb-config-tab {
    flex: 1 !important;
    white-space: nowrap !important;
}

.sb-config-picker {
    width: 100% !important;
}

.sb-picker-group {
    min-width: 80px !important;
}
/* =============================================================================
   METRONOME RESPONSIVE ADAPTATIONS - PC & MOBILE
   Based on iPad tablet design (481px-1024px)

   Target breakpoints:
   - PC/Desktop: > 1024px
   - Tablet (iPad): 481px - 1024px (already done)
   - Mobile: <= 480px
   ============================================================================= */

/* =============================================================================
   A. PC/DESKTOP VIEW (> 1024px) - Larger, more spacious layout
   ============================================================================= */
@media (min-width: 1025px) {
    /* Main container - centered with more padding */
    .sb-container {
        min-height: auto;
        padding: 32px;
        background: #1a1d2e;
        border-radius: 28px;
        max-width: 400px;

        height: 56px;
        border-radius: 14px;
        background: #2d3748;
        padding: 10px;
    }

    .sb-beat-bars {
        width: 100%;
        gap: 5px;
    }

    .sb-bar {
        height: 12px;
        background: #3d4a5c;
        border-radius: 4px;
    }

    .sb-bar.active {
        background: var(--accent-color, #4ecdc4);
    }

    /* Tempo section */
    .sb-tempo-section {
        text-align: center;
        margin-bottom: 24px;
    }

    .sb-tempo-name {
        font-size: 16px;
        color: #718096;
        margin-bottom: 6px;
    }

    .sb-tempo-display {
        justify-content: center;
    }

    .sb-tempo-input {
        font-size: 72px;
        width: 160px;
        color: white;
        background: transparent;
    }

    .sb-tempo-unit {
        font-size: 18px;
        color: #718096;
        margin-left: -10px;
    }

    /* Dial container */
    .sb-dial-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 32px;
        margin-bottom: 28px;
    }

    .sb-dial {
        width: 220px;
        height: 220px;
    }

    .sb-dial-btn {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: #2d3748;
        border: 2px solid #3d4a5c;
        color: #a0aec0;
        font-size: 24px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .sb-dial-btn:hover {
        background: #3d4a5c;
        color: var(--accent-color, #4ecdc4);
        transform: scale(1.05);
    }

    .sb-dial-center {
        width: 60px;
        height: 60px;
        background: #2d3748;
    }

    .sb-dial-knob {
        width: 18px;
        height: 18px;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-95px);
    }

    /* Control buttons row */
    .sb-controls-row {
        display: flex;
        gap: 16px;
        margin-bottom: 28px;
        justify-content: center;
    }

    .sb-ctrl-btn {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        background: #2d3748;
        border: none;
        color: #a0aec0;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }

    .sb-ctrl-btn:hover {
        background: #3d4a5c;
        color: var(--accent-color, #4ecdc4);
        transform: translateY(-2px);
    }

    .sb-ctrl-btn.active {
        background: var(--accent-color, #4ecdc4);
        color: #1a1d2e;
    }

    /* Bottom row */
    .sb-bottom-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        width: 100%;
        padding: 0 20px;
        margin-top: auto;
    }

    .sb-play-btn {
        width: 80px;
        height: 80px;
        border-radius: 22px;
        background: var(--accent-color, #4ecdc4);
        border: none;
        color: #1a1d2e;
        font-size: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }

    .sb-play-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 30px rgba(78, 205, 196, 0.4);
    }

    .sb-play-btn.playing {
        background: #ff6b6b;
    }

    .sb-tap-btn {
        width: 72px;
        height: 72px;
        border-radius: 18px;
        background: #2d3748;
        border: none;
        color: #a0aec0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        gap: 6px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .sb-tap-btn i {
        font-size: 24px;
    }

    .sb-tap-btn:hover {
        background: #3d4a5c;
        color: var(--accent-color, #4ecdc4);
        transform: translateY(-2px);
    }

    /* Volume - visible on desktop */
    .sb-volume {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 20px;
        padding: 12px 20px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
    }

    .sb-volume i {
        color: #718096;
        font-size: 18px;
    }

    .sb-volume input[type="range"] {
        flex: 1;
        height: 6px;
        background: #1a1d2e;
        border-radius: 3px;
        -webkit-appearance: none;
    }

    .sb-volume input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        background: var(--accent-color, #4ecdc4);
        border-radius: 50%;
        cursor: pointer;

    }

    /* Panel styling for desktop */
/* REMOVED - sb-panel moved to metronome-panel.css */

    .sb-panel-title {
        color: #a0aec0;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid #3d4a5c;
    }

    .sb-panel-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .sb-panel-option {
        padding: 14px 18px;
        background: #1a1d2e;
        border: none;
        border-radius: 10px;
        color: #a0aec0;
        font-size: 18px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .sb-panel-option:hover {
        background: #3d4a5c;
        transform: translateY(-1px);
    }

    .sb-panel-option.active {
        background: var(--accent-color, #4ecdc4);
        color: #1a1d2e;
    }

    /* Modifier config for desktop */
    .sb-modifier-config {
        width: 100%;
        min-width: 340px;
        padding: 24px;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .sb-config-tabs {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .sb-config-tab {
        flex: 1;
        min-width: 80px;
        padding: 14px 18px;
        font-size: 15px;
    }

    .sb-config-desc {
        font-size: 14px;
        margin: 20px 0;
    }

    .sb-config-picker {
        padding: 20px;
        margin: 24px 0;
    }

    .sb-picker-value {
        font-size: 28px;
        padding: 10px 16px;
    }

    .sb-picker-value.selected {
        font-size: 32px;
    }

    .sb-config-option {
        padding: 18px;
        font-size: 15px;
    }

    .sb-option-radio {
        width: 28px;
        height: 28px;
    }

    .sb-config-btn {
        padding: 16px;
        font-size: 15px;
    }

}

/* =============================================================================
   B. MOBILE VIEW (<= 480px) - Compact, touch-optimized layout
   ============================================================================= */
@media (max-width: 480px) {
    /* Main container - full width, compact */
    .sb-container {
        min-height: auto;
        padding: 16px;
        background: #1a1d2e;
        border-radius: 20px;
        max-width: 100%;
        width: calc(100% - 16px);
        margin: 0 auto;
        position: relative;
    }

    /* Beat indicators - smaller for mobile */
    .sb-beats {
        display: flex;
        gap: 10px;
        margin-bottom: 16px;
        padding: 0;
        background: transparent;
        justify-content: center;
    }

    .sb-beat {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: #2d3748;
        padding: 6px;
    }

    .sb-beat-bars {
        width: 100%;
        gap: 3px;
    }

    .sb-bar {
        height: 6px;
        background: #3d4a5c;
        border-radius: 3px;
    }

    .sb-bar.active {
        background: var(--accent-color, #4ecdc4);
    }

    /* Hide timer display on mobile */
    .sb-timer-display {
        display: none;
    }

    /* Tempo section */
    .sb-tempo-section {
        text-align: center;
        margin-bottom: 12px;
    }

    .sb-tempo-name {
        font-size: 12px;
        color: #718096;
        margin-bottom: 2px;
    }

    .sb-tempo-display {
        justify-content: center;
    }

    .sb-tempo-input {
        font-size: 52px;
        width: 110px;
        color: white;
        background: transparent;
    }

    .sb-tempo-unit {
        font-size: 14px;
        color: #718096;
        margin-left: -6px;
    }

    /* Dial container */
    .sb-dial-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        margin-bottom: 16px;
    }

    .sb-dial {
        width: 140px;
        height: 140px;
    }

    .sb-dial-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #2d3748;
        border: 2px solid #3d4a5c;
        color: #a0aec0;
        font-size: 18px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .sb-dial-btn:active {
        background: #3d4a5c;
        color: var(--accent-color, #4ecdc4);
    }

    .sb-dial-center {
        width: 40px;
        height: 40px;
        background: #2d3748;
    }

    .sb-dial-knob {
        width: 12px;
        height: 12px;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-55px);
    }

    /* Control buttons row - smaller for mobile */
    .sb-controls-row {
        display: flex;
        gap: 8px;
        margin-bottom: 16px;
        justify-content: center;
    }

    .sb-ctrl-btn {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        background: #2d3748;
        border: none;
        color: #a0aec0;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.15s;
        /* Touch-friendly minimum */
        min-width: 44px;
        min-height: 44px;
    }

    .sb-ctrl-btn:active {
        background: #3d4a5c;
        transform: scale(0.95);
    }

    .sb-ctrl-btn.active {
        background: var(--accent-color, #4ecdc4);
        color: #1a1d2e;
    }

    /* Bottom row - play and tap buttons */
    .sb-bottom-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 8px;
        margin-top: auto;
    }

    .sb-play-btn {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        background: var(--accent-color, #4ecdc4);
        border: none;
        color: #1a1d2e;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.15s;
    }

    .sb-play-btn:active {
        transform: scale(0.95);
    }

    .sb-play-btn.playing {
        background: #ff6b6b;
    }

    .sb-tap-btn {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        background: #2d3748;
        border: none;
        color: #a0aec0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        gap: 2px;
        cursor: pointer;
        transition: all 0.15s;
    }

    .sb-tap-btn i {
        font-size: 18px;
    }

    .sb-tap-btn:active {
        background: #3d4a5c;
        transform: scale(0.95);
    }

    /* Volume - hidden on mobile (in settings) */
    .sb-volume {
        display: none;
    }

    /* Panel styling for mobile - full width modal */
/* REMOVED - sb-panel moved to metronome-panel.css */

    .sb-panel-title {
        color: #a0aec0;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 14px;
        padding-bottom: 8px;
        border-bottom: 1px solid #3d4a5c;
        text-align: center;
    }

    .sb-panel-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .sb-panel-option {
        padding: 12px 8px;
        background: #1a1d2e;
        border: none;
        border-radius: 8px;
        color: #a0aec0;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s;
        min-height: 44px;
    }

    .sb-panel-option:active {
        background: #3d4a5c;
        transform: scale(0.95);
    }

    .sb-panel-option.active {
        background: var(--accent-color, #4ecdc4);
        color: #1a1d2e;
    }

    /* Modifier config for mobile */
    .sb-modifier-config {
        width: 100%;
        min-width: auto;
        padding: 16px;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .sb-config-tabs {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
    }

    .sb-config-tab {
        flex: 1;
        min-width: calc(50% - 4px);
        padding: 12px 10px;
        font-size: 13px;
        border-radius: 20px;
    }

    .sb-config-desc {
        font-size: 12px;
        margin: 12px 0;
        line-height: 1.4;
    }

    .sb-config-picker {
        padding: 14px;
        margin: 16px 0;
        flex-direction: column;
        gap: 10px;
    }

    .sb-picker-title {
        text-align: center;
        min-width: auto;
    }

    .sb-picker-group {
        justify-content: center;
    }

    .sb-picker-scroll {
        height: 100px;
        min-width: 50px;
        padding: 30px 12px;
    }

    .sb-picker-value {
        font-size: 20px;
        padding: 6px 10px;
        min-height: 36px;
    }

    .sb-picker-value.selected {
        font-size: 24px;
    }

    .sb-config-options {
        gap: 10px;
    }

    .sb-config-option {
        padding: 14px;
        font-size: 13px;
        min-height: 44px;
    }

    .sb-option-radio {
        width: 22px;
        height: 22px;
    }

    .sb-config-btn {
        padding: 14px;
        font-size: 14px;
        min-height: 44px;
    }

    /* Drag handle for bottom sheet */
    .sb-panel::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #4a5568;
        border-radius: 2px;
        margin: 0 auto 16px;
    }
}

/* =============================================================================
   C. SHARED IMPROVEMENTS - Apply to all breakpoints
   ============================================================================= */

/* Smooth transitions for interactive elements */
.sb-ctrl-btn,
.sb-dial-btn,
.sb-play-btn,
.sb-tap-btn,
.sb-panel-option,
.sb-config-tab,
.sb-config-option,
.sb-config-btn {
    transition: all 0.2s ease;
}

/* Focus states for accessibility */
.sb-ctrl-btn:focus,
.sb-dial-btn:focus,
.sb-play-btn:focus,
.sb-tap-btn:focus,
.sb-panel-option:focus,
.sb-config-tab:focus,
.sb-config-option:focus,
.sb-config-btn:focus {
    outline: 2px solid var(--accent-color, #4ecdc4);
    outline-offset: 2px;
}

/* Prevent text selection on buttons */
.sb-ctrl-btn,
.sb-dial-btn,
.sb-play-btn,
.sb-tap-btn,
.sb-panel-option,
.sb-config-tab {
    user-select: none;
    -webkit-user-select: none;
}

/* Panel overlay for mobile */
@media (max-width: 480px) {
    .sb-panel-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: var(--z-overlay);
    }
}

/* Beat pulse effect - consistent across all breakpoints */
.sb-beat.playing {
    background: var(--accent-color, #4ecdc4);
    box-shadow: 0 0 20px var(--accent-color, #4ecdc4);
}

/* Knob position fix for different dial sizes */
@media (min-width: 1025px) {
    .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-95px) !important;
    }

    .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-95px) scale(1.1) !important;
    }
}

@media (max-width: 480px) {
    .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-55px) !important;
    }

    .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-55px) scale(1.1) !important;
    }
}

/* =============================================================================
   D. REMOVE FORCED HEIGHTS - Let content flow naturally
   ============================================================================= */

/* Override the forced heights from section 101/102 for PC and mobile */
@media (min-width: 1025px), (max-width: 480px) {
/* REMOVED - sb-panel moved to metronome-panel.css */

    .sb-modifier-config {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }

    .sb-config-section {
        height: auto !important;
        min-height: auto !important;
    }

    .sb-config-section::after {
        display: none;
    }
}
/* =============================================================================
   FIX: METRONOME PC VIEW - No container, full screen distribution
   Replaces the previous PC styles for a cleaner, integrated look
   ============================================================================= */

@media (min-width: 1025px) {
    /* Remove container box - integrate with page background */
    .sb-container {
        background: transparent !important;
        border-radius: 0 !important;
        max-width: none !important;
        width: 100% !important;
        padding: 40px 60px !important;
        margin: 0 !important;
        min-height: calc(100vh - 120px) !important;
        min-height: calc(100dvh - 120px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 24px !important;
    }

    /* Timer display - top center */
    .sb-timer-display {
        font-size: 18px !important;
        color: var(--text-muted, #718096) !important;
        margin-bottom: 0 !important;
    }

    /* Beat indicators - larger and spaced for desktop */
    .sb-beats {
        display: flex !important;
        gap: 24px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        justify-content: center !important;
    }

    .sb-beat {
        width: 64px !important;
        height: 64px !important;
        border-radius: 16px !important;
        background: var(--bg-card, #2d3748) !important;
        padding: 12px !important;
        transition: all 0.15s ease-out !important;
    }

    .sb-beat.playing {
        background: var(--accent-color, #4ecdc4) !important;
        box-shadow: 0 0 30px var(--accent-color, #4ecdc4) !important;
    }

    .sb-beat-bars {
        width: 100% !important;
        gap: 6px !important;
    }

    .sb-bar {
        height: 10px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 5px !important;
    }

    .sb-bar.active {
        background: var(--accent-color, #4ecdc4) !important;
    }

    /* Modifier status */
    .sb-modifier-status {
        margin: 0 !important;
    }

    /* Control buttons row - centered with good spacing */
    .sb-controls-row {
        display: flex !important;
        gap: 20px !important;
        margin: 0 !important;
        justify-content: center !important;
    }

    .sb-ctrl-btn {
        width: 72px !important;
        height: 72px !important;
        border-radius: 20px !important;
        background: var(--bg-card, #2d3748) !important;
        border: none !important;
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 22px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-ctrl-btn:hover {
        background: var(--bg-hover, #3d4a5c) !important;
        color: var(--accent-color, #4ecdc4) !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
    }

    .sb-ctrl-btn.active {
        background: var(--accent-color, #4ecdc4) !important;
        color: var(--bg-primary, #1a1d2e) !important;
    }

    /* Tempo section - large and prominent */
    .sb-tempo-section {
        text-align: center !important;
        margin: 0 !important;
    }

    .sb-tempo-name {
        font-size: 18px !important;
        color: var(--text-muted, #718096) !important;
        margin-bottom: 8px !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important;
    }

    .sb-tempo-display {
        justify-content: center !important;
    }

    .sb-tempo-input {
        font-size: 96px !important;
        font-weight: 200 !important;
        width: 220px !important;
        color: var(--text-primary, white) !important;
        background: transparent !important;
        border: none !important;
        text-align: center !important;
    }

    .sb-tempo-input:focus {
        outline: none !important;
        border-bottom: 3px solid var(--accent-color, #4ecdc4) !important;
    }

    .sb-tempo-unit {
        font-size: 24px !important;
        color: var(--text-muted, #718096) !important;
        margin-left: -16px !important;
        align-self: flex-end !important;
        padding-bottom: 20px !important;
    }

    /* Dial container - larger for desktop */
    .sb-dial-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 40px !important;
        margin: 0 !important;
    }

    .sb-dial {
        width: 260px !important;
        height: 260px !important;
    }

    .sb-dial-track {
        stroke-width: 10 !important;
    }

    .sb-dial-fill {
        stroke-width: 10 !important;
    }

    .sb-dial-btn {
        width: 64px !important;
        height: 64px !important;
        border-radius: 50% !important;
        background: var(--bg-card, #2d3748) !important;
        border: 2px solid var(--border-color, #3d4a5c) !important;
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 28px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-dial-btn:hover {
        background: var(--bg-hover, #3d4a5c) !important;
        color: var(--accent-color, #4ecdc4) !important;
        transform: scale(1.1) !important;
    }

    .sb-dial-center {
        width: 70px !important;
        height: 70px !important;
        background: var(--bg-card, #2d3748) !important;
        font-size: 24px !important;
    }

    .sb-dial-knob {
        width: 22px !important;
        height: 22px !important;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-115px) !important;
    }

    .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-115px) scale(1.15) !important;
    }

    /* Bottom row - play and tap buttons */
    .sb-bottom-row {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 40px !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .sb-play-btn {
        width: 100px !important;
        height: 100px !important;
        border-radius: 28px !important;
        background: var(--accent-color, #4ecdc4) !important;
        border: none !important;
        color: var(--bg-primary, #1a1d2e) !important;
        font-size: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-play-btn:hover {
        transform: scale(1.05) !important;
        box-shadow: 0 12px 40px rgba(78, 205, 196, 0.5) !important;
    }

    .sb-play-btn.playing {
        background: #ff6b6b !important;
    }

    .sb-play-btn.playing:hover {
        box-shadow: 0 12px 40px rgba(255, 107, 107, 0.5) !important;
    }

    .sb-tap-btn {
        width: 80px !important;
        height: 80px !important;
        border-radius: 22px !important;
        background: var(--bg-card, #2d3748) !important;
        border: none !important;
        color: var(--text-secondary, #a0aec0) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
        gap: 6px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-tap-btn i {
        font-size: 28px !important;
    }

    .sb-tap-btn:hover {
        background: var(--bg-hover, #3d4a5c) !important;
        color: var(--accent-color, #4ecdc4) !important;
        transform: translateY(-3px) !important;
    }

    /* Volume bar - horizontal at bottom */
    .sb-volume {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 400px !important;
        padding: 16px 24px !important;
        background: var(--bg-card, #2d3748) !important;
        border-radius: 16px !important;
        margin: 0 !important;
    }

    .sb-vol-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        background: transparent !important;
        border: none !important;
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 20px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-vol-btn:hover {
        color: var(--accent-color, #4ecdc4) !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .sb-vol-bar-container {
        flex: 1 !important;
        height: 8px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 4px !important;
        overflow: hidden !important;
    }

    .sb-vol-bar {
        height: 100% !important;
        background: var(--accent-color, #4ecdc4) !important;
        border-radius: 4px !important;
        transition: width 0.15s ease !important;
    }

    /* Panel styling for desktop - centered overlay */
/* REMOVED - sb-panel moved to metronome-panel.css */

    .sb-panel-title {
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 14px !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important;
        margin-bottom: 24px !important;
        padding-bottom: 16px !important;
        border-bottom: 1px solid var(--border-color, #3d4a5c) !important;
    }

    .sb-panel-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
    }

    .sb-panel-option {
        padding: 16px 20px !important;
        background: var(--bg-primary, #1a1d2e) !important;
        border: none !important;
        border-radius: 12px !important;
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 20px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-panel-option:hover {
        background: var(--bg-hover, #3d4a5c) !important;
        transform: translateY(-2px) !important;
    }

    .sb-panel-option.active {
        background: var(--accent-color, #4ecdc4) !important;
        color: var(--bg-primary, #1a1d2e) !important;
    }

    /* Modifier config for desktop */
    .sb-modifier-config {
        width: 100% !important;
        min-width: auto !important;
        padding: 0 !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .sb-config-tabs {
        display: flex !important;
        gap: 12px !important;
        margin-bottom: 24px !important;
    }

    .sb-config-tab {
        flex: 1 !important;
        padding: 16px 20px !important;
        font-size: 15px !important;
        border-radius: 25px !important;
    }

    .sb-config-desc {
        font-size: 14px !important;
        margin: 20px 0 !important;
        color: rgba(255, 255, 255, 0.5) !important;
    }

    .sb-config-picker {
        padding: 24px !important;
        margin: 24px 0 !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border-radius: 16px !important;
    }

    .sb-config-options {
        gap: 12px !important;
    }

    .sb-config-option {
        padding: 18px !important;
        font-size: 15px !important;
        border-radius: 14px !important;
    }

    .sb-config-btn {
        padding: 18px !important;
        font-size: 16px !important;
        border-radius: 30px !important;
        margin-top: 16px !important;
    }

    /* Panel overlay/backdrop */
    .sb-panel::before {
        display: none !important;
    }
}

/* Backdrop for panel on PC */
@media (min-width: 1025px) {
    .sb-container.panel-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
}
/* =============================================================================
   FIX: METRONOME PC VIEW v2 - Correcciones según feedback
   - BPM debajo de los números
   - Play/Tap en extremos izquierdo/derecho
   - Sin barra de volumen
   - Texto BPM y tipo más pequeños
   - Beats más grandes
   ============================================================================= */

@media (min-width: 1025px) {
    /* Container - full screen, no background */
    .sb-container {
        background: transparent !important;
        border-radius: 0 !important;
        max-width: none !important;
        width: 100% !important;
        padding: 40px 80px !important;
        margin: 0 !important;
        min-height: calc(100vh - 120px) !important;
        min-height: calc(100dvh - 120px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 32px !important;
    }

    /* Timer display - smaller */
    .sb-timer-display {
        font-size: 14px !important;
        color: var(--text-muted, #718096) !important;
        position: absolute !important;
        top: 20px !important;
        right: 40px !important;
    }

    /* Beat indicators - LARGER */
    .sb-beats {
        display: flex !important;
        gap: 28px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        justify-content: center !important;
    }

    .sb-beat {
        width: 80px !important;
        height: 80px !important;
        border-radius: 20px !important;
        background: var(--bg-card, #2d3748) !important;
        padding: 14px !important;
        transition: all 0.15s ease-out !important;
    }

    .sb-beat.playing {
        background: var(--accent-color, #4ecdc4) !important;
        box-shadow: 0 0 40px var(--accent-color, #4ecdc4) !important;
    }

    .sb-beat-bars {
        width: 100% !important;
        gap: 8px !important;
    }

    .sb-bar {
        height: 14px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 6px !important;
    }

    .sb-bar.active {
        background: var(--accent-color, #4ecdc4) !important;
    }

    /* Modifier status - smaller */
    .sb-modifier-status {
        margin: 0 !important;
        font-size: 12px !important;
    }

    /* Control buttons row */
    .sb-controls-row {
        display: flex !important;
        gap: 20px !important;
        margin: 0 !important;
        justify-content: center !important;
    }

    .sb-ctrl-btn {
        width: 64px !important;
        height: 64px !important;
        border-radius: 18px !important;
        background: var(--bg-card, #2d3748) !important;
        border: none !important;
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-ctrl-btn:hover {
        background: var(--bg-hover, #3d4a5c) !important;
        color: var(--accent-color, #4ecdc4) !important;
        transform: translateY(-2px) !important;
    }

    .sb-ctrl-btn.active {
        background: var(--accent-color, #4ecdc4) !important;
        color: var(--bg-primary, #1a1d2e) !important;
    }

    /* Tempo section - BPM BELOW numbers */
    .sb-tempo-section {
        text-align: center !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Tempo name (Allegro, etc) - SMALLER */
    .sb-tempo-name {
        font-size: 12px !important;
        color: var(--text-muted, #718096) !important;
        margin-bottom: 4px !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        order: 1 !important;
    }

    .sb-tempo-display {
        justify-content: center !important;
        align-items: flex-end !important;
        order: 2 !important;
        flex-direction: column !important;
    }

    .sb-tempo-input {
        font-size: 96px !important;
        font-weight: 200 !important;
        width: 220px !important;
        color: var(--text-primary, white) !important;
        background: transparent !important;
        border: none !important;
        text-align: center !important;
        line-height: 1 !important;
    }

    .sb-tempo-input:focus {
        outline: none !important;
        border-bottom: 2px solid var(--accent-color, #4ecdc4) !important;
    }

    /* BPM unit - BELOW the number, SMALLER */
    .sb-tempo-unit {
        font-size: 14px !important;
        color: var(--text-muted, #718096) !important;
        margin-left: 0 !important;
        margin-top: 4px !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important;
    }

    /* Dial container */
    .sb-dial-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 40px !important;
        margin: 0 !important;
    }

    .sb-dial {
        width: 240px !important;
        height: 240px !important;
    }

    .sb-dial-btn {
        width: 56px !important;
        height: 56px !important;
        border-radius: 50% !important;
        background: var(--bg-card, #2d3748) !important;
        border: 2px solid var(--border-color, #3d4a5c) !important;
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 24px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-dial-btn:hover {
        background: var(--bg-hover, #3d4a5c) !important;
        color: var(--accent-color, #4ecdc4) !important;
        transform: scale(1.1) !important;
    }

    .sb-dial-center {
        width: 60px !important;
        height: 60px !important;
        background: var(--bg-card, #2d3748) !important;
        font-size: 20px !important;
    }

    .sb-dial-knob {
        width: 20px !important;
        height: 20px !important;
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-105px) !important;
    }

    .sb-dial.beat-pulse .sb-dial-knob {
        transform: rotate(calc(var(--progress, 0) * 360deg - 90deg)) translateY(-105px) scale(1.15) !important;
    }

    /* Bottom row - PLAY LEFT, TAP RIGHT at extremes */
    .sb-bottom-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 800px !important;
        padding: 0 40px !important;
        margin: 0 !important;
        position: relative !important;
    }

    .sb-play-btn {
        width: 88px !important;
        height: 88px !important;
        border-radius: 24px !important;
        background: var(--accent-color, #4ecdc4) !important;
        border: none !important;
        color: var(--bg-primary, #1a1d2e) !important;
        font-size: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-play-btn:hover {
        transform: scale(1.05) !important;
        box-shadow: 0 10px 35px rgba(78, 205, 196, 0.5) !important;
    }

    .sb-play-btn.playing {
        background: #ff6b6b !important;
    }

    .sb-play-btn.playing:hover {
        box-shadow: 0 10px 35px rgba(255, 107, 107, 0.5) !important;
    }

    .sb-tap-btn {
        width: 72px !important;
        height: 72px !important;
        border-radius: 20px !important;
        background: var(--bg-card, #2d3748) !important;
        border: none !important;
        color: var(--text-secondary, #a0aec0) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 12px !important;
        gap: 4px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-tap-btn i {
        font-size: 24px !important;
    }

    .sb-tap-btn:hover {
        background: var(--bg-hover, #3d4a5c) !important;
        color: var(--accent-color, #4ecdc4) !important;
        transform: translateY(-2px) !important;
    }

    /* HIDE volume bar on PC */
    .sb-volume {
        display: none !important;
    }

    /* Panel styling */
/* REMOVED - sb-panel moved to metronome-panel.css */

    .sb-panel-title {
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important;
        margin-bottom: 20px !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid var(--border-color, #3d4a5c) !important;
    }

    .sb-panel-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
    }

    .sb-panel-option {
        padding: 14px 16px !important;
        background: var(--bg-primary, #1a1d2e) !important;
        border: none !important;
        border-radius: 10px !important;
        color: var(--text-secondary, #a0aec0) !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sb-panel-option:hover {
        background: var(--bg-hover, #3d4a5c) !important;
    }

    .sb-panel-option.active {
        background: var(--accent-color, #4ecdc4) !important;
        color: var(--bg-primary, #1a1d2e) !important;
    }

    /* Modifier config */
    .sb-modifier-config {
        width: 100% !important;
        min-width: auto !important;
        padding: 0 !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .sb-config-tabs {
        display: flex !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .sb-config-tab {
        flex: 1 !important;
        padding: 14px 16px !important;
        font-size: 14px !important;
        border-radius: 25px !important;
    }

    .sb-config-desc {
        font-size: 13px; /* Base size - JS zoom overrides this */
        margin: 16px 0 !important;
        color: rgba(255, 255, 255, 0.5) !important;
    }


    .sb-config-picker {
        padding: 20px !important;
        margin: 20px 0 !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border-radius: 14px !important;
    }

    .sb-config-options {
        gap: 10px !important;
    }

    .sb-config-option {
        padding: 16px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
    }

    .sb-config-btn {
        padding: 16px !important;
        font-size: 15px !important;
        border-radius: 25px !important;
        margin-top: 12px !important;
    }

    /* Hide drag handle on PC panels */
    .sb-panel::before {
        display: none !important;
    }
}
/* =============================================================================
   FIX: Tempo section más pequeño y BPM centrado - PC
   ============================================================================= */

@media (min-width: 1025px) {
    /* Tempo section - más compacto */
    .sb-tempo-section {
        text-align: center !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0 !important;
    }

    /* Tempo name (Allegro, Andante, etc) - más pequeño */
    .sb-tempo-name {
        font-size: 11px !important;
        color: var(--text-muted, #718096) !important;
        margin-bottom: 2px !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }

    .sb-tempo-display {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Número de BPM - más pequeño */
    .sb-tempo-input {
        font-size: 72px !important;
        font-weight: 200 !important;
        width: 160px !important;
        color: var(--text-primary, white) !important;
        background: transparent !important;
        border: none !important;
        text-align: center !important;
        line-height: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .sb-tempo-input:focus {
        outline: none !important;
        border-bottom: 2px solid var(--accent-color, #4ecdc4) !important;
    }

    /* BPM label - centrado debajo del número */
    .sb-tempo-unit {
        font-size: 12px !important;
        color: var(--text-muted, #718096) !important;
        margin: 4px 0 0 0 !important;
        text-transform: uppercase !important;
        letter-spacing: 3px !important;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }
}
/* =============================================================================
   FIX: Tempo section v2 - transparente, más pequeño, sin margin bottom
   ============================================================================= */

@media (min-width: 1025px) {
    /* Tempo section - compacto y pegado al dial */
    .sb-tempo-section {
        text-align: center !important;
        margin: 0 0 -8px 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0 !important;
        background: transparent !important;
    }

    /* Tempo name (Allegro, Andante, etc) - más pequeño */
    .sb-tempo-name {
        font-size: 10px !important;
        color: var(--text-muted, #718096) !important;
        margin: 0 !important;
        padding: 0 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        background: transparent !important;
    }

    .sb-tempo-display {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Número de BPM - más pequeño, fondo transparente */
    .sb-tempo-input {
        font-size: 56px !important;
        font-weight: 200 !important;
        width: 130px !important;
        color: var(--text-primary, white) !important;
        background: transparent !important;
        border: none !important;
        text-align: center !important;
        line-height: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
        -webkit-appearance: none !important;
        -moz-appearance: textfield !important;
    }

    .sb-tempo-input::-webkit-outer-spin-button,
    .sb-tempo-input::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
        margin: 0 !important;
    }

    .sb-tempo-input:focus {
        outline: none !important;
        background: transparent !important;
    }

    /* BPM label - centrado, más pequeño */
    .sb-tempo-unit {
        font-size: 10px !important;
        color: var(--text-muted, #718096) !important;
        margin: 0 !important;
        padding: 0 !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        background: transparent !important;
    }
}
/* =============================================================================
   FIX: Beat Flash Effect - Destello rápido en lugar de luz fija
   Aplica a PC, Tablet y Móvil
   ============================================================================= */

/* Animación de destello rápido */
@keyframes beatFlash {
    0% {
        background: var(--accent-color, #4ecdc4);
        box-shadow: 0 0 40px var(--accent-color, #4ecdc4), 0 0 80px var(--accent-color, #4ecdc4);
        transform: scale(1.05);
    }
    100% {
        background: var(--bg-card, #2d3748);
        box-shadow: none;
        transform: scale(1);
    }
}

@keyframes barFlash {
    0% {
        background: var(--accent-color, #4ecdc4);
        box-shadow: 0 0 10px var(--accent-color, #4ecdc4);
    }
    100% {
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }
}

/* ============================================
   TODOS LOS BREAKPOINTS - Beat flash effect
   ============================================ */

/* Base beat - estado normal */
.sb-beat {
    background: var(--bg-card, #2d3748) !important;
    box-shadow: none !important;
    transform: scale(1) !important;
    transition: none !important;
}

/* Beat playing - destello rápido */
.sb-beat.playing {
    animation: beatFlash 0.15s ease-out forwards !important;
}

/* Bars dentro del beat */
.sb-bar {
    background: rgba(255, 255, 255, 0.1) !important;
    transition: none !important;
}

.sb-bar.active {
    animation: barFlash 0.15s ease-out forwards !important;
}

/* ============================================
   PC (>1025px) - Bars más anchos
   ============================================ */
@media (min-width: 1025px) {
    .sb-beat {
        width: 80px !important;
        height: 80px !important;
        padding: 12px !important;
    }

    .sb-beat-bars {
        width: 100% !important;
        gap: 6px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sb-bar {
        height: 16px !important;
        border-radius: 8px !important;
        width: 100% !important;
    }
}

/* ============================================
   TABLET (481px - 1024px) - Bars más anchos
   ============================================ */
@media (min-width: 481px) and (max-width: 1024px) {
    .sb-beat {
        width: 64px !important;
        height: 64px !important;
        padding: 10px !important;
    }

    .sb-beat-bars {
        width: 100% !important;
        gap: 5px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sb-bar {
        height: 14px !important;
        border-radius: 7px !important;
        width: 100% !important;
    }
}

/* ============================================
   MÓVIL (<=480px) - Bars más anchos
   ============================================ */
@media (max-width: 480px) {
    .sb-beat {
        width: 48px !important;
        height: 48px !important;
        padding: 8px !important;
    }

    .sb-beat-bars {
        width: 100% !important;
        gap: 4px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sb-bar {
        height: 10px !important;
        border-radius: 5px !important;
        width: 100% !important;
    }
}
/* =============================================================================
   FIX: Bars más anchos - TODOS los breakpoints
   ============================================================================= */

/* PC (>1025px) */
@media (min-width: 1025px) {
    .sb-beat-bars {
        width: 100% !important;
        gap: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 4px !important;
    }

    .sb-bar {
        height: 18px !important;
        border-radius: 9px !important;
        width: 100% !important;
        min-width: 50px !important;
    }
}

/* TABLET (481px - 1024px) */
@media (min-width: 481px) and (max-width: 1024px) {
    .sb-beat-bars {
        width: 100% !important;
        gap: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 3px !important;
    }

    .sb-bar {
        height: 16px !important;
        border-radius: 8px !important;
        width: 100% !important;
        min-width: 40px !important;
    }
}

/* MÓVIL (<=480px) */
@media (max-width: 480px) {
    .sb-beat-bars {
        width: 100% !important;
        gap: 5px !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 2px !important;
    }

    .sb-bar {
        height: 12px !important;
        border-radius: 6px !important;
        width: 100% !important;
        min-width: 30px !important;
    }
}
/* =============================================================================
   FIX: Beat Smooth Flash - Igual que el dial
   Transición suave de 0.15s ease-out al encender y apagar
   ============================================================================= */

/* Estado base del beat - con transición para fade out suave */
.sb-beat {
    background: var(--bg-card, #2d3748) !important;
    box-shadow: none !important;
    transform: scale(1) !important;
    transition: background 0.15s ease-out, box-shadow 0.15s ease-out, transform 0.15s ease-out !important;
}

/* Estado activo - se ilumina con glow */
.sb-beat.playing {
    background: var(--accent-color, #4ecdc4) !important;
    box-shadow: 0 0 30px var(--accent-color, #4ecdc4), 0 0 60px var(--accent-color, #4ecdc4) !important;
    transform: scale(1.02) !important;
}

/* Bars base - con transición */
.sb-bar {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    transition: background 0.15s ease-out, box-shadow 0.15s ease-out !important;
}

/* Bars activos */
.sb-bar.active {
    background: var(--accent-color, #4ecdc4) !important;
    box-shadow: 0 0 8px var(--accent-color, #4ecdc4) !important;
}


/* PC - tamaños */
@media (min-width: 1025px) {
    .sb-beat {
        width: 80px !important;
        height: 80px !important;
        border-radius: 20px !important;
        padding: 12px !important;
    }

    .sb-beat-bars {
        gap: 8px !important;
    }

    .sb-bar {
        height: 18px !important;
        border-radius: 9px !important;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 1024px) {
    .sb-beat {
        width: 64px !important;
        height: 64px !important;
        border-radius: 16px !important;
        padding: 10px !important;
    }

    .sb-beat-bars {
        gap: 6px !important;
    }

    .sb-bar {
        height: 16px !important;
        border-radius: 8px !important;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .sb-beat {
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
        padding: 8px !important;
    }

    .sb-beat-bars {
        gap: 5px !important;
    }

    .sb-bar {
        height: 12px !important;
        border-radius: 6px !important;
    }
}
/* =============================================================================
   FIX: Beat Smooth Flash v2 - Transición más visible
   200ms de transición para fade in/out suave
   ============================================================================= */

/* Estado base - transición de 200ms para fade out suave */
.sb-beat {
    background: var(--bg-card, #2d3748) !important;
    box-shadow: none !important;
    transform: scale(1) !important;
    transition: background 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.1s ease-out !important;
}

/* Estado activo - destello con glow */
.sb-beat.playing {
    background: var(--accent-color, #4ecdc4) !important;
    box-shadow: 0 0 25px var(--accent-color, #4ecdc4), 0 0 50px var(--accent-color, #4ecdc4) !important;
    transform: scale(1.03) !important;
}

/* Bars - transición suave */
.sb-bar {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    transition: background 0.2s ease-out, box-shadow 0.2s ease-out !important;
}

.sb-bar.active {
    background: var(--accent-color, #4ecdc4) !important;
    box-shadow: 0 0 6px var(--accent-color, #4ecdc4) !important;
}
/* =============================================================================
   FINAL FIX: Beat Smooth Flash - Override ALL previous styles
   Usa transiciones como sb-dial, NO animaciones
   ============================================================================= */

/* Cancelar cualquier animación previa */
@keyframes beatFlash {
    0%, 100% { opacity: 1; }
}

@keyframes barFlash {
    0%, 100% { opacity: 1; }
}

/* ============================================
   ESTADO BASE - con transición para fade suave
   ============================================ */
.sb-beat {
    background: var(--bg-card, #2d3748) !important;
    box-shadow: none !important;
    transform: scale(1) !important;
    animation: none !important;
    transition: background 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.15s ease-out !important;
}

/* ============================================
   ESTADO PLAYING - destello brillante
   ============================================ */
.sb-beat.playing {
    background: var(--accent-color, #4ecdc4) !important;
    box-shadow: 0 0 30px var(--accent-color, #4ecdc4), 0 0 60px var(--accent-color, #4ecdc4) !important;
    transform: scale(1.05) !important;
    animation: none !important;
}

/* ============================================
   BARS - misma lógica
   ============================================ */
.sb-bar {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
    animation: none !important;
    transition: background 0.2s ease-out, box-shadow 0.2s ease-out !important;
}

.sb-bar.active {
    background: var(--accent-color, #4ecdc4) !important;
    box-shadow: 0 0 8px var(--accent-color, #4ecdc4) !important;
    animation: none !important;
}

/* ============================================

   ============================================ */

/* PC */
@media (min-width: 1025px) {
    .sb-beat {
        width: 80px !important;
        height: 80px !important;
        border-radius: 20px !important;
        padding: 14px !important;
    }

    .sb-beats {
        gap: 24px !important;
    }

    .sb-beat-bars {
        gap: 8px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sb-bar {
        height: 18px !important;
        border-radius: 9px !important;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 1024px) {
    .sb-beat {
        width: 64px !important;
        height: 64px !important;
        border-radius: 16px !important;
        padding: 12px !important;
    }

    .sb-beats {
        gap: 20px !important;
    }

    .sb-beat-bars {
        gap: 6px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sb-bar {
        height: 16px !important;
        border-radius: 8px !important;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .sb-beat {
        width: 52px !important;
        height: 52px !important;
        border-radius: 14px !important;
        padding: 10px !important;
    }

    .sb-beats {
        gap: 12px !important;
    }

    .sb-beat-bars {
        gap: 5px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sb-bar {
        height: 12px !important;
        border-radius: 6px !important;
    }
}
/* =============================================================================
   FIX: Beat speed = dial speed (0.15s) + Play/Tap same size
   ============================================================================= */

/* Beat transition igual que dial: 0.15s ease-out */
.sb-beat {
    transition: background 0.15s ease-out, box-shadow 0.15s ease-out, transform 0.1s ease-out !important;
}

.sb-bar {
    transition: background 0.15s ease-out, box-shadow 0.15s ease-out !important;
}

/* ============================================
   BOTONES PLAY Y TAP - MISMO TAMAÑO
   ============================================ */

/* PC */
@media (min-width: 1025px) {
    .sb-play-btn,
    .sb-tap-btn {
        width: 72px !important;
        height: 72px !important;
        border-radius: 20px !important;
        font-size: 28px !important;
    }

    .sb-tap-btn {
        font-size: 11px !important;
    }

    .sb-tap-btn i {
        font-size: 22px !important;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 1024px) {
    .sb-play-btn,
    .sb-tap-btn {
        width: 64px !important;
        height: 64px !important;
        border-radius: 18px !important;
    }

    .sb-play-btn {
        font-size: 26px !important;
    }

    .sb-tap-btn {
        font-size: 10px !important;
    }

    .sb-tap-btn i {
        font-size: 20px !important;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .sb-play-btn,
    .sb-tap-btn {
        width: 56px !important;
        height: 56px !important;
        border-radius: 16px !important;
    }

    .sb-play-btn {
        font-size: 22px !important;
    }

    .sb-tap-btn {
        font-size: 9px !important;
    }

    .sb-tap-btn i {
        font-size: 18px !important;
    }
}
/* =============================================================================
   FIX: Centrar barras dentro de sb-beat
   ============================================================================= */

.sb-beat {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sb-beat-bars {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.sb-bar {
    width: 100% !important;
}
/* =============================================================================
   FIX: Quitar outline fijo en :focus - Solo mostrar en :focus-visible (teclado)
   ============================================================================= */

/* Quitar outline en click (mouse/touch) */
.sb-ctrl-btn:focus,
.sb-dial-btn:focus,
.sb-play-btn:focus,
.sb-tap-btn:focus,
.sb-panel-option:focus,
.sb-config-tab:focus,
.sb-config-option:focus,
.sb-config-btn:focus,
.sb-beat:focus,
button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Solo mostrar outline con navegación por teclado (accesibilidad) */
.sb-ctrl-btn:focus-visible,
.sb-dial-btn:focus-visible,
.sb-play-btn:focus-visible,
.sb-tap-btn:focus-visible,
.sb-panel-option:focus-visible,
.sb-config-tab:focus-visible,
.sb-config-option:focus-visible,
.sb-config-btn:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-color, #4ecdc4) !important;
    outline-offset: 2px !important;
}

/* Quitar cualquier efecto de selección en botones */
.sb-ctrl-btn,
.sb-dial-btn,
.sb-play-btn,
.sb-tap-btn,
.sb-panel-option,
.sb-config-tab,
.sb-config-option,
.sb-config-btn {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
}

/* =============================================================================
   FIX: Dynamic accent colors for beats and dial
   Uses --beat-color variable set by JavaScript
   ============================================================================= */

/* Beat playing state - use dynamic color */
.sb-beat.playing {
    background: var(--beat-color, var(--accent-color, #4ecdc4)) !important;
    box-shadow: 0 0 30px var(--beat-color, var(--accent-color, #4ecdc4)), 
                0 0 60px var(--beat-color, var(--accent-color, #4ecdc4)) !important;
}

.sb-beat.playing .sb-bar.active {
    background: var(--beat-color, var(--accent-color, #4ecdc4)) !important;
    box-shadow: 0 0 8px var(--beat-color, var(--accent-color, #4ecdc4)) !important;
}

/* Dial beat pulse - use dynamic color */
.sb-dial.beat-pulse {
    filter: drop-shadow(0 0 15px var(--beat-color, var(--accent-color, #4ecdc4))) !important;
}

.sb-dial.beat-pulse .sb-dial-fill {
    filter: brightness(1.3) drop-shadow(0 0 10px var(--beat-color, var(--accent-color, #4ecdc4))) !important;
}

.sb-dial.beat-pulse .sb-dial-knob {
    box-shadow: 0 0 20px var(--beat-color, var(--accent-color, #4ecdc4)),
                0 0 40px var(--beat-color, var(--accent-color, #4ecdc4)),
                inset 0 2px 4px rgba(255,255,255,0.3) !important;
    background: var(--beat-color, var(--accent-color, #4ecdc4)) !important;
}

.sb-dial.beat-pulse::after {
    box-shadow: 0 0 30px var(--beat-color, var(--accent-color, #4ecdc4)),
                0 0 60px var(--beat-color, var(--accent-color, #4ecdc4)) !important;
}


/* =============================================================================
   LIGHT MODE - TOOLS CONTRAST FIX
   ============================================================================= */

/* ===== METRONOME LIGHT MODE ===== */
[data-theme="light"] .sb-container {
    background: var(--bg-secondary);
}

[data-theme="light"] .sb-beats {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sb-beat:hover {
    background: rgba(78, 205, 196, 0.15);
}

[data-theme="light"] .sb-bar {
    background: #cbd5e0;
}

[data-theme="light"] .sb-ctrl-btn {
    background: #e2e8f0;
    color: #4a5568;
}

[data-theme="light"] .sb-ctrl-btn:hover {
    background: #cbd5e0;
    color: #2d3748;
}

[data-theme="light"] .sb-ctrl-btn.active {
    background: #4ecdc4;
    color: white;
}

[data-theme="light"] .sb-tempo-name {
    color: #718096;
}

[data-theme="light"] .sb-tempo-input {
    color: #1a202c;
}

[data-theme="light"] .sb-tempo-input:hover {
    border-bottom-color: #cbd5e0;
}

[data-theme="light"] .sb-tempo-unit {
    color: #718096;
}

[data-theme="light"] .sb-dial {
    background: #e2e8f0;
}

[data-theme="light"] .sb-dial::before {
    background: #f7fafc;
}

[data-theme="light"] .sb-dial-track {
    border-color: #cbd5e0;
}

[data-theme="light"] .sb-dial-center {
    background: #e2e8f0;
    color: #4a5568;
}

[data-theme="light"] .sb-dial-btn {
    background: #e2e8f0;
    color: #4a5568;
}

[data-theme="light"] .sb-dial-btn:hover {
    background: #cbd5e0;
    color: #4ecdc4;
}

[data-theme="light"] .sb-dial-knob {
    border-color: #f7fafc;
}

[data-theme="light"] .sb-tap-btn {
    background: #e2e8f0;
    color: #4a5568;
}

[data-theme="light"] .sb-tap-btn:hover {
    background: #cbd5e0;
    color: #2d3748;
}

[data-theme="light"] .sb-vol-btn {
    background: #e2e8f0;
    color: #4a5568;
}

[data-theme="light"] .sb-vol-btn:hover {
    background: #cbd5e0;
    color: #4ecdc4;
}

[data-theme="light"] .sb-vol-bar-container {
    background: #e2e8f0;
}

/* REMOVED - sb-panel moved to metronome-panel.css */

[data-theme="light"] .sb-panel-title {
    color: #718096;
}

/* SB-BEAT PLAYING - Border color from accent config */
.sb-beat.playing {
    border-color: var(--beat-color, #4ecdc4) !important;
}

[data-theme="light"] .sb-beat.playing {
    border-color: var(--beat-color, #4ecdc4) !important;
}

/* =============================================================================
   FIX: METRONOME PANEL DROPDOWN - Ensure proper visibility
   ============================================================================= */

/* Base panel styling - ensure visibility */
/* REMOVED - sb-panel moved to metronome-panel.css */

/* Dark theme panel */
/* REMOVED - sb-panel moved to metronome-panel.css */

/* Panel title */
.sb-panel .sb-panel-title {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="dark"] .sb-panel .sb-panel-title {
    color: #94a3b8 !important;
    border-bottom-color: #334155 !important;
}

/* Panel list container */
.sb-panel .sb-panel-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Panel list items */
.sb-panel .sb-panel-list-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    background: #f8fafc !important;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    text-align: left !important;
    font-size: 15px !important;
    color: #334155 !important;
}

[data-theme="dark"] .sb-panel .sb-panel-list-item {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

.sb-panel .sb-panel-list-item:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

[data-theme="dark"] .sb-panel .sb-panel-list-item:hover {
    background: #475569 !important;
    border-color: #64748b !important;
}

.sb-panel .sb-panel-list-item.active {
    background: #4ecdc4 !important;
    color: #ffffff !important;
    border-color: #4ecdc4 !important;
}

/* Subdivision icons */
.sb-panel .sb-subdiv-icon {
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Panel grid for time signatures */
.sb-panel .sb-panel-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
}

.sb-panel .sb-panel-option {
    padding: 12px 16px !important;
    background: #f8fafc !important;
    border: 2px solid transparent !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    transition: all 0.2s ease !important;
}

[data-theme="dark"] .sb-panel .sb-panel-option {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

.sb-panel .sb-panel-option:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

[data-theme="dark"] .sb-panel .sb-panel-option:hover {
    background: #475569 !important;
}

.sb-panel .sb-panel-option.active {
    background: #4ecdc4 !important;
    color: #ffffff !important;
    border-color: #4ecdc4 !important;
}

/* Mobile adjustments */
@media (max-width: 480px) {
/* REMOVED - sb-panel moved to metronome-panel.css */
}
