:root{
  --bg:#0b0f17;
  --card:#121a27;
  --muted:#93a4bd;
  --text:#e8f0ff;
  --line:#243044;
  --accent:#6aa9ff;
  --accent2:#7cffc5;
  --warn:#ffcc66;
  --bad:#ff6a6a;
  --ok:#7cffc5;
  --shadow: 0 12px 28px rgba(0,0,0,.35);
  --radius: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(106,169,255,.15), transparent 60%),
              radial-gradient(800px 400px at 80% 0%, rgba(124,255,197,.10), transparent 55%),
              var(--bg);
  color:var(--text);
  font-family:var(--sans);
}
.wrap{max-width:980px;margin:0 auto;padding:22px}
.brand{display:flex;gap:14px;align-items:center}
.logo{
  width:46px;height:46px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background: linear-gradient(135deg, rgba(106,169,255,.35), rgba(124,255,197,.25));
  border:1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  font-weight:800;letter-spacing:.5px;
}
h1{margin:0;font-size:22px}
.sub{margin:6px 0 0;color:var(--muted);font-size:14px}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}
.tabs{display:flex;gap:8px;margin-bottom:14px}
.tab{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}
.tab.active{border-color: rgba(106,169,255,.6); background: rgba(106,169,255,.10)}
.panel.hidden{display:none}
.row{display:flex;gap:16px;align-items:stretch}
.col{flex:1}
.previewCol{max-width:340px}
.label{display:block;margin:0 0 8px;font-weight:700}
input[type="file"], input[type="url"]{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  color: var(--text);
}
.hint{margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.4}
.previewBox{
  position:relative;
  width:100%;
  aspect-ratio: 4/3;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.18);
  background: rgba(0,0,0,.12);
  overflow:hidden;
}
.previewBox img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:none;
}
.placeholder{
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  color: rgba(147,164,189,.9);
  font-size:13px;
}
.actions{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.btn{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.14);
  color:var(--text);
  padding:10px 12px;border-radius:12px;
  cursor:pointer;
}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.primary{
  border-color: rgba(106,169,255,.6);
  background: rgba(106,169,255,.14);
}
.privacy, .debug{margin-top:14px}
.privacy summary, .debug summary{cursor:pointer;color:var(--muted)}
.privacy ul{margin:10px 0 0}
.resultHeader{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.badgeWrap{display:flex;align-items:center}
.badge{
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-weight:700;font-size:13px;
  background: rgba(0,0,0,.14);
}
.badge.ok{border-color: rgba(124,255,197,.55); background: rgba(124,255,197,.10)}
.badge.bad{border-color: rgba(255,106,106,.55); background: rgba(255,106,106,.10)}
.badge.warn{border-color: rgba(255,204,102,.55); background: rgba(255,204,102,.10)}
.meter{margin-top:14px}
.meterBar{
  height:12px;border-radius:999px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  overflow:hidden;
}
.meterFill{
  height:100%;
  background: linear-gradient(90deg, rgba(124,255,197,.85), rgba(255,204,102,.85), rgba(255,106,106,.85));
}
.meterLabels{
  margin-top:6px;
  display:flex;justify-content:space-between;
  color:var(--muted);font-size:12px;
}
.grid2{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width: 820px){
  .row{flex-direction:column}
  .previewCol{max-width:none}
  .grid2{grid-template-columns:1fr}
}
h2{margin:0}
h3{margin:0 0 8px;font-size:15px}
.list{margin:0;padding-left:18px;color:var(--text)}
.list li{margin:6px 0;color:rgba(232,240,255,.92);line-height:1.35}
.pre{
  margin:10px 0 0;
  padding:12px;
  border-radius:12px;
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
  overflow:auto;
  font-family:var(--mono);
  font-size:12px;
  color: rgba(232,240,255,.92);
}
.foot{margin-top:16px;color:var(--muted);font-size:13px;line-height:1.45}
