:root{
  --bg1:#0b0f1a;
  --bg2:#060814;
  --card: rgba(255,255,255,0.06);
  --stroke: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% 10%, rgba(59,130,246,0.25), transparent 60%),
              radial-gradient(900px 600px at 80% 30%, rgba(168,85,247,0.20), transparent 55%),
              linear-gradient(180deg, var(--bg1), var(--bg2));
  min-height: 100vh;
}

.wrap{
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 18px 40px;
}

.hero{ text-align:center; margin-bottom: 18px; }
.brand{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  font-weight: 700;
}
h1{ margin: 14px 0 10px; font-size: 34px; line-height: 1.08; }
.sub{ margin: 0 auto; max-width: 800px; color: var(--muted); font-size: 15px; }
.hint{ display:inline-block; opacity:0.9; margin-left:6px; }

.card{
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

.label{ font-size: 13px; opacity: 0.85; margin-bottom: 8px; }
.mini{ font-size: 12px; opacity:0.7; margin-left:6px; }

.file{
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.previewWrap{
  margin-top: 12px;
  display:flex;
  justify-content:center;
  align-items:center;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  padding: 10px;
}
.previewWrap img{
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 14px;
  display:block;
}

.byok{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.byok label{ font-size: 13px; opacity: 0.85; }
.byok input{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  outline: none;
}
.byok input:focus{ border-color: rgba(59,130,246,0.45); }
.byok-note{ font-size: 12px; opacity: 0.7; line-height: 1.35; }

.btn{
  margin-top: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(59,130,246,0.20);
  color: var(--text);
  font-weight: 700;
  cursor:pointer;
}
.btn:hover{ background: rgba(59,130,246,0.28); }
.btn:disabled{ opacity: 0.55; cursor:not-allowed; }
.btn.ghost{ background: rgba(255,255,255,0.06); }
.btn.ghost:hover{ background: rgba(255,255,255,0.10); }

.progressWrap{
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  overflow:hidden;
}
.progressBar{
  height: 100%;
  width: 0%;
  background: rgba(34,197,94,0.75);
  transition: width 0.2s ease;
}

.status{ margin-top: 10px; font-size: 13px; opacity: 0.8; }
.disclaimer{ margin-top: 12px; font-size: 12px; opacity: 0.7; line-height: 1.35; }

.resultTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 8px;
}
.badge{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  opacity: 0.9;
}
.badge.ai{ border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.12); }
.badge.real{ border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.12); }
.badge.uncertain{ border-color: rgba(59,130,246,0.35); background: rgba(59,130,246,0.12); }

.meter{ margin-bottom: 10px; }
.meterTrack{
  width:100%;
  height: 12px;
  border-radius: 999px;
  overflow:hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.meterFill{
  height: 100%;
  width: 0%;
  background: rgba(168,85,247,0.75);
  transition: width 0.25s ease;
}
.meterMeta{
  margin-top: 8px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size: 12px;
  opacity: 0.8;
}
.cachedTag{
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.textarea{
  width:100%;
  min-height: 300px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.22);
  color: var(--text);
  outline:none;
  resize: vertical;
}

.actions{ margin-top: 12px; display:flex; gap: 10px; }

.notice{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
}
.notice.success{ border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.12); }
.notice.info{ border-color: rgba(59,130,246,0.35); background: rgba(59,130,246,0.12); }
.notice.error{ border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.12); }
.notice small{ display:block; opacity:0.8; margin-top:6px; }

.tiny{ margin-top: 10px; font-size: 12px; opacity: 0.75; }

.footer{
  margin-top: 18px;
  display:flex;
  justify-content:center;
  gap: 10px;
  flex-wrap:wrap;
  color: rgba(255,255,255,0.70);
  font-size: 13px;
}
.footer a{ color: rgba(255,255,255,0.80); text-decoration:none; }
.footer a:hover{ text-decoration: underline; }
