/**
 * eDrumz Metronome — glassmorphism styling.
 * Frosted-glass panels/buttons read best over a rich, darker backdrop
 * (glass effects need something colorful behind them to actually show),
 * so this component supplies its own background rather than sitting
 * directly on the site's plain white page background.
 */

.edm-wrap {
    --edm-accent: #e63946;
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 20px 36px;
    border-radius: 28px;
    background: radial-gradient(circle at 30% 0%, #3a2a4d 0%, #1a1233 55%, #0d0a1a 100%);
    font-family: 'Inter', -apple-system, sans-serif;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* Core glass effect, reused by every button/panel in this component */
.edm-glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 4px 18px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.12);
}

.edm-panel {
    border-radius: 24px;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Visual beat indicator dots */
.edm-beats {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.edm-beat-dot {
    width: 16px; height: 16px;
    border-radius: 5px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.08s, box-shadow 0.08s, transform 0.08s;
}
.edm-beat-dot.is-active {
    background: var(--edm-accent);
    box-shadow: 0 0 14px 2px rgba(230,57,70,0.7);
    transform: scale(1.15);
}

/* BPM display row */
.edm-bpm-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.edm-stepper-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.edm-bpm-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 130px;
}
.edm-bpm-num {
    font-size: 3.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}
.edm-bpm-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 2px;
}
.edm-tempo-marking {
    margin-top: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--edm-accent);
}

/* Buttons */
.edm-btn {
    color: #fff;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, transform 0.08s;
}
.edm-btn:hover { background: rgba(255,255,255,0.14); }
.edm-btn:active { transform: scale(0.95); }

.edm-step {
    width: 52px; height: 40px;
    font-size: 0.82rem;
    font-weight: 700;
}

.edm-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.14);
    outline: none;
}
.edm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--edm-accent);
    box-shadow: 0 2px 8px rgba(230,57,70,0.6);
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.8);
}
.edm-slider::-moz-range-thumb {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--edm-accent);
    box-shadow: 0 2px 8px rgba(230,57,70,0.6);
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.8);
}

/* Beats/bar + subdivision settings */
.edm-settings-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.edm-setting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.edm-setting-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.edm-setting-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.edm-mini {
    width: 34px; height: 34px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}
.edm-setting-value {
    min-width: 22px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

/* Tap tempo / Play / Accent toggle row */
.edm-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.edm-tap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    height: 52px;
    font-size: 0.86rem;
    font-weight: 600;
}
.edm-tap svg { width: 18px; height: 18px; }

.edm-play {
    width: 68px; height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--edm-accent);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 24px rgba(230,57,70,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}
.edm-play:hover { background: #d62839; }
.edm-play svg { width: 28px; height: 28px; color: #fff; }
.edm-play .edm-icon-play { margin-left: 3px; } /* optical centering */

.edm-accent-toggle {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.edm-accent-toggle svg { width: 20px; height: 20px; }
.edm-accent-toggle.is-off { opacity: 0.4; }

@media (max-width: 420px) {
    .edm-bpm-num { font-size: 2.8rem; }
    .edm-bpm-display { min-width: 110px; }
    .edm-step { width: 46px; height: 36px; }
    .edm-play { width: 60px; height: 60px; }
    .edm-tap { padding: 0 14px; height: 46px; font-size: 0.8rem; }
}
