/* ============================================================
   FILE: static/css/landing/metronome.css
   Standalone practice metronome styling.
   Design language matches virtual_piano: dark stage, warm accents.
   ============================================================ */

/* ── STAGE ──────────────────────────────────────────────── */
.mt-stage {
    background: radial-gradient(ellipse at top, #1e2a44 0%, #0d1628 70%);
    min-height: 640px;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eaf1ff;
    font-family: var(--font-family, 'Inter', sans-serif);
}

.mt-shell {
    width: 100%;
    max-width: 520px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 30px 28px 26px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

/* ── HEAD ───────────────────────────────────────────────── */
.mt-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.mt-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mt-brand__icon {
    font-size: 1.8rem;
    line-height: 1;
}
.mt-brand__title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
}
.mt-brand__sub {
    font-size: 0.72rem;
    color: #8da2c6;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.mt-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #c4d0e9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
}
.mt-icon-btn:hover {
    background: rgba(255,80,80,0.15);
    border-color: rgba(255,120,120,0.4);
    color: #ffdcdc;
}

/* ── BPM DISPLAY ────────────────────────────────────────── */
.mt-bpm-display {
    text-align: center;
    margin: 18px 0 18px;
}
.mt-bpm-value {
    font-family: 'Urbanist', sans-serif;
    font-size: 5.2rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 0%, #94b3e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(118,158,221,0.3);
    transition: transform 0.08s ease;
}
.mt-bpm-value.pulse { transform: scale(1.03); }
.mt-bpm-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: #7d92b6;
    margin-top: 2px;
}
.mt-tempo-name {
    font-size: 0.95rem;
    color: #b8c8e4;
    margin-top: 6px;
    font-style: italic;
}

/* ── BEATS ──────────────────────────────────────────────── */
.mt-beats {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 14px 0 20px;
    min-height: 18px;
}
.mt-beat-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    transition: all 0.1s ease;
}
.mt-beat-dot.active {
    background: #FF9F43;
    box-shadow: 0 0 14px rgba(255,159,67,0.7);
    transform: scale(1.25);
}
.mt-beat-dot.active.first {
    background: #EF6F6C;
    box-shadow: 0 0 14px rgba(239,111,108,0.8);
}

/* ── SLIDER ─────────────────────────────────────────────── */
.mt-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
}
.mt-step-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #c4d0e9;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.mt-step-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.mt-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 28px;
}
.mt-range::-webkit-slider-runnable-track {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
.mt-range::-moz-range-track {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
.mt-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FF9F43;
    margin-top: -7px;
    box-shadow: 0 2px 8px rgba(255,159,67,0.4);
    border: none;
}
.mt-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FF9F43;
    border: none;
    box-shadow: 0 2px 8px rgba(255,159,67,0.4);
}

/* ── PRESETS ────────────────────────────────────────────── */
.mt-presets {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 10px 0 20px;
    flex-wrap: wrap;
}
.mt-preset {
    padding: 6px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: #c4d0e9;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.mt-preset:hover {
    background: rgba(255,159,67,0.15);
    border-color: rgba(255,159,67,0.4);
    color: #fff;
}
.mt-preset.active {
    background: rgba(255,159,67,0.2);
    border-color: rgba(255,159,67,0.6);
    color: #fff;
}

/* ── CONTROLS ───────────────────────────────────────────── */
.mt-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 22px;
}
.mt-main-btn {
    padding: 16px;
    background: linear-gradient(135deg, #FF9F43 0%, #EF6F6C 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: 'Urbanist', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(239,111,108,0.3);
    transition: all 0.15s;
}
.mt-main-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(239,111,108,0.4);
}
.mt-main-btn:active { transform: translateY(0); }
.mt-main-btn.running {
    background: linear-gradient(135deg, #4a5a7d 0%, #2c3955 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.mt-side-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #c4d0e9;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 76px;
}
.mt-side-btn__main {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}
.mt-side-btn__hint {
    font-size: 0.65rem;
    color: #8da2c6;
    letter-spacing: 0.1em;
    margin-top: 2px;
}
.mt-side-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}
.mt-side-btn.flash { background: rgba(255,159,67,0.3); }

/* ── FIELDS ─────────────────────────────────────────────── */
.mt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.mt-field label {
    display: block;
    font-size: 0.76rem;
    color: #8da2c6;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.mt-field--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mt-field--inline label { margin: 0; color: #c4d0e9; font-size: 0.85rem; }

.mt-seg {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.06);
}
.mt-seg button {
    flex: 1;
    padding: 7px 8px;
    background: transparent;
    border: none;
    color: #8da2c6;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}
.mt-seg button:hover { color: #fff; }
.mt-seg button.active {
    background: rgba(255,159,67,0.2);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Toggle */
.mt-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.mt-toggle input { display: none; }
.mt-toggle label {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
}
.mt-toggle label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.2s;
}
.mt-toggle input:checked + label {
    background: #FF9F43;
}
.mt-toggle input:checked + label::after {
    transform: translateX(18px);
}

/* ── HINTS ──────────────────────────────────────────────── */
.mt-hint {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 14px;
    font-size: 0.78rem;
    color: #7d92b6;
}
.mt-hint kbd {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 0.72rem;
    color: #c4d0e9;
    margin-right: 4px;
    font-family: monospace;
}

/* Mobile */
@media (max-width: 560px) {
    .mt-shell { padding: 22px 18px 20px; }
    .mt-bpm-value { font-size: 4rem; }
    .mt-row { grid-template-columns: 1fr; gap: 12px; }
    .mt-presets { gap: 4px; }
    .mt-preset { padding: 5px 10px; font-size: 0.78rem; }
}