:root {
  --panel: rgba(5, 30, 17, 0.9);
  --text: #effaf2;
  --muted: #9cc7ad;
  --muted-dim: rgba(156, 199, 173, 0.6);
  --gold: #f6d87c;
  --gold-2: #ffe6a0;
  --line: rgba(246, 216, 124, 0.2);
  --line-strong: rgba(246, 216, 124, 0.45);
  --radius: 16px;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% -12%, rgba(48, 190, 110, 0.28), transparent 55%),
    linear-gradient(180deg, #072f1a 0%, #04200f 58%, #02110a 100%);
  background-attachment: fixed;
  font-size: 15px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
code { color: var(--gold-2); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 13px 24px;
  background: rgba(2, 18, 10, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand { font-weight: 700; font-size: 18px; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 400; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }

.layout {
  max-width: 1320px; margin: 0 auto; padding: 20px 20px 60px;
  display: grid; grid-template-columns: minmax(420px, 1fr) minmax(360px, 520px);
  gap: 18px; align-items: start;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}
.panel { padding: 20px; }
.controls h1 { margin: 0 0 4px; color: var(--gold-2); font-size: 22px; }
.muted { color: var(--muted); font-size: 13px; }
.controls p { margin: 0 0 14px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; }
.field > span { color: var(--muted); font-size: 12.5px; }
.field em { color: var(--muted-dim); font-style: normal; }
input[type="number"], input[type="text"], select, textarea {
  width: 100%; padding: 8px 10px;
  border-radius: 9px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3); color: var(--text);
  outline: none;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(246, 216, 124, 0.15); }
input[type="range"] { width: 100%; accent-color: var(--gold); }
select option { background: #0b2a18; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.group-title {
  margin: 16px 0 9px; padding-bottom: 5px;
  color: var(--gold-2); font-size: 13px; font-weight: 700;
  border-bottom: 1px dashed var(--line);
}
.seg { display: flex; flex-direction: column; gap: 6px; }
.seg label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; }
input[type="radio"], input[type="checkbox"] { accent-color: #f6d87c; cursor: pointer; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 15px; }
.btn {
  appearance: none; cursor: pointer;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(246, 216, 124, 0.1);
  color: var(--gold-2);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { background: rgba(246, 216, 124, 0.2); transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(180deg, #f6d87c, #d9ab35); color: #24310f; border-color: #ffe6a0; font-weight: 700; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.status { min-height: 20px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.status.err { color: #ffb0a9; }
.status.ok { color: #a9f0c2; }

.warn {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(229, 83, 75, 0.5);
  background: rgba(229, 83, 75, 0.12); color: #ffd3ce; font-size: 13px;
}
.hidden { display: none !important; }

.results { display: flex; flex-direction: column; gap: 16px; }
.now-playing, .history-card { padding: 18px; }
h2 { margin: 0 0 10px; font-size: 17px; color: var(--gold-2); }
.empty { color: var(--muted-dim); font-size: 13px; padding: 12px 2px; }
.audio-card {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(0, 0, 0, 0.18); padding: 12px;
}
.audio-card + .audio-card { margin-top: 10px; }
.audio-card .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tag {
  padding: 2px 8px; border-radius: 999px; font-size: 11px;
  border: 1px solid var(--line); color: var(--gold-2);
}
.tag.rvc { border-color: rgba(246, 216, 124, 0.6); background: rgba(246, 216, 124, 0.1); }
.tag.chattts { color: #a9f0c2; border-color: rgba(169, 240, 194, 0.45); background: rgba(169, 240, 194, 0.08); }
.audio-card audio { width: 100%; margin: 4px 0 6px; }
.audio-card .meta { color: var(--muted-dim); font-size: 11.5px; word-break: break-all; }
.audio-card .links { margin-top: 6px; display: flex; gap: 10px; font-size: 12px; }
.audio-card a { color: var(--gold-2); }
.history { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.history .item {
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(0, 0, 0, 0.14); padding: 8px 10px;
}
.history .item audio { width: 100%; height: 34px; }
.history .item .meta { color: var(--muted-dim); font-size: 11px; }
.footnote { color: var(--muted-dim); font-size: 12px; margin: 0 4px; }

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
