/* Elegant dark theme, responsive, accessible */
:root{
  --bg: #0b0f14;
  --surface: #121826;
  --muted: #8aa0b3;
  --text: #e6eef7;
  --accent: #4da3ff;
  --accent-2: #64d2ff;
  --danger: #ff6b6b;
  --warn: #ffb86b;
  --ok: #19d27c;
  --card-radius: 14px;
  --gap: 16px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 10% -10%, #0f141f, #0b0f14 60%);
  color: var(--text);
}
.app-header{display:flex; justify-content:space-between; align-items:center; padding:24px 20px; gap:16px}
.brand{display:flex; align-items:center; gap:14px}
.logo{width:40px; height:40px}
.app-title{margin:0; font-size:1.25rem}
.app-subtitle{margin:2px 0 0; color:var(--muted); font-size:0.95rem}
.top-actions .pill{padding:8px 12px; border-radius:999px; background:#0f1725; color:var(--text); text-decoration:none; border:1px solid #1f2a3a}
.container{max-width:1000px; margin:0 auto; padding:0 20px 40px}
.card{background:linear-gradient(180deg, #121826 0%, #0f1725 100%); border:1px solid #1b2636; border-radius:var(--card-radius); padding:18px 18px; margin-bottom:16px; box-shadow: 0 10px 30px rgba(0,0,0,.25)}
.card-warn{border-color:#3a2a1b; background:linear-gradient(180deg, #1c1a14, #12100b)}
.muted{color:var(--muted)}
.form-grid{display:grid; grid-template-columns:1fr auto; gap:var(--gap) var(--gap)}
.field{display:flex; flex-direction:column}
.field.checkbox{flex-direction:row; align-items:center; gap:10px}
label{font-weight:600; margin:6px 0}
input[type=url]{background:#0e1420; color:var(--text); border:1px solid #253249; padding:12px 12px; border-radius:10px}
input[type=checkbox]{width:20px; height:20px}
.hint{color:var(--muted); font-size:0.85rem}
.actions{display:flex; align-items:flex-end}
.btn{appearance:none; border:none; background: linear-gradient(180deg, var(--accent), var(--accent-2)); color:#021425; font-weight:700; padding:12px 18px; border-radius:12px; cursor:pointer}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btn-ghost{border:1px solid #27405f; background:transparent; color:var(--text)}
.errors{margin-top:10px}
.error-item{background:rgba(255,107,107,.12); border:1px solid rgba(255,107,107,.3); padding:10px; border-radius:10px; margin:6px 0}
.result-head{display:flex; gap:16px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap}
.score{min-width:260px}
.score-number{font-size:2.6rem; font-weight:900; line-height:1}
.score-bar{margin-top:8px; height:10px; background:#142033; border-radius:999px; overflow:hidden}
.score-fill{height:100%; background: linear-gradient(90deg, #1ee3a5, #37b5ff)}
.badge{display:inline-block; margin-top:8px; padding:4px 10px; border-radius:999px; font-weight:700}
.badge.pass{background:rgba(25,210,124,.15); color:#19d27c}
.badge.ok{background:rgba(255,184,107,.15); color:#ffb86b}
.badge.needs attention,.badge.needs-attention{background:rgba(255,107,107,.15); color:#ff6b6b}
.grid{display:grid; gap:18px}
.grid.two-cols{grid-template-columns:1fr 1fr}
@media (max-width: 800px){.form-grid{grid-template-columns:1fr} .grid.two-cols{grid-template-columns:1fr}}
.checks{list-style:none; padding:0; margin:0}
.check{display:flex; flex-direction:column; gap:4px; padding:10px; margin-bottom:8px; border:1px solid #1b2a3d; border-radius:10px}
.check.pass{border-color:rgba(25,210,124,.3)}
.check.fail{border-color:rgba(255,107,107,.3)}
.check.info{border-color:#1b2a3d}
.check-label{font-weight:700}
.check-message{color:var(--muted)}
.tips{margin:0; padding-left:20px}
.kv{display:flex; flex-direction:column; gap:10px}
.kv-row{display:grid; grid-template-columns:160px 1fr; gap:10px; padding:8px; background:#0e1522; border:1px solid #1b2a3d; border-radius:10px}
.k{color:#a6bbcf}
.v{color:#dce7f3}
.code{background:#0a111c; color:#bfe1ff; border:1px solid #17253a; border-radius:10px; padding:12px; max-height:300px; overflow:auto}
.copy-wrap{display:flex; justify-content:flex-end}
.history{list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px}
.history li{display:grid; grid-template-columns:160px 1fr auto auto; gap:10px; padding:8px; border:1px solid #1b2a3d; border-radius:10px}
.history .when{color:var(--muted)}
.history .url{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.score-mini{font-weight:800}
.footer{opacity:.8; text-align:center; margin:16px 0}
.export{margin-top:14px; display:flex; gap:10px}
