/* 妙妙屋 Hub —— 极简白。留白优先、细边框、近黑主按钮,无渐变无花哨。 */
:root {
  --bg: #fafafb;
  --card: #ffffff;
  --text: #111418;
  --muted: #6b7280;
  --faint: #9aa1ab;
  --border: #ecedf0;
  --border-strong: #dcdee3;
  --ink: #16181d;          /* 主按钮/强调 */
  --ink-hover: #2c2f36;
  --accent: #2f6fed;
  --accent-soft: #eef3fe;
  --ok: #12924a;
  --danger: #d92d20;
  --code-bg: #0f1520;
  --code-text: #e6eaf1;
  --radius: 11px;
  --radius-sm: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

/* ---------- form controls ---------- */
input, select, textarea {
  font: inherit; color: var(--text); background: #fff; width: 100%;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 44px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2.5 4.5l3.5 3.5 3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center;
}
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 15px; }

/* ---------- buttons ---------- */
.btn {
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 500;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; border: 1px solid var(--border-strong); color: var(--text); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: #fff; border: 1px solid #f0cbc7; color: var(--danger); }
.btn.danger:hover { background: #fdf1f0; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- login ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 344px; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 34px 28px; text-align: center;
}
.login-logo { font-size: 38px; line-height: 1; margin-bottom: 10px; }
.login-card h1 { margin: 0 0 4px; font-size: 19px; font-weight: 650; }
.login-card p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.login-card .field { text-align: left; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 22px; background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 15px; }
.brand .cat { font-size: 18px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.top-actions .who { font-size: 13px; color: var(--muted); margin-right: 3px; }

/* ---------- layout ---------- */
.container { max-width: 720px; margin: 0 auto; padding: 26px 22px 64px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.card-head .sub { font-size: 12px; color: var(--faint); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
@media (max-width: 560px) { .row { flex-direction: column; gap: 0; } }
.checkline { display: flex; align-items: center; gap: 8px; margin: -2px 0 15px; }
.checkline input { width: auto; accent-color: var(--ink); }
.checkline label { margin: 0; color: var(--text); font-size: 13px; }

/* ---------- dropzone ---------- */
.drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  padding: 26px 18px; text-align: center; color: var(--muted);
  background: var(--bg); cursor: pointer; transition: border-color .12s, background .12s, color .12s;
}
.drop:hover { border-color: var(--faint); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop .big { font-size: 20px; margin-bottom: 7px; opacity: .7; }
.drop .hint { font-size: 12px; color: var(--faint); margin-top: 5px; }

/* ---------- file rows ---------- */
.files { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.files:empty { margin-top: 0; }
.frow {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 9px; background: #fff;
}
.frow .farch { width: 116px; flex: none; padding: 6px 9px; padding-right: 26px; font-size: 13px; }
.frow .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.frow .fsize { font-size: 12px; color: var(--faint); white-space: nowrap; }
.frow .fdel { border: none; background: none; color: var(--faint); font-size: 17px; line-height: 1; padding: 2px 6px; }
.frow .fdel:hover { color: var(--danger); }

/* ---------- upload progress ---------- */
.upbar { margin-top: 14px; display: none; }
.upbar.show { display: block; }
.upbar .lab { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
progress { width: 100%; height: 6px; border: none; border-radius: 6px; overflow: hidden; background: var(--border); accent-color: var(--ink); }
progress::-webkit-progress-bar { background: var(--border); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--ink); border-radius: 6px; }

/* ---------- releases ---------- */
.group { margin-top: 4px; }
.group + .group { margin-top: 22px; }
.group-title { font-size: 12px; letter-spacing: .03em; color: var(--faint); font-weight: 600; margin: 0 0 4px; }
.rel { padding: 15px 2px; border-top: 1px solid var(--border); }
.group-title + .rel { border-top: none; }
.rel-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.rel-ver { font-weight: 650; font-size: 15px; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--border-strong); color: var(--muted); }
.badge.latest { background: var(--ink); color: #fff; border-color: var(--ink); }
.rel .when { margin-left: auto; font-size: 12px; color: var(--faint); }
.rel-notes { margin: 9px 0 0; color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.arts { margin-top: 11px; display: flex; flex-direction: column; gap: 5px; }
.art { display: flex; align-items: center; gap: 10px; font-size: 12px; font-family: ui-monospace, monospace; }
.art .a-arch { min-width: 50px; color: var(--text); font-weight: 600; }
.art .a-fn { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art .a-sz { color: var(--faint); margin-left: auto; white-space: nowrap; }
.rel-actions { margin-top: 13px; display: flex; gap: 8px; align-items: center; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; font-size: 13px; }

/* ---------- modal ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(17,20,24,.44);
  display: grid; place-items: center; padding: 20px; z-index: 60;
  opacity: 0; transition: opacity .14s;
}
.mask.show { opacity: 1; }
.modal {
  width: min(560px, 100%); background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; transform: translateY(6px); transition: transform .14s;
}
.mask.show .modal { transform: none; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0 0 3px; font-size: 16px; font-weight: 650; }
.modal-head .msub { margin: 0; color: var(--muted); font-size: 13px; }
.modal-x { border: none; background: none; color: var(--faint); font-size: 21px; line-height: 1; padding: 0 4px; }
.modal-x:hover { color: var(--text); }
.cmd-wrap { position: relative; margin-top: 16px; }
pre.cmd {
  margin: 0; background: var(--code-bg); color: var(--code-text);
  border-radius: var(--radius-sm); padding: 14px 15px; padding-right: 74px;
  font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.cmd-copy { position: absolute; top: 8px; right: 8px; }
.tip { margin-top: 13px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.tip code { background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 11.5px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(8px);
  background: #16181d; color: #fff; padding: 10px 18px; border-radius: 9px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
