:root{
  --bg:#0b0c10;
  --card:#12131a;
  --muted:#9aa3b2;
  --text:#eef1f7;
  --line:rgba(255,255,255,.08);
  --accent:#7aa7ff;
  --accent2:#7cffc8;
  --shadow: 0 10px 30px 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 800px at 20% 0%, rgba(122,167,255,.18), transparent 45%),
              radial-gradient(900px 700px at 85% 20%, rgba(124,255,200,.12), transparent 48%),
              var(--bg);
  color:var(--text);
  font-family:var(--sans);
}

.header{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(11,12,16,.65);
  border-bottom:1px solid var(--line);
}

.header-inner{
  max-width:1100px;
  margin:0 auto;
  padding:16px 18px;
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
}

h1{ margin:0; font-size:20px; letter-spacing:.2px; }
.sub{ margin:6px 0 0 0; color:var(--muted); font-size:13px; line-height:1.35; max-width:62ch; }

.container{
  max-width:1100px;
  margin:0 auto;
  padding:18px;
  display:grid;
  grid-template-columns: 1fr 1.35fr;
  gap:16px;
}

@media (max-width: 900px){
  .container{ grid-template-columns:1fr; }
  .header-inner{ flex-direction:column; align-items:stretch; }
}

.panel{
  background: rgba(18,19,26,.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

.label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:8px;
}

.input{
  width:100%;
  border-radius:14px;
  padding:12px 12px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  color:var(--text);
  outline:none;
}
.input:focus{ border-color: rgba(122,167,255,.5); box-shadow: 0 0 0 4px rgba(122,167,255,.12); }

.row{ display:flex; gap:14px; margin-top:12px; align-items:stretch; }
.grow{ flex:1; min-width: 220px; }

.select{
  width:100%;
  border-radius:14px;
  padding:10px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  color:var(--text);
  outline:none;
}
.select option, .select optgroup{ background: #0f1117; color:var(--text); }
.select:focus{ border-color: rgba(122,167,255,.5); box-shadow: 0 0 0 4px rgba(122,167,255,.10); }

.meta{
  width: 230px;
  display:flex;
  flex-direction:column;
  gap:10px;
  justify-content:flex-start;
}
@media (max-width: 900px){ .meta{ width:auto; } }

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.05);
  border:1px solid var(--line);
  color: var(--muted);
  font-size:12px;
  width: fit-content;
}
.small{ color:var(--muted); font-size:12px; line-height:1.35; }

.btn{
  border:0;
  border-radius:14px;
  padding:11px 12px;
  background: linear-gradient(135deg, rgba(122,167,255,.95), rgba(124,255,200,.75));
  color:#0a0b10;
  font-weight:700;
  cursor:pointer;
}
.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }

.filebox{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-end;
}
.filelabel{
  display:inline-flex;
  cursor:pointer;
  border-radius:999px;
  padding:10px 12px;
  background: rgba(255,255,255,.05);
  border:1px solid var(--line);
  color: var(--text);
  font-size:12px;
}
#fileInput{ display:none; }
.hint{ color: var(--muted); font-size:12px; }
code{ font-family:var(--mono); font-size: 12px; }

.titleRow{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  border-bottom:1px solid var(--line);
  padding-bottom:10px;
  margin-bottom:12px;
}
h2{ margin:0; font-size:18px; }
.prompts{ display:flex; flex-direction:column; gap:12px; }
.prompt{
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.03);
}
.prompt h3{
  margin:0 0 8px 0;
  font-size:14px;
}
.prompt .metaLine{
  color: var(--muted);
  font-size:12px;
  margin-bottom:8px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.prompt p{
  margin:0;
  white-space:pre-wrap;
  line-height:1.5;
  color: rgba(238,241,247,.92);
}

.empty{
  display:none;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.02);
}
