* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

.dw-h2m-wrapper { max-width: 1200px; margin: auto; padding: 50px 15px; font-family: 'Inter', sans-serif; }

/* 🚀 PREMIUM HOVER EFFECT */
.dw-h2m-card { background: #fff; padding: 35px; border-radius: 24px; border: 1px solid #e2e8f0; box-shadow: 0 15px 40px rgba(0,0,0,0.04); transition: 0.3s ease-in-out; }
.dw-h2m-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px rgba(37, 99, 235, 0.12); border-color: #bfdbfe; }

/* HEADER */
.dw-h2m-header { text-align: center; margin-bottom: 35px; }
.dw-badge { background: #eff6ff; color: #2563eb; padding: 6px 16px; border-radius: 50px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 15px; border: 1px solid #bfdbfe; }
.dw-h2m-header h2 { font-size: 34px; font-weight: 800; color: #0f172a; margin: 0 0 10px 0; }
.dw-h2m-header p { color: #64748b; font-size: 16px; max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* OPTIONS PANEL */
.dw-h2m-options { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; padding: 20px 25px; background: #f8fafc; border-radius: 16px; border: 1px solid #e2e8f0; justify-content: space-between; align-items: center; }
.option-group { display: flex; flex-direction: column; gap: 6px; }
.option-group label { font-size: 13px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.option-group select { padding: 10px 15px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; font-size: 14px; color: #0f172a; outline: none; cursor: pointer; transition: 0.3s; font-weight: 500; }
.option-group select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.checkbox-group { justify-content: center; padding-top: 10px; }
.dw-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: #0f172a; user-select: none; transition: 0.2s;}
.dw-checkbox input[type="checkbox"] { width: 18px; height: 18px; accent-color: #2563eb; cursor: pointer; }

/* GRID LAYOUT */
.dw-h2m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.dw-h2m-col { display: flex; flex-direction: column; gap: 15px; }

/* COLUMN HEADERS */
.dw-col-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #0f172a; padding: 0 5px; }
.dw-col-header i { color: #2563eb; margin-right: 5px; }
.dw-header-actions { display: flex; gap: 10px; }

/* TEXTAREAS */
textarea { width: 100%; height: 350px; padding: 20px; border-radius: 16px; border: 2px solid #e2e8f0; background: #f8fafc; font-size: 14px; color: #334155; resize: none; outline: none; font-family: monospace; transition: 0.3s; line-height: 1.6; }
textarea:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
#outputMD { background: #f1f5f9; cursor: text; }

/* BUTTONS */
.dw-btn-primary { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; border: none; padding: 16px; border-radius: 14px; font-weight: 700; cursor: pointer; transition: 0.3s; font-size: 16px; display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; box-shadow: 0 4px 15px rgba(37,99,235,0.2); }
.dw-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3); }
.icon-btn { background: #e2e8f0; border: none; width: 35px; height: 35px; border-radius: 8px; cursor: pointer; color: #475569; transition: 0.3s; display: flex; justify-content: center; align-items: center; }
.icon-btn:hover { background: #cbd5e1; color: #0f172a; }

/* STATS */
.dw-h2m-stats { display: flex; gap: 15px; margin-top: auto; }
.stat-box { flex: 1; background: #f8fafc; padding: 15px; border-radius: 14px; text-align: center; border: 1px solid #e2e8f0; transition: 0.3s; }
.stat-box:hover { transform: translateY(-4px); border-color: #bfdbfe; box-shadow: 0 10px 20px rgba(0,0,0,0.03); }
.stat-box p { font-size: 12px; color: #64748b; font-weight: 700; text-transform: uppercase; margin-bottom: 5px; }
.stat-box span { font-size: 22px; font-weight: 800; color: #0f172a; }
.stat-box.highlight { background: #eff6ff; border-color: #bfdbfe; }
.stat-box.highlight span { color: #2563eb; }

/* SCROLLBAR */
textarea::-webkit-scrollbar { width: 8px; }
textarea::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* TOAST */
.dw-toast { visibility: hidden; min-width: 250px; background-color: #10b981; color: #fff; text-align: center; border-radius: 10px; padding: 16px; position: fixed; z-index: 1000; left: 50%; bottom: 30px; transform: translateX(-50%); font-weight: 600; box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3); opacity: 0; transition: opacity 0.3s, bottom 0.3s; }
.dw-toast.show { visibility: visible; opacity: 1; bottom: 50px; }

/* ===============================
   🔥 BULLETPROOF MEDIA QUERIES
================================ */
@media (max-width: 992px) {
    .dw-h2m-grid { grid-template-columns: 1fr; gap: 40px; }
    textarea { height: 250px; }
    .dw-h2m-options { flex-direction: column; align-items: flex-start; }
    .option-group { width: 100%; }
    .option-group select { width: 100%; }
}
@media (max-width: 768px) {
    .dw-h2m-wrapper { padding: 30px 15px; }
    .dw-h2m-header h2 { font-size: 28px; }
}
@media (max-width: 576px) {
    .dw-h2m-card { padding: 25px 15px; }
    .dw-h2m-stats { flex-wrap: wrap; }
    .stat-box { min-width: 45%; }
}
@media (max-width: 360px) {
    .dw-h2m-header h2 { font-size: 24px; }
    .stat-box { min-width: 100%; }
}