:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --background-color: #f5f5f5;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.metronome-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

h1 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.bpm-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
}

.bpm-control button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.bpm-control button:hover {
    background-color: #3367d6;
}

.bpm-display {
    font-size: 2rem;
    font-weight: bold;
}

.bpm-display span:first-child {
    color: var(--primary-color);
    min-width: 3ch;
    display: inline-block;
}

.beat-selector, .sound-selector {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.beat-option, .sound-option {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.beat-option:hover, .sound-option:hover {
    background-color: rgba(66, 133, 244, 0.1);
}

.beat-option[data-active], .sound-option[data-active] {
    background-color: var(--primary-color);
    color: white;
}

.visualizer {
    width: 100%;
    height: 80px;
    margin: 1.5rem 0;
    position: relative;
}

.visualizer-dot {
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
}

.main-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    font-size: 1.2rem;
    cursor: pointer;
    width: 100%;
    margin: 1rem 0;
    transition: background-color 0.2s;
}

.main-button:hover {
    background-color: #3367d6;
}

.tap-tempo {
    margin-top: 1.5rem;
}

#tap-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#tap-button:hover {
    background-color: #2d9249;
}

#tap-count {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 480px) {
    .metronome-container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .bpm-control button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .bpm-display {
        font-size: 1.5rem;
    }
}