* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.metronome-container {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
}

.bpm-control {
    margin-bottom: 25px;
}

.bpm-display {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 10px;
}

.bpm-slider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #3498db, #e74c3c);
    outline: none;
    border-radius: 5px;
}

.bpm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #2c3e50;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.time-signature {
    margin-bottom: 25px;
}

.time-signature h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.signature-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.signature-option {
    padding: 8px 15px;
    background-color: #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.signature-option.active {
    background-color: #3498db;
    color: white;
}

.visualization {
    position: relative;
    height: 200px;
    margin-bottom: 30px;
}

.pendulum-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 180px;
    width: 10px;
    transform-origin: center bottom;
}

.pendulum-arm {
    height: 180px;
    width: 6px;
    background-color: #2c3e50;
    position: absolute;
    left: 2px;
    border-radius: 3px;
}

.pendulum-weight {
    width: 30px;
    height: 30px;
    background-color: #e74c3c;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    left: -10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.beat-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.beat-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ecf0f1;
    transition: background-color 0.1s ease;
}

.beat-dot.active {
    background-color: #e74c3c;
}

.beat-dot.strong {
    transform: scale(1.2);
}

.controls {
    margin-bottom: 20px;
}

.start-stop {
    padding: 12px 30px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.start-stop:hover {
    background-color: #27ae60;
}

.start-stop.stop {
    background-color: #e74c3c;
}

.start-stop.stop:hover {
    background-color: #c0392b;
}

.audio-control {
    margin-top: 15px;
}

.audio-toggle {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

@keyframes pendulumSwing {
    0% {
        transform: rotate(30deg);
    }
    100% {
        transform: rotate(-30deg);
    }
}