:root{
  --bg:#0b1020;
  --card:#0f172a;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --border:rgba(148,163,184,.18);
  --accent:#60a5fa;
  --ok:#22c55e;
  --warn:#f59e0b;
  --danger:#ef4444;
  --shadow:0 18px 60px rgba(0,0,0,.35);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background: radial-gradient(900px 500px at 10% -10%, rgba(96,165,250,.18), transparent 60%),
              radial-gradient(800px 450px at 100% 0%, rgba(245,158,11,.10), transparent 55%),
              var(--bg);
}
.top{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  padding:18px 18px 10px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand{ display:flex; align-items:center; gap:12px; }
.logo{
  width:44px; height:44px;
  border-radius:12px;
  display:grid; place-items:center;
  background: rgba(96,165,250,.16);
  border: 1px solid var(--border);
  font-weight:900;
}
.name{ font-weight:800; letter-spacing:.2px; }
.tag{ color:var(--muted); font-size:13px; margin-top:2px; }
.actions{ display:flex; gap:10px; }

.wrap{ max-width:1120px; margin:0 auto; padding: 0 18px 28px; }
.card{
  background: rgba(15,23,42,.78);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 16px;
}

.grid{ display:grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 980px){
  .grid{ grid-template-columns: 1.15fr .85fr; }
}

.col{ min-width:0; }

.row{ display:flex; gap:12px; align-items:end; flex-wrap:wrap; }
.field{ display:flex; flex-direction:column; gap:8px; min-width: 230px; flex: 1; }
.field > span{ color: var(--muted); font-size: 12px; }

input{
  border: 1px solid var(--border);
  background: rgba(2,6,23,.55);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.colorRow{ display:flex; gap:10px; align-items:center; }
.colorRow input[type="text"]{ flex: 1; font-family: var(--mono); }
.colorRow input[type="color"]{
  width: 44px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
}

.rowBtns{ display:flex; gap:10px; align-items:center; padding-bottom: 2px; }

.btn{
  border: 1px solid rgba(96,165,250,.35);
  background: rgba(96,165,250,.18);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}
.btn:hover{ background: rgba(96,165,250,.24); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.btn.ghost{ background: transparent; }
.btn.danger{ border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.14); }
.btn.danger:hover{ background: rgba(239,68,68,.18); }

.previewWrap{ margin-top: 12px; }
.preview{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(2,6,23,.55);
}
.previewTitle{ font-weight: 800; font-size: 13px; opacity: .9; }
.previewText{ margin-top: 8px; font-size: 22px; line-height: 1.35; word-break: break-word; }
.previewMeta{ margin-top: 8px; color: var(--muted); font-size: 12.5px; font-family: var(--mono); }

.results{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(2,6,23,.40);
}
.resultHead{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.k{ color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .2px; }
.v{ font-size: 34px; font-weight: 900; letter-spacing: .2px; }
.badges{ display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.badge{
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148,163,184,.08);
}
.badge.ok{ border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.16); }
.badge.warn{ border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.16); }
.badge.no{ border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.14); }

.cards2{ display:grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
@media (min-width: 520px){
  .cards2{ grid-template-columns: 1fr 1fr; }
}

.mini{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(2,6,23,.55);
}
.miniRow{ display:flex; align-items:center; justify-content:space-between; margin-top: 8px; }
.miniKey{ color: var(--muted); font-family: var(--mono); font-size: 12px; }
.miniVal{ font-family: var(--mono); font-size: 12.5px; }

.meta{ color: var(--muted); font-size: 12.5px; }
.errors{
  margin-top: 12px;
  color: #fecaca;
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: pre-wrap;
}
.hint{ color: var(--muted); font-size: 12.5px; margin: 10px 2px 0; }
