:root {
  --bg: #0e0e12;
  --bg2: #16161d;
  --card: #1c1c26;
  --card2: #23232f;
  --line: #2c2c3a;
  --txt: #e9e9f0;
  --muted: #9a9ab0;
  --gold: #f5c542;
  --gold2: #ffd874;
  --gold-dim: #8a6d1f;
  --blue: #5b8cff;
  --green: #3ddc84;
  --red: #ff5c6c;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #21180a 0%, var(--bg) 55%) fixed;
  color: var(--txt); line-height: 1.6; min-height: 100vh;
}
a { color: var(--gold2); text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 22px;
  border-bottom: 1px solid var(--line); background: rgba(20,20,28,.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.brand { font-weight: 800; font-size: 18px; color: var(--gold); letter-spacing: .5px; }
.brand small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 8px; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.nav a, .nav button {
  font-size: 13px; color: var(--muted); padding: 7px 12px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
}
.nav a:hover, .nav button:hover { color: var(--txt); border-color: var(--line); }
.nav a.active { color: #1a1408; background: var(--gold); border-color: var(--gold); font-weight: 700; }
h1 { font-size: 26px; margin: 18px 0 6px; }
h2 { font-size: 18px; margin: 22px 0 10px; color: var(--gold2); }
h3 { font-size: 15px; margin: 14px 0 8px; color: var(--txt); }
.sub { color: var(--muted); margin: 0 0 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px;
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1a1408; font-weight: 700;
  border: none; border-radius: 10px; padding: 11px 18px; cursor: pointer; font-size: 14px;
  transition: transform .05s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--txt); border: 1px solid var(--line); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
textarea, input[type=text], input[type=number], select {
  width: 100%; background: var(--bg2); color: var(--txt); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical;
}
textarea { min-height: 150px; }
label { font-size: 13px; color: var(--muted); display: block; margin: 10px 0 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; min-width: 160px; }
img.thumb { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; background: #000; }
.asset-card { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.asset-card .meta { font-size: 12px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.spinner {
  width: 14px; height: 14px; border: 2px solid rgba(0,0,0,.25); border-top-color: #1a1408;
  border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#status { font-size: 13px; color: var(--muted); margin: 10px 0; min-height: 20px; }
#log {
  background: #0a0a0e; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  height: 160px; overflow: auto; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
  color: #c8c8d8; white-space: pre-wrap; margin-top: 10px;
}
.log-line.log-err { color: var(--red); }
.log-line.log-done { color: var(--green); }
.log-line.log-step { color: var(--gold2); }
.toast {
  background: var(--card2); color: var(--txt); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 6px 24px rgba(0,0,0,.4);
  animation: toastIn .2s ease; max-width: 80vw;
}
.toast-success { border-color: var(--green); }
.toast-error { border-color: var(--red); }
.toast-info { border-color: var(--blue); }
.toast-hide { opacity: 0; transition: opacity .5s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--gold-dim); color: #1a1408; margin-left: 6px; font-weight: 700; }
.feature-card {
  background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; cursor: pointer; transition: border-color .15s, transform .1s;
  display: block; color: var(--txt);
}
.feature-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.feature-card .ico { font-size: 26px; }
.feature-card h3 { margin: 8px 0 4px; color: var(--gold2); }
.feature-card p { font-size: 13px; color: var(--muted); margin: 0; }
.hidden { display: none !important; }
video { background: #000; border-radius: 12px; max-width: 100%; }
.drag {
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s;
}
.drag.over { border-color: var(--gold); color: var(--txt); }
.kv { font-size: 13px; color: var(--muted); }
.kv b { color: var(--txt); }
.progress { height: 6px; background: var(--bg2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold2)); transition: width .3s; }
