* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
.dw-b64-wrapper { max-width: 1100px; margin: auto; padding: 50px 15px; font-family: 'Inter', sans-serif; }

/* HEADER */
.dw-b64-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-b64-header h2 { font-size: 34px; font-weight: 800; color: #0f172a; margin: 0 0 10px 0; }
.dw-b64-header p { color: #64748b; font-size: 16px; max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* GRID & CARDS */
.dw-b64-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.dw-card { background: #fff; padding: 30px; border-radius: 24px; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(0,0,0,0.03); transition: 0.3s ease-in-out; display: flex; flex-direction: column; }
.dw-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(37, 99, 235, 0.08); border-color: #bfdbfe; }

/* COL HEADERS */
.dw-col-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #0f172a; margin-bottom: 15px; }
.dw-col-header i { color: #2563eb; margin-right: 5px; }
.dw-header-actions { display: flex; gap: 10px; }

/* TEXTAREAS */
.dw-textarea { width: 100%; height: 100%; min-height: 400px; padding: 18px; border-radius: 14px; border: 2px solid #e2e8f0; background: #f8fafc; font-size: 15px; color: #334155; resize: none; outline: none; font-family: monospace; transition: 0.3s; line-height: 1.5; word-break: break-all; }
.dw-textarea:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
.output-area { background: #f1f5f9; cursor: text; }
.ts-subtext { font-size: 12px; color: #94a3b8; font-weight: 600; }

/* SMART IMAGE PREVIEW */
.dw-image-preview { margin-top: 15px; padding: 20px; border-radius: 16px; background: #f8fafc; border: 2px dashed #cbd5e1; text-align: center; animation: fadeIn 0.4s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.preview-header { font-weight: 700; color: #0f172a; margin-bottom: 15px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 14px; }
.preview-header i { color: #10b981; }
.dw-image-preview img { max-width: 100%; max-height: 300px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 15px; }
.image-meta { display: inline-block; background: #e2e8f0; color: #475569; padding: 5px 12px; border-radius: 50px; font-size: 12px; font-weight: 600; }

/* BUTTONS */
.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; }

/* 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; }

/* MEDIA QUERIES */
@media (max-width: 992px) { .dw-b64-grid { grid-template-columns: 1fr; } .dw-textarea { min-height: 250px; } }
@media (max-width: 576px) { .dw-card { padding: 20px 15px; } .dw-b64-header h2 { font-size: 26px; } }