/* JSON → TypeScript — Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #3B82F6; --primary-light: #60A5FA;
  --accent: #10B981; --accent-glow: rgba(16,185,129,0.15);
  --success: #10B981; --danger: #EF4444; --warning: #F59E0B;
  --bg: #0B1120; --bg-card: rgba(255,255,255,0.04);
  --bg-glass: rgba(255,255,255,0.06); --border: rgba(255,255,255,0.08);
  --text: #E8E8E8; --text-dim: #9CA3AF; --text-muted: #6B7280;
  --radius: 12px; --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', monospace;
  --shadow: 0 4px 24px rgba(0,0,0,0.3); --transition: 250ms ease;
}
html { font-size: 16px; } body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }

.header { position: sticky; top: 0; z-index: 100; background: rgba(11,17,32,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.header__inner { max-width: 1100px; margin: 0 auto; padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.header__brand { display: flex; align-items: center; gap: 0.6rem; }
.header__icon { font-size: 1.3rem; } .header__title { font-size: 1.15rem; font-weight: 700; }
.header__actions { display: flex; gap: 0.5rem; }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; border: none; cursor: pointer; font-family: var(--font); font-size: 0.85rem; font-weight: 500; border-radius: var(--radius-sm); transition: all var(--transition); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--ghost { background: var(--bg-glass); color: var(--text-dim); padding: 0.5rem 0.85rem; border: 1px solid var(--border); }
.btn--ghost:hover:not(:disabled) { background: rgba(255,255,255,0.1); color: var(--text); }
.btn--accent { background: var(--primary); color: #fff; padding: 0.55rem 1.1rem; font-weight: 600; }
.btn--accent:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn--sm { font-size: 0.78rem; padding: 0.35rem 0.7rem; }

.main { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 700px) { .split { grid-template-columns: 1fr; } }

.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; border-top: 1px solid var(--border); }
.status { font-size: 0.78rem; color: var(--text-muted); }
.status--error { color: var(--danger); }
.status--ok { color: var(--success); }

.code-area { width: 100%; flex: 1; min-height: 300px; padding: 0.85rem; background: rgba(0,0,0,0.3); border: none; color: var(--text); font-family: var(--mono); font-size: 0.82rem; line-height: 1.6; resize: vertical; }
.code-area:focus { outline: none; }
.code-area--output { overflow: auto; resize: none; margin: 0; }
.code-area--output code { white-space: pre; }

.options { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 0.75rem; padding: 0.6rem 0.85rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.opt { font-size: 0.82rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.opt input[type="checkbox"] { accent-color: var(--primary); cursor: pointer; }
.opt-input { width: 80px; padding: 0.25rem 0.5rem; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-family: var(--mono); font-size: 0.8rem; }
.opt-input:focus { outline: none; border-color: var(--primary); }

.section-title { font-size: 0.9rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.history-list { display: flex; flex-direction: column; gap: 0.35rem; }
.history-item { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); }
.history-item:hover { border-color: rgba(255,255,255,0.16); }
.history-item__name { font-size: 0.82rem; font-weight: 500; }
.history-item__time { font-size: 0.72rem; color: var(--text-muted); }
.history-empty { font-size: 0.82rem; color: var(--text-muted); }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 0.6rem 1.25rem; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow); z-index: 500; animation: toastIn 300ms ease; }
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 600px) { .main { padding: 1rem; } }
