/* HTML Minifier Visual — Crimson Dark */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #DC2626;
  --primary-dim: rgba(220,38,38,0.12);
  --secondary: #EF4444;
  --accent: #34D399;
  --accent-dim: rgba(52,211,153,0.12);
  --bg: #1A0808;
  --bg-card: #221010;
  --border: rgba(220,38,38,0.10);
  --text: #F1E0E0;
  --text-dim: #C4A0A0;
  --text-muted: #6B3A3A;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }

.header { border-bottom: 1px solid var(--border); background: rgba(34,16,16,0.95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 900px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.main { max-width: 900px; margin: 0 auto; padding: 20px; }

.btn { padding: 8px 16px; font-family: var(--font); font-size: 0.78rem; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-sm { padding: 5px 10px; font-size: 0.72rem; background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(220,38,38,0.2); }

.stats-bar { display: flex; gap: 8px; margin-bottom: 8px; }
.stat { flex: 1; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; }
.stat-label { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); display: block; }
.stat-val { font-size: 1rem; font-weight: 700; }
.stat-val.accent { color: var(--accent); }

.options-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.options-grid { padding: 8px 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.opt { font-size: 0.68rem; color: var(--text-dim); display: flex; align-items: center; gap: 4px; cursor: pointer; }

.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.editor { flex: 1; min-height: 200px; padding: 12px; font-family: var(--mono); font-size: 0.62rem; color: var(--text); background: transparent; border: none; outline: none; resize: vertical; line-height: 1.7; }
.editor.output { color: var(--accent); }

.breakdown-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.breakdown-list { padding: 8px 14px; }
.break-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; }
.break-label { font-size: 0.68rem; color: var(--text-dim); }
.break-val { font-size: 0.68rem; font-weight: 600; color: var(--accent); }
.break-bar { flex: 1; height: 4px; margin: 0 10px; border-radius: 2px; background: rgba(220,38,38,0.08); overflow: hidden; }
.break-bar-fill { height: 100%; border-radius: 2px; background: var(--accent); transition: width 0.3s ease; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) { .editor-grid { grid-template-columns: 1fr; } .stats-bar { flex-direction: column; } }
