:root {
        --mt-bg: #1c1c20;
        --mt-primary: #6c5ce7;
        --mt-primary-light: #a29bfe; 
        --mt-accent: #00d2d3;
        --mt-dark-ui: #1c1d27;
        --mt-text: #ffffff;
    }

    .mt-app-container {
        position: relative;
        width: 100%;
        min-height: 580px;
        background: radial-gradient(circle at 50% 30%, #252636 0%, #15161f 60%, #0d0e14 100%);
        border-radius: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        user-select: none;
        box-shadow: 0 20px 50px rgba(0,0,0,0.4);
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding: 40px 20px;
        margin-bottom: 40px;
    }

    /* باکس اصلی مترونوم */
    .mt-main-box {
        background: var(--mt-dark-ui);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 28px;
        padding: 40px 30px;
        width: 92%;
        max-width: 420px;
        box-shadow: 0 25px 60px rgba(0,0,0,0.5), inset 0 2px 10px rgba(255,255,255,0.05);
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 5;
    }

    /* ویژوالایزر ضربات (نقطه‌های نورانی) */
    .mt-visualizer {
        display: flex;
        gap: 14px;
        margin-bottom: 30px;
        height: 22px;
        align-items: center;
    }
    .mt-dot {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #333644;
        box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
        transition: background 0.1s, transform 0.1s;
    }
    .mt-dot.active {
        background: var(--mt-primary-light);
        box-shadow: 0 0 15px var(--mt-primary);
        transform: scale(1.25);
    }
    .mt-dot.active.downbeat {
        background: var(--mt-accent);
        box-shadow: 0 0 22px var(--mt-accent);
        transform: scale(1.4);
    }

    /* نمایشگر BPM */
    .mt-bpm-display {
        display: flex;
        align-items: baseline;
        gap: 8px;
        margin-bottom: 25px;
        direction: ltr;
    }
    .mt-bpm-input {
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 72px;
        font-weight: 900;
        width: 150px;
        text-align: center;
        outline: none;
        font-family: monospace, sans-serif;
        text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    }
    .mt-bpm-input::-webkit-outer-spin-button,
    .mt-bpm-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    .mt-bpm-label {
        color: #888;
        font-size: 18px;
        font-weight: 800;
        letter-spacing: 2px;
    }

    /* اسلایدر تنظیم سرعت */
    .mt-slider-group {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 35px;
        direction: ltr;
    }
    .mt-btn-adjust {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 22px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.2s;
    }
    .mt-btn-adjust:hover {
        background: var(--mt-primary);
        border-color: var(--mt-primary);
        transform: scale(1.1);
    }
    
    .mt-slider {
        flex-grow: 1;
        -webkit-appearance: none;
        height: 6px;
        background: #333644;
        border-radius: 5px;
        outline: none;
        cursor: pointer;
    }
    .mt-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: var(--mt-accent);
        cursor: pointer;
        box-shadow: 0 0 12px var(--mt-accent);
        transition: 0.2s;
    }
    .mt-slider::-webkit-slider-thumb:hover {
        transform: scale(1.2);
    }

    /* ردیف کنترل کسر میزان و تپ تمپو */
    .mt-controls-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 30px;
    }
    .mt-control-btn {
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.12);
        color: #eee;
        padding: 11px 20px;
        border-radius: 12px;
        font-size: 13.5px;
        font-weight: 800;
        cursor: pointer;
        transition: 0.25s;
    }
    .mt-control-btn:hover {
        background: rgba(255,255,255,0.12);
        color: #fff;
    }

    .mt-beats-control-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    .mt-beats-stepper {
        display: flex;
        align-items: center;
        gap: 12px;
        direction: ltr;
    }
    .mt-beat-btn {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 1px solid rgba(255,255,255,0.2);
        background: transparent;
        color: #fff;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: 0.2s;
    }
    .mt-beat-btn:hover {
        border-color: var(--mt-accent);
        color: var(--mt-accent);
        background: rgba(0, 210, 211, 0.1);
    }
    .mt-beat-value {
        font-size: 24px;
        font-weight: 900;
        color: var(--mt-accent);
        width: 25px;
        text-align: center;
    }
    .mt-beats-label {
        color: #888;
        font-size: 12px;
        font-weight: 700;
    }

    /* دکمه بزرگ پخش */
    .mt-play-btn {
        width: 78px;
        height: 78px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        background: linear-gradient(135deg, var(--mt-primary-light), var(--mt-primary));
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 25px rgba(108, 92, 231, 0.4);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    .mt-play-btn svg {
        width: 32px;
        height: 32px;
        fill: currentColor;
        margin-left: 4px;
        transition: 0.25s;
    }
    .mt-play-btn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 15px 35px rgba(108, 92, 231, 0.6);
    }
    .mt-play-btn.playing {
        background: linear-gradient(135deg, #ff7675, #d63031);
        box-shadow: 0 10px 25px rgba(214, 48, 49, 0.4);
    }
    .mt-play-btn.playing svg {
        margin-left: 0;
    }

    /* انیمیشن دکمه Tap Tempo */
    @keyframes pulse-tap {
        0% { box-shadow: 0 0 0 0 rgba(0, 210, 211, 0.5); }
        70% { box-shadow: 0 0 0 12px rgba(0, 210, 211, 0); }
        100% { box-shadow: 0 0 0 0 rgba(0, 210, 211, 0); }
    }
    .mt-tap-btn:active {
        transform: scale(0.94);
        background: var(--mt-accent);
        color: #111;
    }

    /* SEO Article */
    .mt-seo-container {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        padding: 40px 30px;
        color: var(--text-dark);
        line-height: 1.9;
        margin-bottom: 40px;
    }
    .mt-seo-container h2 {
        color: var(--primary);
        font-size: 1.6rem;
        font-weight: 900;
        margin-bottom: 15px;
    }
    .mt-seo-container h3 {
        color: var(--text-dark);
        font-size: 1.25rem;
        font-weight: 800;
        margin: 30px 0 15px;
        border-right: 4px solid var(--mt-accent);
        padding-right: 12px;
    }
