body {
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    background-color: #111827;
    color: #fff;
    overflow: hidden;
}

.main-container {
    display: flex;
    height: 100vh;
}

.display-section {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.8s ease;
    background-color: #2563eb; /* Default primary color */
}

.controls-section {
    width: 450px;
    flex-shrink: 0;
    background-color: #1f2937;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
    box-sizing: border-box;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0 16px;
}

h1 {
    margin-top: 56px;
    margin-bottom: 0.5em;
    font-size: 2.4em;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 16px rgba(30,41,59,0.14);
}

.subtitle {
    color: #e0e7ef;
    margin-bottom: 2.2em;
    font-size: 1.12em;
    letter-spacing: 0.01em;
}

#toggleBtn {
    padding: 16px 38px;
    border-radius: 12px;
    border: 2px solid #fff;
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 1.2em;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
    box-shadow: 0 2px 12px rgba(30,41,59,0.08);
}
#toggleBtn:hover, #toggleBtn:focus {
    background: rgba(37,99,235,0.18);
    border-color: #2563eb;
}

.status-row {
    margin-bottom: 1.2em;
    color: #fff;
    font-size: 1.1em;
    text-align: center;
    min-height: 1.2em;
}

.slider-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 32px;
    justify-content: center;
    margin-bottom: 2.2em;
}

.color-controls {
    display: flex;
    gap: 24px 32px;
    justify-content: center;
    margin-bottom: 2.2em;
}

.color-picker-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(255,255,255,0.09);
        padding: 18px 22px;
        border-radius: 14px;
        box-shadow: 0 1px 6px rgba(30,41,59,0.07);
        min-width: 150px;
    }

    .color-picker-group label {
        color: #fff;
        font-weight: 500;
        margin-bottom: 8px;
        font-size: 1em;
    }

    input[type="color"] {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        width: 40px;
        height: 40px;
        background-color: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    input[type="color"]::-webkit-color-swatch-wrapper {
        padding: 0;
    }

    input[type="color"]::-webkit-color-swatch {
        border: 2px solid #fff;
        border-radius: 50%;
    }

    input[type="color"]::-moz-color-swatch {
        border: 2px solid #fff;
        border-radius: 50%;
    }

.slider-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(255,255,255,0.09);
    padding: 18px 22px 12px 22px;
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(30,41,59,0.07);
    min-width: 210px;
}

.slider-group label {
    color: #fff;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1em;
}

input[type="range"] {
    width: 100%;
    accent-color: #2563eb;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 4px;
}

.info-panel {
    display: flex;
    gap: 32px;
    margin-top: 1.8em;
    justify-content: center;
}

.info-box {
    background: rgba(255,255,255,0.13);
    border-radius: 14px;
    box-shadow: 0 1.5px 8px rgba(30,41,59,0.10);
    padding: 18px 38px;
    color: #fff;
    font-size: 1.12em;
    text-align: center;
    min-width: 170px;
    font-weight: 500;
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .main-container {
        flex-direction: column;
        height: auto;
    }

    .display-section {
        height: 40vh;
        min-height: 250px;
    }

    .controls-section {
        width: 100%;
        height: auto;
        overflow-y: visible;
    }

    .app-container {
        min-height: unset;
        padding: 0 1rem;
    }

    h1 {
        margin-top: 2rem;
        font-size: 1.8em;
    }

    .slider-controls, .info-panel, .color-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .slider-group, .info-box, .color-picker-group {
        width: 90%;
        max-width: 400px;
    }
}




#metronome-visualizer {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

#metronome-visualizer.beat {
    animation: pulse 0.5s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.controls {
    background: #fff;
    padding: 28px 32px;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(33, 118, 255, 0.07);
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 300px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.08em;
}

input[type="color"] {
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(33, 118, 255, 0.13);
    cursor: pointer;
}

input[type="range"] {
    flex: 1;
    accent-color: #2176ff;
    margin-left: 10px;
}

label {
    min-width: 160px;
    color: #222;
    font-weight: 500;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 28px;
}

.actions button {
    background: #2176ff;
    color: #fff;
    font-size: 1.12em;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    box-shadow: 0 1px 6px rgba(33,118,255,0.11);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    font-weight: 600;
}

.actions button#stopBtn {
    background: #ff4f4f;
}

.actions button:active {
    box-shadow: 0 0 0 rgba(0,0,0,0.09);
    background: #1451a3;
}

@media (max-width: 500px) {
    .app-container {
        padding: 10px;
    }
    .color-display {
        width: 98vw;
        height: 120px;
    }
    .controls {
        padding: 16px 5vw;
        min-width: unset;
    }
    label {
        min-width: 90px;
    }
}
