﻿    .mtg-wrapper {
        --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
        --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        justify-content: center;
        padding: clamp(0px, 5vw, 0px) 20px;
    }

    .mtg-panel {
        position: relative;                
        width: 100%;
        max-width: 1140px;
        border-radius: 28px;
        padding: clamp(24px, 5vw, 48px);
        overflow: hidden;
    }

    /* ---------- HERO ---------- */
    .mtg-hero { text-align: center; position: relative; z-index: 2; margin-bottom: 32px; padding: 8px 0; }
    .hero-ambient-glow {
        position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
        width: 600px; height: 300px;
        background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 22%, transparent) 0%, var(--primary-glow) 45%, transparent 75%);
        filter: blur(55px); pointer-events: none; z-index: -1; border-radius: 50%;
    }
    .mtg-hero-badge {
        display: inline-flex; align-items: center; gap: 8px;
        font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
        color: var(--primary-color); background: var(--primary-light);
        padding: 7px 18px; border-radius: 100px; margin-bottom: 20px;
        border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
        box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color) 12%, transparent);
        backdrop-filter: blur(8px);
    }
    .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary-color); box-shadow: 0 0 10px var(--primary-color); animation: pulseDot 2s infinite; }
    @keyframes pulseDot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.6; } }

    .mtg-hero-title { font-size: clamp(34px, 5vw, 56px); font-weight: 900; line-height: 1.1; letter-spacing: -0.035em; color: var(--text-main); margin-bottom: 16px; }
    .mtg-hero-title em { font-style: normal; background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end)); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .mtg-hero-desc { font-size: 16px; color: var(--text-muted); font-weight: 500; max-width: 650px; margin: 0 auto 20px auto; line-height: 1.6; }

    .hero-features-belt { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
    .hfb-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-main); background: var(--bg-body); padding: 6px 16px; border-radius: 100px; border: 1px solid var(--border-color); box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
    .hfb-icon { width: 14px; height: 14px; color: var(--primary-color); }

    /* ---------- UNIFIED CONTROLS BAR ---------- */
    .mtg-controls-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 16px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        margin-bottom: 22px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    }
    .ctrl-group {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .ctrl-group.right {
        margin-left: auto;
    }
    [dir="rtl"] .ctrl-group.right {
        margin-left: 0;
        margin-right: auto;
    }
    .ctrl-sep {
        width: 1px;
        height: 20px;
        background: var(--border-color);
        flex-shrink: 0;
    }

    .ctrl-action-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: var(--bg-body);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-muted);
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
    }
    .ctrl-action-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .ctrl-action-btn.active { color: var(--primary-color); background: var(--primary-light); border-color: var(--primary-color); }
    .ctrl-badge-active {
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
        background: var(--primary-color);
        color: #fff;
        padding: 2px 6px;
        border-radius: 100px;
        letter-spacing: 0.3px;
    }

    /* Custom Dropdowns */
    .custom-dropdown { position: relative; }
    .cd-header {
        display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 10px;
        padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--text-main); cursor: pointer; transition: all 0.2s; white-space: nowrap;
    }
    .cd-header:hover { border-color: var(--primary-color); }
    .custom-dropdown.active .cd-header { border-color: var(--primary-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent); }
    .cd-value { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
    .cd-current-name { font-weight: 700; color: var(--text-main); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cd-chevron { color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; }
    .custom-dropdown.active .cd-chevron { transform: rotate(180deg); }

    .cd-body {
        position: absolute; top: calc(100% + 6px); left: 0; width: 240px;
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px;
        box-shadow: 0 14px 35px rgba(0,0,0,0.12); z-index: 200; overflow: hidden; animation: cdSlideDown 0.18s ease;
    }
    .cd-body.right-align { left: auto; right: 0; }
    [dir="rtl"] .cd-body.right-align { right: auto; left: 0; }
    @keyframes cdSlideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

    .cd-search { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
    .cd-search input { width: 100%; border: none; background: transparent; color: var(--text-main); font-size: 12px; font-weight: 600; outline: none; }
    .cd-list { max-height: 240px; overflow-y: auto; padding: 6px; }
    .cd-group-lbl { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); padding: 8px 10px 4px; letter-spacing: 0.5px; }
    .cd-divider { height: 1px; background: var(--border-color); margin: 6px 4px; }
    .cd-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text-main); cursor: pointer; transition: all 0.15s; }
    .cd-item:hover { background: var(--bg-body); }
    .cd-item.active { background: var(--primary-light); color: var(--primary-color); font-weight: 700; }
    .cd-item-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .cd-lang-code { font-family: monospace; font-size: 10px; font-weight: 800; color: var(--text-muted); background: var(--bg-body); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--border-color); flex-shrink: 0; }
    .cd-item.active .cd-lang-code { color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color) 40%, transparent); background: var(--card-bg); }
    .cd-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cd-check { width: 14px; height: 14px; color: var(--primary-color); flex-shrink: 0; }
    .cd-no-results { padding: 18px 12px; text-align: center; font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }

    .dir-toggle-btn {
        display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 10px;
        font-size: 12px; font-weight: 800; color: var(--text-muted); cursor: pointer; transition: all 0.2s; white-space: nowrap;
    }
    .dir-toggle-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .dir-toggle-btn.active { color: var(--primary-color); background: var(--primary-light); border-color: var(--primary-color); }

    /* Usage Pill */
    .mtg-usage-pill {
        display: inline-flex; align-items: center; gap: 8px; background: var(--bg-body);
        padding: 6px 14px; border-radius: 100px; border: 1px solid var(--border-color);
        font-size: 12px; font-weight: 700; color: var(--text-main); white-space: nowrap;
    }
    .mup-dots { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
    .mup-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-color); flex-shrink: 0; transition: background 0.3s; }
    .mup-dot.used { background: var(--primary-color); }
    .mup-warn { color: #ef4444; font-weight: 800; }

    /* Advanced Options Panel (Drawer) */
    .adv-options-panel {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px 20px;
        margin-bottom: 22px; display: flex; gap: 16px; flex-wrap: wrap; box-shadow: 0 4px 16px rgba(0,0,0,0.02);
    }
    .adv-opt-col { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
    .adv-opt-header { display: flex; justify-content: space-between; align-items: center; }
    .adv-label { font-size: 11.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; display: flex; align-items: center; gap: 5px; }
    .adv-char-count { font-size: 11px; font-family: monospace; font-weight: 700; color: var(--text-muted); }
    .adv-char-count.over { color: #ef4444; }
    .adv-input {
        width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 10px;
        padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--text-main); outline: none; transition: border-color 0.2s;
    }
    .adv-input:focus { border-color: var(--primary-color); }

    /* ═══════════════════════════════════════════
       DUAL-STUDIO WORKSPACE & CONSOLE GRID
       ═══════════════════════════════════════════ */
    .tool-widget { width: 100%; margin-bottom: 28px; }
    .generator-grid {
        display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%;
    }
    @media (max-width: 860px) {
        .generator-grid { grid-template-columns: 1fr; }
    }

    .console-panel {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px;
        display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    }
    .cp-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 14px 18px; border-bottom: 1px solid var(--border-color); background: color-mix(in srgb, var(--card-bg) 70%, var(--bg-body));
    }
    .cp-title { font-size: 13.5px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .cp-title.in-lbl { color: var(--primary-color); }
    .cp-title.out-lbl { color: var(--primary-color); }

    .ep-actions { display: flex; align-items: center; gap: 6px; }
    .ep-btn {
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px;
        padding: 5px 10px; font-size: 11.5px; font-weight: 700; color: var(--text-muted);
        cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s;
    }
    .ep-btn:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }
    .ep-btn.danger:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }

    .cp-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
    .input-group { display: flex; flex-direction: column; gap: 6px; }
    .input-header-row { display: flex; justify-content: space-between; align-items: center; }
    .input-lbl { font-size: 12px; font-weight: 800; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
    .char-badge { font-size: 11px; font-family: monospace; font-weight: 700; color: var(--text-muted); }

    .c-input {
        width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px;
        padding: 10px 14px; font-size: 13.5px; color: var(--text-main); outline: none; transition: all 0.2s; font-family: inherit;
    }
    .c-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent); }

    .medium-pills-bar { display: flex; gap: 6px; flex-wrap: wrap; }
    .medium-pill {
        background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-muted);
        font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer;
        display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s;
    }
    .medium-pill:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }
    .medium-pill.active { background: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); font-weight: 800; }

    .pws-list { display: flex; gap: 6px; flex-wrap: wrap; }
    .pw-pill {
        background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-muted);
        font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
    }
    .pw-pill:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }

    .gen-btn {
        width: 100%; background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end)); color: #fff;
        border: none; border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 800;
        display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: all 0.25s var(--ease-out);
        box-shadow: 0 6px 20px var(--primary-shadow, rgba(99,102,241,0.3));
    }
    .gen-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-shadow, rgba(99,102,241,0.4)); }
    .gen-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    /* Output Console Board */
    .deck-filter-bar { padding: 8px 16px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
    .deck-filter-pills { display: flex; gap: 5px; flex-wrap: wrap; }
    .dfp-btn {
        background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted);
        font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; cursor: pointer;
    }
    .dfp-btn.active { background: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); font-weight: 800; }

    .output-board {
        padding: 16px; min-height: 380px; max-height: 480px; overflow-y: auto; display: flex; flex-direction: column;
    }
    .output-placeholder {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        text-align: center; color: var(--text-muted); margin: auto; padding: 30px 20px; gap: 10px;
    }
    .oph-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--bg-body); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--primary-color); opacity: 0.6; }
    .oph-title { font-size: 15px; font-weight: 800; color: var(--text-main); }
    .oph-desc { font-size: 12.5px; max-width: 320px; line-height: 1.5; }

    .titles-list-inner { display: flex; flex-direction: column; gap: 12px; }
    .title-deck-card {
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 14px;
        padding: 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: all 0.2s;
        animation: slideInUp 0.3s ease forwards;
    }
    .title-deck-card:hover { border-color: var(--primary-color); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.03); }
    .title-deck-card.active-for-preview { border-color: var(--primary-color); background: var(--primary-light); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 30%, transparent); }

    .tdc-header { display: flex; justify-content: space-between; align-items: center; }
    .tdc-left-group { display: flex; align-items: center; gap: 8px; }
    .tdc-hook-badge {
        display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800;
        text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 7px; border-radius: 100px; border: 1px solid transparent;
    }
    .tdc-actions { display: flex; gap: 5px; }
    .tdc-btn {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 6px;
        width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
        color: var(--text-muted); cursor: pointer; transition: all 0.2s;
    }
    .tdc-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

    .tdc-text { font-size: 14px; font-weight: 800; color: var(--text-main); line-height: 1.4; word-break: break-word; }

    .tdc-metrics { background: var(--card-bg); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 5px; }
    .tdc-m-info { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-muted); }
    .tdc-m-info strong { color: var(--text-main); }
    .tdc-track { height: 5px; background: var(--border-color); border-radius: 10px; position: relative; overflow: hidden; }
    .tdc-fill { height: 100%; border-radius: 10px; transition: width 0.6s var(--ease-out); }
    .tdc-limit-mark { position: absolute; left: 89.23%; top: 0; bottom: 0; width: 2px; background: #ef4444; opacity: 0.6; z-index: 2; }
    [dir="rtl"] .tdc-limit-mark { left: auto; right: 89.23%; }

    .streaming-cursor {
        display: inline-block; width: 8px; height: 14px; background: var(--primary-color);
        margin-left: 4px; vertical-align: middle; animation: blink 1s infinite;
    }
    @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

    /* Custom Checkbox */
    .custom-card-checkbox { display: inline-flex; align-items: center; cursor: pointer; user-select: none; margin: 0; }
    .custom-card-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
    .ccc-box {
        width: 15px; height: 15px; background-color: var(--card-bg); border: 1px solid var(--border-color);
        border-radius: 4px; transition: all 0.2s; display: inline-block; position: relative;
    }
    .custom-card-checkbox:hover input ~ .ccc-box { border-color: var(--primary-color); }
    .custom-card-checkbox input:checked ~ .ccc-box { background-color: var(--primary-color); border-color: var(--primary-color); }
    .custom-card-checkbox input:checked ~ .ccc-box:after {
        content: ""; position: absolute; display: block; left: 4.5px; top: 1.5px; width: 3px; height: 7px;
        border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);
    }

    /* ═══════════════════════════════════════════
       SERP PREVIEW & GOOGLE SIMULATOR
       ═══════════════════════════════════════════ */
    .serp-preview-section {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px;
        padding: 20px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    }
    .sps-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
    .sps-title { font-size: 13.5px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .sps-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .sps-btn {
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px;
        padding: 5px 10px; font-size: 11.5px; font-weight: 700; color: var(--text-muted);
        cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s;
    }
    .sps-btn:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }
    .sps-btn.active { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); font-weight: 800; }

    .serp-platform-pills { display: flex; background: var(--bg-body); padding: 2px; border-radius: 8px; border: 1px solid var(--border-color); gap: 2px; }
    .spp-btn {
        background: transparent; border: none; font-size: 11px; font-weight: 700; color: var(--text-muted);
        padding: 4px 8px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s;
    }
    .spp-btn.active { background: var(--card-bg); color: var(--primary-color); font-weight: 800; }

    .serp-metrics-bar {
        display: flex; justify-content: space-between; align-items: center; background: var(--bg-body);
        border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 14px; font-size: 11.5px; flex-wrap: wrap; gap: 8px;
    }
    .smb-item { display: flex; align-items: center; gap: 5px; }
    .smb-lbl { color: var(--text-muted); font-weight: 600; }
    .smb-val { font-weight: 800; font-family: monospace; color: var(--text-main); }
    .smb-val.good { color: #22c55e; }
    .smb-val.warn { color: #ef4444; }

    .serp-status-pill { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 100px; display: inline-flex; align-items: center; gap: 4px; }
    .serp-status-pill.success { background: rgba(34,197,94,0.1); color: #22c55e; }
    .serp-status-pill.warning { background: rgba(245,158,11,0.1); color: #d97706; }
    .serp-status-pill.danger { background: rgba(239,68,68,0.1); color: #ef4444; }
    .serp-status-pill.neutral { background: var(--bg-body); color: var(--text-muted); }

    .serp-card {
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 14px;
        padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; transition: all 0.2s; font-family: 'Arial', sans-serif;
    }
    .serp-card.google-mobile { max-width: 380px; margin: 0 auto; border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,0.04); }

    .serp-header { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
    .serp-favicon { width: 24px; height: 24px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; }
    .serp-site-info { display: flex; flex-direction: column; }
    .serp-site-name { font-size: 12px; color: var(--text-main); font-weight: 600; line-height: 1.2; }
    .serp-site-url { font-size: 11px; color: var(--text-muted); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }

    .serp-title-box { display: flex; align-items: center; gap: 6px; }
    .serp-title {
        font-size: 17px; line-height: 1.3; font-weight: 500; color: #1a0dab; cursor: pointer;
        text-decoration: none; word-wrap: break-word;
    }
    .serp-title:hover { text-decoration: underline; }
    [dir="rtl"] .serp-title, .serp-title[dir="rtl"] { direction: rtl !important; text-align: right !important; }

    .inline-edit-trigger {
        background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted);
        border-radius: 4px; padding: 2px 5px; cursor: pointer; display: inline-flex; align-items: center; vertical-align: middle; transition: all 0.2s;
    }
    .inline-edit-trigger:hover { border-color: var(--primary-color); color: var(--primary-color); }

    .title-inline-edit-area { display: flex; flex-direction: column; gap: 6px; width: 100%; }
    .tie-input { width: 100%; background: var(--card-bg); border: 1px solid var(--primary-color); border-radius: 8px; padding: 8px 10px; font-size: 14px; color: var(--text-main); outline: none; }
    .tie-actions { display: flex; justify-content: flex-end; gap: 6px; }
    .tie-btn { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; cursor: pointer; border: none; }
    .tie-btn.cancel { background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted); }
    .tie-btn.save { background: var(--primary-color); color: #fff; }

    .serp-desc {
        font-size: 13px; line-height: 1.5; color: #4d5156; word-wrap: break-word;
    }
    [dir="rtl"] .serp-desc, .serp-desc[dir="rtl"] { direction: rtl !important; text-align: right !important; }

    /* Social Card Preview */
    .social-preview-card {
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 14px;
        overflow: hidden; display: flex; flex-direction: column;
    }
    .spc-image-placeholder {
        height: 120px; background: color-mix(in srgb, var(--primary-color) 8%, var(--bg-body));
        border-bottom: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-muted); font-size: 11.5px; font-weight: 700;
    }
    .spc-content { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
    .spc-domain { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
    .spc-title { font-size: 14px; font-weight: 800; color: var(--text-main); line-height: 1.3; }
    .spc-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

    /* Dark Mode SERP Color Adjustments */
    [data-theme="dark"] .serp-title, .dark-mode .serp-title { color: #8ab4f8; }
    [data-theme="dark"] .serp-desc, .dark-mode .serp-desc { color: #bdc1c6; }
    [data-theme="dark"] .serp-site-name, .dark-mode .serp-site-name { color: #dadce0; }

    /* ── Comparison Panel & Analytics ── */
    .comparison-panel {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px;
        padding: 20px; margin-bottom: 28px; box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    }
    .cp-header-comp { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
    .cp-title-comp { font-size: 14.5px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .cp-badge { font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 100px; background: var(--primary-light); color: var(--primary-color); border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent); }

    .cp-grid { display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
    @media (max-width: 800px) { .cp-grid { grid-template-columns: 1fr; } }
    .cp-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
    .cpc-header { display: flex; justify-content: space-between; align-items: center; }
    .cpc-title { font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
    .cpc-tag { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
    .cpc-tag.success { background: var(--primary-light); color: var(--primary-color); }

    .cpc-body { display: flex; flex-direction: column; gap: 8px; }
    .cpc-stat-row { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; }
    .cpc-stat-row strong { color: var(--text-main); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

    /* ---------- STATS STRIP ---------- */
    .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 40px; }
    .stats-sc { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s; }
    .stats-sc:hover { transform: translateY(-2px); }
    .stats-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
    .stats-ico.cr { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
    .stats-ico.cb { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .stats-ico.cg { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
    .stats-ico.cp { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
    .stats-val { font-size: 28px; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 4px; transition: transform 0.3s; }
    .stats-val.popped { transform: scale(1.2); color: var(--primary-color); }
    .stats-lbl { font-size: 13px; font-weight: 700; color: var(--text-muted); }

    /* ---------- BANNER CONTAINER ---------- */
    .banner-container { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
    .upgrade-banner {
        display: none; align-items: center; gap: 16px; background: linear-gradient(135deg, rgba(var(--primary-color-rgb, 99, 102, 241), 0.1), rgba(var(--pink-rgb, 236, 72, 153), 0.1));
        border: 1px solid var(--primary-light); border-radius: 16px; padding: 16px 24px; position: relative;
    }
    .upgrade-banner.show { display: flex; animation: slideInUp 0.4s ease; }
    .ub-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-color); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .ub-text { flex: 1; }
    .ub-title { font-size: 16px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
    .ub-sub { font-size: 13.5px; color: var(--text-muted); }
    .ub-cta {
        background: var(--primary-color); color: #fff !important; font-size: 13.5px; font-weight: 700;
        padding: 10px 20px; border-radius: 100px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
    }
    .ub-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 12px var(--primary-shadow); }
    .ub-close { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 8px; border-radius: 8px; display: flex; align-items: center; position: absolute; top: 12px; right: 12px; }

    .limit-warning { display: none; align-items: center; gap: 12px; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 12px; padding: 12px 16px; color: #ef4444; }
    .limit-warning.show { display: flex; animation: slideInUp 0.4s ease; }
    .lw-text { font-size: 13.5px; line-height: 1.5; }
    .lw-text strong { font-weight: 800; }
    .lw-link { display: inline-flex; align-items: center; gap: 6px; color: #ef4444; font-weight: 700; text-decoration: underline; margin-top: 4px; }

    /* ---------- HISTORY SECTION ---------- */
    .mtg-history-section { margin-top: 40px; animation: fadeIn 0.4s ease; }
    .mtg-history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
    .mtg-history-title { font-size: 14px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; margin: 0; }
    .mtg-clear-btn { background: transparent; border: none; font-size: 12.5px; font-weight: 700; color: #ef4444; cursor: pointer; padding: 4px 10px; border-radius: 6px; }
    .mtg-clear-btn:hover { background: rgba(239,68,68,0.1); }
    .mtg-history-list { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; padding-right: 4px; }
    .mtg-history-item { display: flex; align-items: center; justify-content: space-between; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 16px; transition: all 0.2s; cursor: pointer; user-select: none; }
    .mtg-history-item:hover { border-color: var(--primary-color); transform: translateX(4px); }
    .mtg-history-info { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
    .mtg-history-domain { font-size: 14px; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mtg-history-meta { display: flex; align-items: center; gap: 12px; }
    .mtg-history-badge { background: var(--primary-light); color: var(--primary-color); padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .mtg-history-date { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
    .mtg-history-del-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 8px; display: flex; align-items: center; }
    .mtg-history-del-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

    /* ---------- BENTO BOX FEATURES CLUSTER ---------- */
    .console-features { margin-top: 50px; width: 100%; }
    .bento-features-cluster { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; grid-auto-rows: minmax(130px, auto); gap: 20px; width: 100%; position: relative; z-index: 2; }
    .bento-card { background: rgba(255, 255, 255, 0.015); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-color); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; position: relative; overflow: hidden; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
    .bento-card:hover { transform: translateY(-4px) scale(1.01); border-color: var(--primary-color); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
    .bento-card-content { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; gap: 12px; }
    
    .dashed-ring-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; width: 44px; height: 44px; }
    .dashed-ring-wrapper::before { content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px; border: 1px dashed var(--border-color); border-radius: 16px; opacity: 0.5; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); z-index: 0; transform-origin: center center; }
    .bento-card:hover .dashed-ring-wrapper::before { opacity: 1; transform: scale(1.1) rotate(180deg); border-color: var(--primary-color); }
    
    .bc-icon-wrapper { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-body); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all 0.4s ease; margin-bottom: 0; position: relative; z-index: 1; }
    .bento-card:hover .bc-icon-wrapper { background: linear-gradient(135deg, var(--primary-color), var(--border-color)); color: white; border-color: transparent; transform: scale(1.1) rotate(4deg); }
    .bc-icon-wrapper i, .bc-icon-wrapper svg { width: 18px; height: 18px; }

    .bc-title { font-size: 16px; font-weight: 800; color: var(--text-main); margin: 0; }
    .bc-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin: 0; font-weight: 500; }
    
    .bc-wide-top { grid-column: span 2; }
    .bc-tall { grid-row: span 2; }
    .bc-wide-mid { grid-column: span 2; }
    .bc-wide-top .bento-card-content, .bc-wide-mid .bento-card-content { justify-content: center; }
    .bc-wide-top .bc-desc, .bc-wide-mid .bc-desc { max-width: 85%; }

    .spin-icon { animation: spin 2s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    @media (max-width: 900px) {
        .bento-features-cluster { grid-template-columns: repeat(2, 1fr); }
        .bc-wide-top, .bc-wide-mid { grid-column: span 2; }
        .bc-tall { grid-row: span 1; grid-column: span 1; }
    }
    @media (max-width: 600px) {
        .bento-features-cluster { grid-template-columns: 1fr; }
        .bc-wide-top, .bc-wide-mid, .bc-tall { grid-column: span 1; }
        .bc-wide-top .bc-desc, .bc-wide-mid .bc-desc { max-width: 100%; }
    }

    @keyframes slideInUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }