:root{
  --bg:#080b12;
  --panel:rgba(17,22,34,.78);
  --panel-2:#111726;
  --line:rgba(255,255,255,.085);
  --text:#f6f7fb;
  --muted:#919aab;
  --accent:#8a7dff;
  --accent2:#51d6c5;
  --danger:#ff6f91;
  --shadow:0 24px 80px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 15% 10%,rgba(88,77,180,.15),transparent 28%),
    radial-gradient(circle at 85% 25%,rgba(52,173,157,.10),transparent 25%),
    var(--bg);
  color:var(--text);
  font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
}
button,input,textarea{font:inherit}
button{cursor:pointer}
.bg-orb{position:fixed;border-radius:50%;filter:blur(90px);pointer-events:none;opacity:.23}
.orb-a{width:380px;height:380px;background:#655cf2;left:-160px;top:230px}
.orb-b{width:340px;height:340px;background:#20bca9;right:-170px;top:520px}
.topbar{
  height:76px;display:flex;align-items:center;justify-content:space-between;
  max-width:1280px;margin:auto;padding:0 28px;border-bottom:1px solid var(--line)
}
.brand{display:flex;align-items:center;gap:12px}
.brand-mark{
  width:38px;height:38px;border-radius:12px;display:grid;place-items:center;
  font-weight:900;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#071015;
  box-shadow:0 8px 30px rgba(104,97,255,.35)
}
.brand strong{display:block;font-size:15px;letter-spacing:.02em}
.brand small{display:block;color:var(--muted);font-size:10px;margin-top:3px;letter-spacing:.12em}
.layout{max-width:1280px;margin:auto;padding:74px 28px 80px}
.hero{max-width:850px;margin-bottom:70px}
.eyebrow{font-size:11px;letter-spacing:.2em;color:#9ba3b7;text-transform:uppercase}
.hero h1{font-size:clamp(44px,6vw,82px);line-height:1.02;margin:15px 0 22px;letter-spacing:-.045em}
.hero h1 em{font-style:normal;color:transparent;background:linear-gradient(90deg,#b5adff,#5fe1d0);background-clip:text;-webkit-background-clip:text}
.hero p{font-size:17px;line-height:1.8;color:var(--muted);max-width:720px}
.section-title{display:flex;justify-content:space-between;align-items:end;margin-bottom:20px}
.section-title h2,.panel-head h2{margin:6px 0 0;font-size:22px}
.agent-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:54px}
.agent-card{
  position:relative;min-height:185px;border:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.015));
  border-radius:20px;padding:20px;text-align:left;color:var(--text);transition:.2s ease;overflow:hidden
}
.agent-card:hover{transform:translateY(-3px);border-color:rgba(138,125,255,.45)}
.agent-card.active{border-color:rgba(138,125,255,.78);box-shadow:inset 0 0 0 1px rgba(138,125,255,.22),0 20px 40px rgba(0,0,0,.2)}
.agent-card.active:after{
  content:"已选择";position:absolute;right:13px;top:13px;font-size:10px;padding:5px 8px;border-radius:999px;
  background:rgba(138,125,255,.16);color:#c1bbff;border:1px solid rgba(138,125,255,.28)
}
.agent-no{font-size:11px;color:#687086;letter-spacing:.12em}
.agent-card h3{font-size:17px;margin:28px 0 9px}
.agent-card p{font-size:12px;line-height:1.7;color:var(--muted);margin:0}
.agent-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:16px}
.agent-tags span{font-size:10px;color:#b7becc;padding:4px 7px;border-radius:999px;background:rgba(255,255,255,.045)}
.workspace{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:16px}
.panel{border:1px solid var(--line);background:var(--panel);backdrop-filter:blur(18px);border-radius:22px;padding:22px;box-shadow:var(--shadow)}
.panel-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}
.counter,.status-badge{font-size:11px;color:#a8b0bf;border:1px solid var(--line);padding:6px 9px;border-radius:999px}
textarea{
  width:100%;height:390px;resize:vertical;border:1px solid var(--line);outline:none;border-radius:16px;
  background:#0a0f19;color:#e8ebf2;padding:17px;line-height:1.8;font-size:14px
}
textarea:focus,input:focus{border-color:rgba(138,125,255,.6);box-shadow:0 0 0 3px rgba(138,125,255,.09)}
.input-actions,.result-actions,.dialog-actions{display:flex;gap:9px;margin-top:12px}
.ghost-btn,.file-btn,.icon-btn{
  border:1px solid var(--line);background:rgba(255,255,255,.035);color:#dce0e9;padding:9px 13px;border-radius:11px;font-size:12px
}
.file-btn{display:inline-flex;align-items:center;cursor:pointer}
.quality-row{display:flex;align-items:center;justify-content:space-between;margin:22px 0 13px;color:#b8c0ce;font-size:13px}
.segmented{display:flex;padding:3px;border-radius:10px;background:#090e17;border:1px solid var(--line)}
.segmented button{border:0;background:transparent;color:#777f90;font-size:11px;padding:7px 10px;border-radius:7px}
.segmented button.active{background:#20273a;color:#fff}
.primary-btn{
  width:100%;border:0;border-radius:13px;padding:14px 17px;display:flex;align-items:center;justify-content:center;gap:12px;
  background:linear-gradient(100deg,#7b70ff,#55d8c6);color:#061012;font-weight:800
}
.primary-btn:disabled{opacity:.5;cursor:not-allowed}
.privacy-note{color:#626c80;font-size:10px;line-height:1.7;text-align:center;margin:11px 0 0}
.output-panel{min-height:610px;display:flex;flex-direction:column}
.empty-state{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#657086;text-align:center}
.empty-icon{font-size:40px;color:#7f76e8;margin-bottom:6px}
.empty-state h3{color:#abb2c1;font-size:15px;margin:8px}
.empty-state p{font-size:12px}
.result-box{
  flex:1;margin:0;white-space:pre-wrap;word-break:break-word;background:#090e17;border:1px solid var(--line);
  border-radius:16px;padding:18px;min-height:500px;max-height:720px;overflow:auto;color:#dce2ec;font:13px/1.85 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace
}
.hidden{display:none!important}
.status-badge.loading{color:#d3ceff;border-color:rgba(138,125,255,.33)}
.status-badge.success{color:#70e1c6;border-color:rgba(81,214,197,.3)}
.status-badge.error{color:#ff94ad;border-color:rgba(255,111,145,.32)}
dialog{border:0;background:transparent;color:var(--text);padding:0}
dialog::backdrop{background:rgba(1,4,9,.76);backdrop-filter:blur(8px)}
.dialog-card{width:min(540px,calc(100vw - 30px));background:#111722;border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:var(--shadow)}
.icon-btn{width:34px;height:34px;padding:0;font-size:20px}
.switch-row{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.switch-row strong{display:block;font-size:13px}
.switch-row small{display:block;font-size:11px;color:var(--muted);line-height:1.6;margin-top:5px}
.switch-row input{accent-color:#8a7dff}
.field-wrap{margin:18px 0}
.field-wrap label{display:block;font-size:11px;color:#9da5b4;margin-bottom:7px}
.field-wrap input{width:100%;background:#090e17;border:1px solid var(--line);border-radius:11px;padding:12px;color:#fff;outline:none}
footer{max-width:1280px;margin:auto;padding:22px 28px 40px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:#545d70;font-size:10px;letter-spacing:.1em}
@media(max-width:980px){.agent-grid{grid-template-columns:repeat(2,1fr)}.workspace{grid-template-columns:1fr}}
@media(max-width:620px){
  .layout{padding:46px 16px 60px}.topbar{padding:0 16px}.brand small{display:none}.agent-grid{grid-template-columns:1fr}
  .hero h1{font-size:44px}.workspace{gap:12px}.panel{padding:16px}textarea{height:320px}footer{padding:20px 16px}
}
