/* ═══════════════════════════════════════════════════════
   MARKDOWN PREVIEW TOOL – Refined Stylesheet
   ═══════════════════════════════════════════════════════ */

/* ─── VARIABLES ────────────────────────────────────────── */
:root {
    --mp-bg: var(--surface-2);
    --mp-card-bg: var(--surface);
    --mp-card-border: rgba(68, 97, 242, .07);
    --mp-card-shadow: 0 1px 4px rgba(68, 97, 242, .06), 0 4px 24px rgba(0, 0, 0, .04);
    --mp-text-main: var(--ink);
    --mp-text-muted: var(--ink-3);
    --mp-text-sub: var(--ink-2);
    --mp-surface-2: var(--surface-2);
    --mp-surface-3: var(--surface-3);
    --mp-divider: var(--surface-3);
    --mp-toolbar-border: rgba(68, 97, 242, .07);
    --mp-btn-bg: var(--surface-3);
    --mp-primary: #6366f1;
    --mp-primary-hover: #4f46e5;
    --mp-primary-light: rgba(99, 102, 241, .1);
    --mp-green: #10b981;
    --mp-rose: #f43f5e;
    --mp-rose-bg: rgba(244, 63, 94, .08);
    --mp-code-bg: #f1f2f7;
    --mp-code-border: #e4e6f0;
    --mp-blockquote-bg: #f5f3ff;
    --mp-blockquote-border: rgba(99, 102, 241, .35);
    --mp-table-header: var(--surface-3);
    --mp-table-border: var(--surface-3);
    --mp-radius: 14px;
    --mp-radius-sm: 8px;
    --mp-transition: .22s ease;
    --mp-font-mono: 'Cascadia Code', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

[data-theme="dark"] {
    --mp-bg: #111318;
    --mp-card-bg: #1a1d24;
    --mp-card-border: #252836;
    --mp-card-shadow: 0 4px 28px rgba(0, 0, 0, .35);
    --mp-text-main: #f1f5f9;
    --mp-text-muted: #64748b;
    --mp-text-sub: #94a3b8;
    --mp-surface-2: #141720;
    --mp-surface-3: #1e2130;
    --mp-divider: #252836;
    --mp-toolbar-border: #252836;
    --mp-btn-bg: #1e2130;
    --mp-primary-light: rgba(99, 102, 241, .18);
    --mp-code-bg: #10131a;
    --mp-code-border: #262b39;
    --mp-blockquote-bg: rgba(99, 102, 241, .08);
    --mp-blockquote-border: rgba(99, 102, 241, .4);
    --mp-table-header: #1e2130;
    --mp-table-border: #252836;
}

.ic-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 36px;
}

.ic-header h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 46px);
    font-weight: 800;
    color: var(--ic-text-main);
    line-height: 1.15;
    letter-spacing: -.025em;
    margin-bottom: 14px;
}

.ic-header h1 span {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── PAGE WRAPPER ─────────────────────────────────────── */
.mp-page-wrapper {
    background: var(--mp-bg);
    padding: 75px 0px 0px 0px;
    transition: background .3s ease;
}

/* ─── WORKSPACE GRID ───────────────────────────────────── */
.mp-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
    min-height: calc(100vh - 160px);
}

.mp-page-wrapper.top-wrapper .container {
    max-width: 100%;
    padding: 0 10px;
}

.mp-input-panel,
.mp-output-panel {
    min-height: 80vh;
    display: flex;
    min-width: 0;
}

.mp-input-panel .mp-card,
.mp-output-panel .mp-card {
    height: 100%;
    width: 100%;
}

/* ─── SHARED CARD ──────────────────────────────────────── */
.mp-card {
    background: var(--mp-card-bg);
    border: var(--card-border);
    border-radius: 16px;
    box-shadow: var(--mp-card-shadow);
    transition: background .3s, border-color .3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.tool-card {
    background: white !important;
}

/* ─── CARD HEADER ──────────────────────────────────────── */
.mp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid var(--mp-toolbar-border);
    flex-wrap: wrap;
}

.mp-header-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mp-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--mp-primary-light);
    color: var(--mp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mp-card-icon--purple {
    background: rgba(124, 58, 237, .1);
    color: #7c3aed;
}

[data-theme="dark"] .mp-card-icon--purple {
    background: rgba(124, 58, 237, .2);
}

.mp-header-text h1,
.mp-header-text h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--mp-text-main);
    margin: 0;
    line-height: 1.2;
}

.mp-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─── BUTTONS ──────────────────────────────────────────── */
.mp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--mp-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--mp-text-sub);
    background: var(--mp-card-bg);
    border: 1px solid var(--mp-card-border);
    cursor: pointer;
    transition: all var(--mp-transition);
}

.mp-action-btn:hover {
    background: var(--mp-surface-3);
    color: var(--mp-text-main);
    border-color: rgba(99, 102, 241, .25);
    transform: translateY(-1px);
}

.mp-action-btn--primary {
    background: var(--mp-primary) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, .25);
}

.mp-action-btn--primary:hover {
    background: var(--mp-primary-hover) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .4);
}

.mp-action-btn--clear:hover {
    color: var(--mp-rose);
    background: var(--mp-rose-bg);
    border-color: rgba(244, 63, 94, .2);
}

/* Dropdowns (Download / Copy) */
.mp-dropdown {
    position: relative;
    display: inline-flex;
}

.mp-dropdown-toggle {
    gap: 7px;
}

.mp-dropdown-toggle .mp-dropdown-chevron {
    transition: transform var(--mp-transition);
    opacity: .7;
}

.mp-dropdown.open .mp-dropdown-toggle .mp-dropdown-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.mp-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    min-width: 210px;
    padding: 6px;
    background: var(--mp-card-bg);
    border: 1px solid var(--mp-card-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(.98);
    transform-origin: top right;
    transition: all var(--mp-transition);
    pointer-events: none;
}

.mp-dropdown.open .mp-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mp-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--mp-text-sub);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: all var(--mp-transition);
}

.mp-dropdown-item:hover {
    background: var(--mp-primary-light);
    color: var(--mp-primary);
}

.mp-dropdown-item:active {
    transform: scale(.98);
}

.mp-dropdown-item svg {
    flex-shrink: 0;
    opacity: .75;
}

.mp-dropdown-item:hover svg {
    opacity: 1;
}

/* ─── FORMATTING TOOLBAR ───────────────────────────────── */
.mp-toolbar-wrap {
    position: relative;
    flex-shrink: 0;
    min-width: 0;
    width: 100%;
}

.mp-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0px 12px;
    border-bottom: 1px solid var(--mp-toolbar-border);
    background: var(--mp-surface-2);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    width: 100%;
}

.mp-toolbar::-webkit-scrollbar {
    display: none;
}

.mp-toolbar-scroll {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    /* border-radius: 10px; */
    background: none;
    /* background: color-mix(in srgb, var(--mp-surface-2) 78%, transparent); */
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    color: var(--mp-text-main);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--mp-transition), color var(--mp-transition), background var(--mp-transition);
}

.mp-toolbar-scroll--prev {
    left: 0px;
}

.mp-toolbar-scroll--next {
    right: 0px;
}

.mp-toolbar-scroll:hover {
    color: var(--mp-primary);
    background: color-mix(in srgb, var(--mp-primary) 16%, var(--mp-surface-2));
}

.mp-toolbar-scroll:active {
    transform: translateY(-50%) scale(.92);
}

.mp-toolbar-scroll.is-visible {
    opacity: 1;
    visibility: visible;
}

.mp-fmt-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--mp-radius-sm);
    border: none;
    background: transparent;
    color: var(--mp-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--mp-transition);
}

.mp-fmt-btn:hover {
    background: var(--mp-primary-light);
    color: var(--mp-primary);
}

.mp-fmt-btn:active {
    transform: scale(.9);
}

.mp-toolbar-sep {
    width: 1px;
    height: 18px;
    background: var(--mp-card-border);
    margin: 0 6px;
    flex-shrink: 0;
}

/* ─── EDITOR ───────────────────────────────────────────── */
.mp-editor-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
}

.mp-editor-wrap textarea {
    width: 100%;
    min-height: 62vh;
    height: 100%;
    padding: 18px;
    border: none;
    background: transparent;
    color: var(--mp-text-main);
    font-family: var(--mp-font-mono);
    font-size: 16px;
    line-height: 1.7;
    resize: none;
    outline: none;
}

.mp-editor-wrap textarea::placeholder {
    color: var(--mp-text-muted);
}

/* ─── INPUT META ───────────────────────────────────────── */
.mp-input-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12px;
    color: var(--mp-text-muted);
    background: var(--mp-surface-2);
    border-top: 1px solid var(--mp-card-border);
    user-select: none;
    flex-wrap: wrap;
}

.mp-dot-sep {
    opacity: .5;
}

.mp-meta-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
}

.mp-meta-hint svg {
    opacity: .6;
}

/* ─── PREVIEW PANEL ────────────────────────────────────── */
.mp-output-card {
    height: 100%;
    min-height: 75vh;
}

.mp-preview-wrap {
    flex: 1;
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mp-preview {
    flex: 1;
    padding: 24px 26px;
    overflow-y: auto;
    color: var(--mp-text-main);
    font-size: 16px;
    line-height: 1.7;
    word-wrap: break-word;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .25) transparent;
    word-wrap: anywhere;
}

.mp-preview::-webkit-scrollbar {
    width: 6px;
}

.mp-preview::-webkit-scrollbar-track {
    background: transparent;
}

.mp-preview::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .25);
    border-radius: 10px;
}

/* ─── PREVIEW TYPOGRAPHY (Markdown content) ────────────── */
.mp-preview>*:first-child {
    margin-top: 0 !important;
}

.mp-preview>*:last-child {
    margin-bottom: 0 !important;
}

.mp-preview h1,
.mp-preview h2,
.mp-preview h3,
.mp-preview h4,
.mp-preview h5,
.mp-preview h6 {
    font-family: var(--font-display);
    color: var(--mp-text-main);
    line-height: 1.3;
    font-weight: 700;
    margin: 1.4em 0 .6em;
}

.mp-preview h1 {
    font-size: 26px;
    letter-spacing: -.02em;
}

.mp-preview h2 {
    font-size: 20px;
    letter-spacing: -.015em;
    padding-bottom: .35em;
    border-bottom: 1px solid var(--mp-table-border);
}

.mp-preview h3 {
    font-size: 18px;
}

.mp-preview h4 {
    font-size: 16px;
}

.mp-preview p {
    margin: 0 0 1em;
    color: var(--mp-text-sub);
}

.mp-preview a {
    color: var(--mp-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(99, 102, 241, .35);
    transition: border-color var(--mp-transition);
}

.mp-preview a:hover {
    border-bottom-color: var(--mp-primary);
}

.mp-preview strong {
    color: var(--mp-text-main);
    font-weight: 700;
}

.mp-preview ul,
.mp-preview ol {
    margin: 0 0 1em;
    padding-left: 26px;
    color: var(--mp-text-sub);
}

.mp-preview ul {
    list-style-type: disc;
}

.mp-preview ul ul {
    list-style-type: circle;
}

.mp-preview ol {
    list-style-type: decimal;
}

.mp-preview li {
    margin-bottom: 5px;
}

.mp-preview li>ul,
.mp-preview li>ol {
    margin-bottom: 0;
}

.mp-preview li.task-list-item {
    list-style: none;
    margin-left: -26px;
    padding-left: 6px;
}

.mp-preview input[type="checkbox"] {
    accent-color: var(--mp-primary);
    margin-right: 8px;
    transform: translateY(1px);
}

.mp-preview blockquote {
    margin: 0 0 1em;
    padding: 12px 18px;
    border-left: 3px solid var(--mp-blockquote-border);
    background: var(--mp-blockquote-bg);
    border-radius: 0 10px 10px 0;
    color: var(--mp-text-sub);
}

.mp-preview blockquote p {
    margin: 0 0 .4em;
}

.mp-preview blockquote p:last-child {
    margin-bottom: 0;
}

.mp-preview code {
    font-family: var(--mp-font-mono);
    font-size: 13.5px;
    background: var(--mp-code-bg);
    border: 1px solid var(--mp-code-border);
    color: var(--mp-primary);
    padding: 2px 7px;
    border-radius: 6px;
}

.mp-preview pre {
    margin: 0 0 1em;
    background: var(--mp-code-bg);
    border: 1px solid var(--mp-code-border);
    border-radius: 12px;
    padding: 16px 18px;
    overflow-x: auto;
    line-height: 1.55;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .25) transparent;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.mp-preview pre::-webkit-scrollbar {
    height: 6px;
}

.mp-preview pre::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .25);
    border-radius: 10px;
}

.mp-preview pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font-size: 13.5px;
    display: block;
}

.mp-preview hr {
    border: none;
    height: 1px;
    background: var(--mp-table-border);
    margin: 1.6em 0;
}

.mp-preview img {
    max-width: 100%;
    border-radius: 10px;
}

.mp-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1em;
    font-size: 14.5px;
}

.mp-preview table th,
.mp-preview table td {
    border: 1px solid var(--mp-table-border);
    padding: 9px 14px;
    text-align: left;
}

.mp-preview table th {
    background: var(--mp-table-header);
    font-weight: 700;
    color: var(--mp-text-main);
}

.mp-preview table tr:nth-child(2n) td {
    background: var(--mp-surface-2);
}

/* ─── EMPTY STATE ──────────────────────────────────────── */
.mp-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    pointer-events: none;
    opacity: 1;
    transition: opacity .2s ease;
    background: var(--mp-card-bg);
}

.mp-empty-state.hidden {
    opacity: 0;
    visibility: hidden;
}

.mp-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--mp-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mp-text-muted);
    opacity: .7;
}

.mp-empty-state p {
    font-size: 13.5px;
    color: var(--mp-text-muted);
    text-align: center;
    line-height: 1.6;
    margin: 0;
}

/* ─── STATS FOOTER ─────────────────────────────────────── */
.mp-output-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 20px;
    border-top: 1px solid var(--mp-toolbar-border);
    flex-shrink: 0;
    flex-wrap: wrap;
    background: var(--mp-surface-2);
}

.mp-output-stats {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 20px;
}

.mp-stat-item {
    display: flex;
    gap: 4px;
}

.mp-stat-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--mp-text-muted);
}

.mp-stat-label svg {
    opacity: .7;
}

.mp-stat-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--mp-text-main);
    line-height: 1.1;
}

/* ─── TIPS CARD ────────────────────────────────────────── */
.mp-tips-card {
    background: #f5f3ff;
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 16px;
    padding: 18px 24px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[data-theme="dark"] .mp-tips-card {
    background: rgba(99, 102, 241, .06);
    border-color: rgba(99, 102, 241, .2);
}

.mp-tips-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mp-primary);
}

.mp-tips-icon {
    flex-shrink: 0;
}

.mp-tips-header h3 {
    font-size: 14.5px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.mp-tips-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.mp-tips-list li {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--mp-text-sub);
    margin-bottom: 6px;
}

.mp-tips-list li:last-child {
    margin-bottom: 0;
}

/* ─── DESCRIPTION / CONTENT SECTION ────────────────────── */
/* ─── CONTENT WRAPPER ──────────────────────────────────── */
.mp-content-wrapper {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* ─── CONTENT CARD ──────────────────────────────────────── */
.mp-content-card {
    background: var(--mp-card-bg);
    border: 1px solid var(--mp-card-border);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-card-shadow);
    padding: 28px 30px;
    margin-bottom: 16px;
    transition: box-shadow var(--mp-transition), border-color var(--mp-transition);
}

.mp-content-card:hover {
    box-shadow: 0 6px 32px rgba(99, 102, 241, .1);
    border-color: rgba(99, 102, 241, .15);
}

/* ─── CONTENT HEADER ────────────────────────────────────── */
.mp-content-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mp-divider);
}

.mp-content-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--mp-primary-light);
    color: var(--mp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mp-content-header h2 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--mp-text-main);
    margin: 0;
    line-height: 1.25;
}

/* ─── CONTENT BODY ──────────────────────────────────────── */
.mp-content-body>p {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--mp-text-sub);
    margin: 0 0 20px;
}

.mp-content-body>p strong {
    color: var(--mp-text-main);
    font-weight: 600;
}

.mp-content-body>p code {
    font-family: monospace;
    font-size: 12.5px;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--mp-surface-2);
    color: var(--mp-primary);
    border: 1px solid var(--mp-card-border);
}

.mp-content-body h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--mp-text-main);
    margin: 0 0 10px;
}

/* ─── STEPS GRID ────────────────────────────────────────── */
.mp-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.mp-step-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 16px;
    background: var(--mp-surface-2);
    border: 1px solid var(--mp-card-border);
    border-radius: 12px;
    transition: border-color var(--mp-transition), box-shadow var(--mp-transition);
}

.mp-step-card:hover {
    border-color: rgba(99, 102, 241, .25);
    box-shadow: 0 4px 16px rgba(99, 102, 241, .08);
}

.mp-step-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, .3);
}

.mp-step-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--mp-text-main);
    margin: 0 0 6px;
    line-height: 1.3;
}

.mp-step-body p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--mp-text-sub);
    margin: 0;
}

.mp-step-body p strong {
    color: var(--mp-text-main);
    font-weight: 600;
}

/* ─── USERS GRID ────────────────────────────────────────── */
.mp-users-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.mp-user-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 16px;
    background: var(--mp-surface-2);
    border: 1px solid var(--mp-card-border);
    border-radius: 12px;
    transition: border-color var(--mp-transition), box-shadow var(--mp-transition), transform var(--mp-transition);
}

.mp-user-card:hover {
    border-color: rgba(99, 102, 241, .25);
    box-shadow: 0 6px 20px rgba(99, 102, 241, .1);
    transform: translateY(-2px);
}

.mp-user-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--mp-primary-light);
    color: var(--mp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mp-user-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--mp-text-main);
    margin-bottom: 5px;
    line-height: 1.3;
}

.mp-user-text p {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--mp-text-muted);
    margin: 0;
}


.mp-des {
    padding: 24px 28px;
    background: var(--mp-card-bg);
    border: 1px solid var(--mp-card-border);
    border-radius: 16px;
    box-shadow: var(--mp-card-shadow);
}

.mp-des-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mp-divider);
}

.mp-des-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--mp-primary-light);
    color: var(--mp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mp-des-header h2 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--mp-text-main);
    margin: 0;
}

.mp-des-body p {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--mp-text-sub);
    margin: 0 0 14px;
}

.mp-des-body p strong {
    color: var(--mp-text-main);
    font-weight: 600;
}

.mp-des-body p code {
    font-family: monospace;
    font-size: 12.5px;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--mp-surface-2);
    color: var(--mp-primary);
    border: 1px solid var(--mp-card-border);
}

.mp-des-body h2 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--mp-text-main);
    margin: 24px 0 12px;
}

.mp-des-body ul {
    margin: 0 0 16px;
    padding-left: 20px;
    list-style-type: disc;
}

.mp-des-body li {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--mp-text-sub);
    margin-bottom: 6px;
}

.mp-des-body li strong {
    color: var(--mp-text-main);
    font-weight: 600;
}

/* ─── FEATURES GRID ────────────────────────────────────── */
.mp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.mp-feature {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--mp-card-border);
    border-radius: 12px;
    background: var(--mp-surface-2);
    transition: border-color var(--mp-transition), transform var(--mp-transition), box-shadow var(--mp-transition);
}

.mp-feature:hover {
    border-color: rgba(99, 102, 241, .3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, .1);
}

.mp-feature-code {
    font-family: var(--mp-font-mono);
    font-size: 13px;
    color: var(--mp-primary);
    background: var(--mp-primary-light);
    border: 1px solid rgba(99, 102, 241, .18);
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mp-feature-code::-webkit-scrollbar {
    display: none;
}

.mp-feature-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--mp-text-main);
    margin-bottom: 4px;
}

.mp-feature-text p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--mp-text-muted);
    margin: 0;
}

/* ─── SYNTAX HIGHLIGHTING (hljs) ───────────────────────── */
.mp-preview .hljs {
    color: var(--mp-text-sub);
    background: transparent;
}

.mp-preview .hljs-comment,
.mp-preview .hljs-quote {
    color: #94a3b8;
    font-style: italic;
}

.mp-preview .hljs-keyword,
.mp-preview .hljs-selector-tag,
.mp-preview .hljs-subst {
    color: #7c3aed;
}

.mp-preview .hljs-number,
.mp-preview .hljs-literal,
.mp-preview .hljs-variable,
.mp-preview .hljs-template-variable,
.mp-preview .hljs-tag .hljs-attr {
    color: #d97706;
}

.mp-preview .hljs-string,
.mp-preview .hljs-doctag {
    color: #059669;
}

.mp-preview .hljs-title,
.mp-preview .hljs-section,
.mp-preview .hljs-selector-id {
    color: #4461f2;
}

.mp-preview .hljs-type,
.mp-preview .hljs-class .hljs-title {
    color: #0e7490;
}

.mp-preview .hljs-tag,
.mp-preview .hljs-name,
.mp-preview .hljs-attribute {
    color: #b45309;
}

.mp-preview .hljs-regexp,
.mp-preview .hljs-link {
    color: #c026d3;
}

.mp-preview .hljs-symbol,
.mp-preview .hljs-bullet {
    color: #dc2626;
}

.mp-preview .hljs-built_in,
.mp-preview .hljs-builtin-name {
    color: #4f46e5;
}

.mp-preview .hljs-meta {
    color: #64748b;
}

.mp-preview .hljs-deletion {
    background: rgba(244, 63, 94, .12);
}

.mp-preview .hljs-addition {
    background: rgba(16, 185, 129, .12);
}

.mp-preview .hljs-emphasis {
    font-style: italic;
}

.mp-preview .hljs-strong {
    font-weight: 700;
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
    .mp-workspace {
        grid-template-columns: 1fr;
        gap: 10px;
        min-height: 0;
    }

    .mp-input-panel,
    .mp-output-panel {
        min-height: 100vh;
    }

    .mp-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mp-steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mp-users-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    /* .mp-page-wrapper {
        padding: 80px 0 40px;
    } */

    .mp-des {
        padding: 20px;
    }

    .mp-content-card {
        padding: 20px 18px;
    }

    .mp-features-grid {
        grid-template-columns: 1fr;
    }

    .mp-steps-grid {
        grid-template-columns: 1fr;
    }

    .mp-users-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mp-card-header {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .mp-output-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        width: 100%;
    }

    .mp-output-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    /* .mp-card-actions {
        width: 100%;
    } */

    .mp-dropdown {
        flex: 1;
    }

    .mp-dropdown-toggle {
        width: 100%;
        justify-content: center;
    }

    .mp-dropdown-menu {
        right: auto;
        left: 0;
        min-width: 100%;
        transform-origin: top left;
    }

    .mp-action-btn span {
        display: none;
    }

    .mp-dropdown.copy-dropdown .mp-dropdown-menu {
        left: -100px !important;
        width: 160px !important;
    }
}

@media (max-width: 480px) {
    .mp-action-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .mp-card-header {
        padding: 10px;
    }

    .mp-editor-wrap textarea {
        min-height: 280px;
    }

    .mp-preview {
        padding: 18px;
    }

    .mp-users-grid {
        grid-template-columns: 1fr;
    }

    .mp-content-card {
        padding: 16px;
    }
}