.mdhc-soft-wrapper {
    /* Biến CSS độc lập */
    --neo-border: 3px solid #111111;
    --neo-shadow: 5px 5px 0px #111111;
    
    --bg-main: #f0f4f8;
    --clr-yellow: #fde74c;
    --clr-cyan: #00f5d4;
    --clr-red: #ff006e;
    --clr-green: #06d6a0;
    --clr-white: #ffffff;
    --clr-text: #111111;

    max-width: 1100px; 
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--clr-text);
    background: var(--bg-main);
    padding: 20px;
    border: var(--neo-border);
    border-radius: 16px;
    box-shadow: 6px 6px 0px #111111;
}

.mdhc-soft-wrapper * { box-sizing: border-box; }

.mdhc-soft-header {
    background: #111; padding: 20px; color: #fff;
    border: var(--neo-border); border-radius: 12px;
    text-align: center; margin-bottom: 20px; box-shadow: var(--neo-shadow);
}
.mdhc-soft-header h2 { margin: 0 0 10px 0; font-size: 1.8rem; font-weight: 900; color: var(--clr-cyan); text-transform: uppercase;}
.mdhc-soft-header p { margin: 0; font-weight: 600; font-size: 0.95rem; color: #ccc;}

/* TOOLBAR */
.mdhc-toolbar { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
.mdhc-btn-swap, .mdhc-btn-clear {
    padding: 10px 20px; border: 2px solid #111; border-radius: 8px; font-size: 1rem; font-weight: 900;
    cursor: pointer; box-shadow: 3px 3px 0px #111; transition: 0.1s;
}
.mdhc-btn-swap { background: #111; color: var(--clr-yellow); }
.mdhc-btn-swap:active, .mdhc-btn-clear:active { transform: translate(3px, 3px); box-shadow: 0px 0px 0px #111; }
.mdhc-btn-clear { background: #fff; color: var(--clr-red); }

/* BỐ CỤC 2 CỘT */
.mdhc-main-layout { display: flex; flex-direction: column; gap: 20px; position: relative; }
.mdhc-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px;}
@media (min-width: 768px) { .mdhc-main-layout { flex-direction: row; align-items: stretch; } }

/* CARDS */
.mdhc-card {
    padding: 15px; border: var(--neo-border); background: #fff; position: relative;
    border-radius: 12px; box-shadow: var(--neo-shadow); display: flex; flex-direction: column; height: 100%; transition: 0.3s;
}
.mdhc-bg-yellow { background: var(--clr-yellow); }
.mdhc-bg-white { background: var(--clr-white); }
.mdhc-flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;}

/* SELECT BOX & BADGE */
.mdhc-select {
    appearance: none; background: #fff; border: 3px solid #111; border-radius: 6px;
    padding: 6px 15px; font-size: 1.1rem; font-weight: 900; color: #111; box-shadow: 2px 2px 0px #111; 
    cursor: pointer; text-transform: uppercase; width: auto; max-width: 40%;
}
.mdhc-select:disabled { opacity: 1; background: #eee; cursor: not-allowed; box-shadow: none; border-color: #555; color: #555;}

.mdhc-badge { background: #eee; padding: 4px 10px; border: 2px solid #111; border-radius: 6px; font-weight: 900; font-size: 0.85rem; box-shadow: 2px 2px 0px #111; white-space: nowrap; flex-shrink: 0;}
.mdhc-badge.active { background: var(--clr-green); color: #111; }
.mdhc-badge.error { background: var(--clr-red); color: #fff; }

/* NÚT TAB & COPY */
.mdhc-action-group { display: flex; gap: 8px; align-items: center;}
.mdhc-btn-tab {
    background: #fff; color: #555; padding: 6px 12px; border: 2px solid #111; border-radius: 6px;
    font-size: 0.9rem; font-weight: 900; cursor: pointer; transition: 0.2s; white-space: nowrap;
}
.mdhc-btn-tab.active { background: var(--clr-yellow); color: #111; box-shadow: 2px 2px 0px #111; }
.mdhc-btn-copy {
    background: #111; color: var(--clr-cyan); padding: 8px 15px; border: 2px solid #111; border-radius: 6px;
    font-size: 0.95rem; font-weight: 900; cursor: pointer; box-shadow: 3px 3px 0px #111; transition: 0.1s; white-space: nowrap;
}
.mdhc-btn-copy:active { transform: translate(3px, 3px); box-shadow: 0px 0px 0px #111; }

/* TEXTAREA */
.mdhc-textarea {
    width: 100%; min-height: 400px; flex: 1; padding: 15px; border: 3px solid #111; border-radius: 8px;
    font-size: 1rem; font-weight: 600; outline: none; box-shadow: inset 3px 3px 0px rgba(0,0,0,0.05); font-family: monospace; resize: vertical; line-height: 1.6; white-space: pre-wrap; background: #fff;
}
.mdhc-textarea:focus { border-color: var(--clr-cyan); box-shadow: inset 3px 3px 0px rgba(0,0,0,0.05), 0 0 0 3px #111; }
.mdhc-textarea-output { background: #fdfdfd; cursor: default; }

/* LIVE PREVIEW BOX (Giả lập giao diện Web) */
.mdhc-preview-content {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #fff; border: 3px solid #111; border-radius: 8px; padding: 20px;
    overflow-y: auto; font-family: system-ui, sans-serif; color: #333; line-height: 1.6;
}
.mdhc-preview-content h1, .mdhc-preview-content h2, .mdhc-preview-content h3 { color: #111; margin-top: 0; }
.mdhc-preview-content h2 { border-bottom: 2px dashed #ccc; padding-bottom: 5px; }
.mdhc-preview-content blockquote { border-left: 5px solid var(--clr-yellow); padding-left: 15px; color: #555; background: #fdfdfd; margin-left: 0; }
.mdhc-preview-content code { background: #eee; padding: 2px 6px; border-radius: 4px; font-family: monospace; color: #d63384; font-size: 0.9em;}
.mdhc-preview-content pre { background: #111; color: #00f5d4; padding: 15px; border-radius: 8px; overflow-x: auto; font-family: monospace; }
.mdhc-preview-content table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.mdhc-preview-content th, .mdhc-preview-content td { border: 1px solid #111; padding: 8px; text-align: left; }
.mdhc-preview-content th { background: #eee; }

/* INFO BOX */
.mdhc-info-box { background: rgba(255,255,255,0.6); padding: 15px; border: 2px dashed #111; border-radius: 8px; margin-top: 20px;}
.mdhc-info-box h4 { margin: 0 0 5px 0; font-weight: 900; color: #111; font-size: 1rem;}
.mdhc-info-box p { margin: 0; font-size: 0.9rem; font-weight: 600; line-height: 1.5; color: #333;}