:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface2: #ffffff;
  --border: #e3e8f0;
  --text: #0f172a;
  --muted: #5b6878;
  --accent: #2563eb;
  --success: #059669;
  --danger: #dc2626;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; }

nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 20px; }
.nav-inner { max-width: 860px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { font-weight: 700; font-size: 1.1rem; }
.nav-badge { font-size: .75rem; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }

.container { max-width: 860px; margin: 0 auto; padding: 28px 20px; }

/* MAIN CARD */
.main-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.input-section { margin-bottom: 18px; }
.field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.input-row { display: flex; gap: 8px; }
.big-input { flex: 1; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-size: 1.4rem; padding: 12px 18px; border-radius: var(--radius); outline: none; font-family: 'Consolas', monospace; transition: border-color .15s; }
.big-input:focus { border-color: var(--accent); }
.btn-clear { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); width: 44px; border-radius: var(--radius); cursor: pointer; font-size: 1rem; transition: color .15s; }
.btn-clear:hover { color: var(--danger); }
.input-error { font-size: .82rem; color: var(--danger); min-height: 20px; padding-top: 4px; }

/* OPTIONS */
.options-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 18px; align-items: center; }
.option-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.opt-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.radio-label, .checkbox-label { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: .875rem; color: var(--muted); transition: color .15s; }
.radio-label:hover, .checkbox-label:hover { color: var(--text); }
.radio-label input, .checkbox-label input { accent-color: var(--accent); }
select { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 5px; font-size: .875rem; outline: none; cursor: pointer; }
select:focus { border-color: var(--accent); }

/* RESULT */
.result-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 72px; }
.result-text { font-size: 1.05rem; line-height: 1.6; flex: 1; color: var(--success); }
.result-text.placeholder { color: var(--muted); font-size: .9rem; }
.copy-btn { background: var(--accent); border: none; color: #fff; padding: 8px 18px; border-radius: var(--radius); cursor: pointer; font-size: .85rem; font-weight: 600; flex-shrink: 0; transition: opacity .15s; }
.copy-btn:hover { opacity: .85; }

/* EXAMPLES */
.examples-section { margin-bottom: 20px; }
.section-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.examples-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.example-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: .875rem; font-family: monospace; transition: background .15s, border-color .15s; }
.example-btn:hover { background: var(--surface2); border-color: var(--accent); }

/* BATCH */
.batch-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.batch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.col-label { font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; }
.batch-area { width: 100%; height: 180px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: monospace; font-size: .875rem; padding: 12px; outline: none; resize: vertical; border-radius: var(--radius); }
.batch-area:focus { border-color: var(--accent); }
.output-area { color: var(--success); cursor: default; }
.btn-sm { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 4px 10px; border-radius: 5px; cursor: pointer; font-size: .78rem; transition: background .15s; }
.btn-sm:hover { background: var(--border); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 600px) {
  .batch-grid { grid-template-columns: 1fr; }
  .big-input { font-size: 1.1rem; }
}
