#main-container {
    margin-top: 35px !important;
}

.metronome {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 0px auto;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.metronome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00a2ff, #4CAF50);
}

.top-beads {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
    gap: 2px 21px;
}

.bead {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ccc;
    margin: 4px;
    transition: background 0.2s;
}

.bead.active {
    background: #4caf50;
}

.row-break {
    flex-basis: 100%;
    height: 0;
}

.sound-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sound-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffff;
    min-width: 90px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sound-btn.active {
    
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.sound-btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.sound-btn.active:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
}

.tempo-display {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    font-weight: 500;
}

.tempo-control {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tempo-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #666;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tempo-btn:hover {
    background-color: #f8f9fa;
    border-color: #00a2ff;
    color: #00a2ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tempo-slider {
    -webkit-appearance: none;
    appearance: none;
    min-width: 300px;
    height: 10px;
    border-radius: 15px;
    background: #f0f0f0;
    outline: none;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.tempo-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a2ff, #0091ea);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    margin-top: -7px;
    border: 3px solid white;
}

.tempo-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 3px solid white;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a2ff, #0091ea);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tempo-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 15px;
    background: linear-gradient(to right, #00a2ff 0%, #00a2ff var(--value, 50%), #f0f0f0 var(--value, 50%));
}

.tempo-slider::-moz-range-track {
    height: 10px;
    border-radius: 15px;
    background: #f0f0f0;
}

.tempo-slider::-moz-range-progress {
    height: 10px;
    border-radius: 15px;
    background: linear-gradient(90deg, #00a2ff, #0091ea);
}

.bpm-display {
    font-size: 45px;
    font-weight: 800;
    background: linear-gradient(135deg, #00a2ff, #4CAF50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    padding: 10px;
    position: relative;
}


.control-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.control-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    flex: 1;
    max-width: 180px;
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}


.control-btn.active {
    color: #fff !important;
    background: linear-gradient(135deg, #FF5722, #f4511e);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}
.sound-btn.active:hover{
    color: #FFFFFF !important;
}

.metronome-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.mute-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.toggle-switch {
    position: relative;
    width: 55px;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch.active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 2px 4px rgba(76, 175, 80, 0.3);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(25px);
}

.beat-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(240, 240, 240, 0.5);
    border-radius: 15px;
    margin-top: 10px;
}

.nav-btn {
    width: 38px;
    height: 38px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: #666;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.nav-btn:hover {
    background: linear-gradient(135deg, #00a2ff, #0091ea);
    border-color: #00a2ff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,162,255,0.3);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.beat-circles {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 0;
}

.beat-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    border: 2px solid #e0e0e0;
}

.beat-circle.selected {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
    border-color: #4CAF50;
    transform: scale(1.1);
}

.beat-circle.playing {
    background: linear-gradient(135deg, #FF5722, #f4511e);
    color: white;
    transform: scale(1.2);
    box-shadow: 0 8px 16px rgba(255, 87, 34, 0.4);
    border-color: #FF5722;
}

.beat-circle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mute-label {
    font-size: clamp(14px, 2.5vw, 16px);
    color: #666;
    text-align: center;
    font-weight: 500;
}

.sound-label {
    font-size: 16px;
    color: #666;
    margin-right: 12px;
    font-weight: 500;
}

.menu-toggle {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}


/* Mobile responsive adjustments */
@media (max-width: 768px) {

    .metronome {
        padding: 25px;
        width: 100%;
        max-width: 500px;
    }

    /* Mobile layout reordering */
    .top-beads { order: 1; }
    .tempo-control { order: 2; }
    .bpm-display { order: 3; }
    .control-buttons { order: 4; }
    .metronome-options { order: 5; }
    .beat-controls { order: 6; }


    .top-beads {
        gap: 15px;
        margin-bottom: 25px;
    }

    .top-beads.two-rows {
        gap: 12px;
    }

    .tempo-control {
        gap: 15px;
        margin-bottom: 35px;
    }

    .tempo-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .control-buttons {
        gap: 15px;
        margin-bottom: 25px;
    }

    .control-btn {
        padding: 12px 20px;
        min-width: 120px;
    }

    .beat-controls {
        gap: 10px;
        padding: 10px;
    }

    .beat-circles {
        gap: 12px;
    }

    .beat-circle {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .menu-toggle {
        flex-direction: column;
        gap: 20px;
    }


}

@media (max-width: 480px) {
    .metronome {
        padding: 20px;
    }

    .top-beads {
        gap: 8px 8px;
        min-height: 32px;
        padding: 8px 0;
    }

    .top-beads.two-rows {
        gap: 8px;
    }

    .bead {
        width: 22px;
        height: 22px;
    }

    .tempo-control {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 20px;
    }

    .tempo-slider {
        width: 100%;
        min-width: unset;
    }

    .control-buttons {
        flex-direction: row;
        gap: 15px;
    }

    .control-btn {
        width: 100%;
        max-width: unset;
    }

    .beat-circles {
        gap: 12px;
    }

    .beat-circle {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .sound-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 80px;
    }
}

@media (max-width: 360px) {
    .beat-controls {
        flex-direction: column;
        gap: 20px;
    }

    .top-beads {
        gap: 8px;
    }

    .top-beads.two-rows {
        gap: 6px;
    }

    .bead {
        width: 12px;
        height: 12px;
    }
}

