/* ============================================================
   创客周先森 · Maker Lab — 全站设计系统
   暗色科技风 / 蓝→青渐变 / 玻璃拟态 / 极简克制
   （无外部字体与 CDN 依赖）
   ============================================================ */
:root {
  --bg: #0a0d14;
  --panel: #141b26;
  --panel-2: #1a2330;
  --line: #2a3545;
  --line-soft: #212a38;
  --text: #e8eef7;
  --muted: #8e9bb0;
  --accent: #4d9bff;      /* 亮蓝，暗背景上更清晰 */
  --accent-2: #2dd4bf;    /* 科技青 */
  --danger: #ff6b6b;
  --ok: #34d399;
  --grad: linear-gradient(135deg, #3b82f6 0%, #14b8a6 100%);
  --radius: 14px;
  --shadow: 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-lg: 0 34px 80px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(77, 155, 255, .22);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--text);
  min-height: 100vh;
  display: flex; flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 黑色基底 + 蓝青柔光透过，保持通透的玻璃质感 */
  background:
    radial-gradient(900px 620px at 14% 6%, rgba(31, 123, 255, .16), transparent 62%),
    radial-gradient(820px 560px at 88% 10%, rgba(0, 184, 169, .13), transparent 60%),
    radial-gradient(720px 520px at 62% 96%, rgba(120, 110, 255, .10), transparent 62%),
    #080b12;
  background-attachment: fixed;
}
/* 细网格底纹（暗色下用浅色细线，向下方渐隐） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 175, 230, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 175, 230, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 74%);
  mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 74%);
}
.topbar, .app, .footer { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 13px clamp(20px, 4vw, 56px);
  background: rgba(10, 14, 22, .66);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: box-shadow .3s ease, border-color .3s ease;
}
.topbar.scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .5); border-bottom-color: rgba(77, 155, 255, .22); }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 17px; line-height: 1;
  box-shadow: 0 10px 22px rgba(59, 130, 246, .35); font-family: var(--sans);
}
.brand-name { font-weight: 800; letter-spacing: .01em; font-size: 17px; }
.brand-sub { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 10px; font-size: 14px;
  font-weight: 500; border: 1px solid transparent; transition: .18s; white-space: nowrap;
}
.nav a:hover { color: var(--accent); background: rgba(77, 155, 255, .10); text-decoration: none; }
.nav a.active { color: var(--accent); background: rgba(77, 155, 255, .13); font-weight: 700; }
.auth-area { display: flex; align-items: center; gap: 8px; }
.auth-area .user-chip { font-size: 13px; color: var(--muted); }
.auth-area .user-chip b { color: var(--text); }

/* ---------- 布局 ---------- */
.app { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 30px clamp(18px, 3vw, 34px) 72px; }
.footer {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 20px clamp(20px, 4vw, 56px);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px; background: rgba(10, 14, 22, .5);
}

/* ---------- 通用 eyebrow / 标题 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 14px;
  border-radius: 999px; background: rgba(77, 155, 255, .12); color: var(--accent);
  font-size: 13px; font-weight: 700;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .18); animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.gradient-text {
  background: linear-gradient(100deg, #6cb0ff 0%, #2dd4bf 46%, #6cb0ff 92%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: lpGradient 9s ease-in-out infinite alternate;
}

/* .hero / .feature（后台概览等） */
.hero {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; padding: 36px;
  background: rgba(20, 27, 38, .78); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(77, 155, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(77, 155, 255, .06) 1px, transparent 1px);
  background-size: 28px 28px; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at 30% 10%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 30% 10%, #000, transparent 70%);
}
.hero > * { position: relative; }
.hero h1 { font-size: 32px; margin: 0 0 10px; letter-spacing: -.03em; font-weight: 800; }
.hero .tag { font-family: var(--mono); color: var(--accent); font-size: 12px; letter-spacing: 1.5px; }
.hero p { color: var(--muted); max-width: 640px; }
.hero .cta { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 24px; }
.feature {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; padding: 20px;
  background: rgba(20, 27, 38, .80); box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
  transition: .2s;
}
.feature:hover { transform: translateY(-3px); border-color: rgba(77, 155, 255, .4); }
.feature .ico { font-size: 21px; }
.feature h3 { margin: 10px 0 4px; font-size: 22px; font-weight: 800; color: var(--accent); }
.feature p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  font-family: var(--sans); line-height: 1.2; transition: .18s; text-decoration: none;
}
.btn:hover {
  border-color: rgba(77, 155, 255, .55); color: var(--accent); text-decoration: none;
  transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.btn-primary {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 12px 26px rgba(59, 130, 246, .28);
}
.btn-primary:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 16px 32px rgba(59, 130, 246, .38); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(77, 155, 255, .10); }
.btn-danger { border-color: rgba(255, 107, 107, .4); color: var(--danger); background: transparent; }
.btn-danger:hover { background: rgba(255, 107, 107, .12); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-outline { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text); }
.btn-text { background: transparent; border-color: transparent; color: var(--muted); }
.btn-text:hover { color: var(--accent); box-shadow: none; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 表单 ---------- */
.form-card {
  max-width: 440px; margin: 36px auto; padding: 32px;
  background: rgba(20, 27, 38, .72); border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 24px; box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
}
.form-card h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.form-card .hint { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #aeb9cc; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  color: var(--text); border-radius: 13px; padding: 12px 15px;
  font-size: 15px; font-family: var(--sans); transition: .18s;
}
.field textarea { min-height: 120px; resize: vertical; font-family: var(--mono); font-size: 13px; }
.field input::placeholder, .field textarea::placeholder { color: #66748a; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .07); box-shadow: var(--ring);
}
.form-error { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* 个人中心 */
.profile-card { max-width: 560px; }
.profile-info { display: flex; align-items: center; gap: 14px; margin: 18px 0 20px; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 16px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--grad); color: #fff;
  font-size: 22px; font-weight: 800; box-shadow: 0 12px 26px rgba(59, 130, 246, .3);
}
.profile-name { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.profile-role { font-size: 12px; font-family: var(--mono); color: var(--accent); margin-top: 3px; }
.profile-fields { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.profile-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 15px; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.profile-row:last-child { border-bottom: none; }
.profile-row span { color: var(--muted); flex: 0 0 auto; }
.profile-row b { color: var(--text); text-align: right; word-break: break-all; }

/* 邀请注册：提示文案与确认勾选 */
.lp-hint { font-size: 11.5px; line-height: 1.6; color: var(--muted); margin: -6px 0 14px; }
.lp-check {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  font-size: 12.5px; line-height: 1.6; color: #bcc7d8;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
}
.lp-check input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.reg-card { max-width: 560px; }
.reg-card .row { gap: 12px; }

/* 邀请码管理 */
.invite-gen {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px; padding: 22px 24px;
  background: rgba(20, 27, 38, .82); box-shadow: var(--shadow);
}
.invite-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.invite-stat {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 16px 18px;
  background: rgba(20, 27, 38, .82); box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; gap: 2px;
}
.invite-stat b { font-size: 24px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.invite-stat span { font-size: 12px; color: var(--muted); }
.iv-code { font-family: var(--mono); font-size: 12.5px; color: var(--accent); background: rgba(77, 155, 255, .12); padding: 3px 9px; border-radius: 7px; }
.iv-users { font-family: var(--mono); font-size: 11px; color: var(--muted); max-width: 180px; word-break: break-all; }

/* ---------- 上传进度条 ---------- */
.upload-progress { margin: 14px 0 4px; }
.upload-bar { width: 100%; height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.upload-bar-fill { height: 100%; width: 0%; border-radius: 999px; background: var(--grad); transition: width .2s ease; }
.upload-status { margin-top: 8px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* ---------- 卡片列表 ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.section-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-head { margin-bottom: 24px; }
.page-head h2 { margin: 12px 0 4px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.03em; }
.page-head .sub { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 18px; }
.card {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px;
  background: rgba(20, 27, 38, .72); overflow: hidden;
  display: flex; flex-direction: column; transition: .22s; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.card:hover { border-color: rgba(77, 155, 255, .45); transform: translateY(-4px); box-shadow: var(--shadow); }
.card .cover {
  height: 132px; display: flex; align-items: center; justify-content: center; font-size: 42px;
  background:
    linear-gradient(rgba(77, 155, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 155, 255, .06) 1px, transparent 1px),
    linear-gradient(135deg, #142036 0%, #0f2b2b 100%);
  background-size: 22px 22px, 22px 22px, cover;
  border-bottom: 1px solid var(--line-soft);
}
.card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.card .meta { color: var(--muted); font-size: 12px; font-family: var(--mono); margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; line-height: 1.65; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  font-size: 11px; font-family: var(--mono); color: var(--accent);
  border: 1px solid rgba(77, 155, 255, .24); background: rgba(77, 155, 255, .10);
  border-radius: 999px; padding: 3px 10px;
}
.badge { font-size: 11px; font-family: var(--mono); padding: 3px 9px; border-radius: 8px; font-weight: 600; }
.badge-draft { background: rgba(77, 155, 255, .14); color: var(--accent); }
.badge-pub { background: rgba(52, 211, 153, .13); color: var(--ok); }
.badge-admin { background: rgba(77, 155, 255, .14); color: var(--accent); }
.badge-member { background: rgba(52, 211, 153, .13); color: var(--ok); }
.link-btn { background: none; border: none; padding: 0; color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); }
.link-btn:hover { text-decoration: underline; }

/* 注册用户列表（仅管理员） */
.user-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.user-search {
  flex: 1; min-width: 220px; max-width: 360px;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 11px 14px; font-size: 14px;
  font-family: var(--sans); transition: .18s;
}
.user-search::placeholder { color: #66748a; }
.user-search:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.user-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.user-stat {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 16px 18px;
  background: rgba(20, 27, 38, .82); box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; gap: 2px;
}
.user-stat b { font-size: 24px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.user-stat span { font-size: 12px; color: var(--muted); }
.user-table td { vertical-align: middle; }
.user-name { font-weight: 700; }
.user-id { font-size: 11px; color: var(--muted); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email { font-size: 12.5px; word-break: break-all; }

/* 数据与备份 */
.backup-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.backup-stat {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 15px 16px;
  background: rgba(20, 27, 38, .82); box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.backup-stat b { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.backup-stat span { font-size: 12px; color: var(--muted); }
.backup-location {
  font-size: 12.5px; color: var(--muted); font-family: var(--mono);
  background: rgba(77, 155, 255, .08); border: 1px solid rgba(77, 155, 255, .18);
  border-radius: 11px; padding: 10px 14px;
}
.backup-location.ext { color: var(--ok); background: rgba(52, 211, 153, .10); border-color: rgba(52, 211, 153, .26); }
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.backup-panel {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px; padding: 24px;
  background: rgba(20, 27, 38, .82); box-shadow: var(--shadow);
}
.backup-panel h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.backup-panel p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.75; color: var(--muted); }
.backup-panel p b { color: var(--text); }
.backup-warn {
  font-size: 12.5px; line-height: 1.65; color: #f0b866;
  background: rgba(245, 158, 11, .10); border: 1px solid rgba(245, 158, 11, .26);
  border-radius: 10px; padding: 10px 13px; margin-bottom: 16px;
}
.backup-warn b { color: #ffd08a; }
.backup-file { display: block; width: 100%; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.backup-file::file-selector-button {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  border-radius: 10px; padding: 8px 14px; margin-right: 12px; cursor: pointer;
  font-family: var(--sans); font-size: 13px;
}
.backup-guide {
  margin-top: 22px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px;
  padding: 24px 26px; background: rgba(20, 27, 38, .70);
}
.backup-guide h3 { margin: 0 0 12px; font-size: 16px; font-weight: 800; }
.backup-guide ol { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; line-height: 1.9; color: #a9b5c8; }
.backup-guide ol b { color: var(--text); }
.backup-guide code, .backup-panel code {
  background: rgba(77, 155, 255, .12); color: #8ec2ff; font-family: var(--mono);
  font-size: 12px; padding: 2px 6px; border-radius: 6px;
}

/* ---------- 详情页 ---------- */
.detail { max-width: 840px; margin: 0 auto; }
.detail .back { color: var(--muted); font-size: 13px; font-weight: 600; display: inline-block; margin-bottom: 18px; }
.detail .back:hover { color: var(--accent); }
.detail h1 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 12px; }
.detail h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 32px 0 16px; }
.detail .meta { color: var(--muted); font-size: 13px; font-family: var(--mono); margin-bottom: 18px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.prose { line-height: 1.85; font-size: 15px; }
.prose h1, .prose h2, .prose h3 { margin: 1.4em 0 .5em; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
.prose h1 { font-size: 24px; } .prose h2 { font-size: 20px; } .prose h3 { font-size: 17px; }
.prose code { background: rgba(77, 155, 255, .12); color: #8ec2ff; padding: 2px 6px; border-radius: 6px; font-family: var(--mono); font-size: 13px; }
.prose pre { background: #05080e; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; overflow: auto; }
.prose pre code { background: none; color: #cfe0f5; padding: 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose blockquote {
  border-left: 3px solid var(--accent); margin: 1em 0; padding: 6px 16px;
  color: var(--muted); background: rgba(77, 155, 255, .07); border-radius: 0 10px 10px 0;
}
.prose img { max-width: 100%; border-radius: 12px; }
.prose a { color: var(--accent); }

/* ---------- 固件版本 ---------- */
.release {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 16px 18px;
  margin-bottom: 12px; background: rgba(20, 27, 38, .78);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.release .ver { font-family: var(--mono); font-weight: 800; color: var(--accent); font-size: 15px; min-width: 76px; }
.release .info { flex: 1; min-width: 200px; }
.release .info .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.release .info .changelog { color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.release .dl { display: flex; align-items: center; gap: 10px; }
.release .size { font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* 允许下载开关控制条 */
.dl-controls {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px;
  background: rgba(20, 27, 38, .80); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.dl-controls-label { font-size: 14px; font-weight: 700; }
.dl-state { font-size: 12px; padding: 3px 11px; border-radius: 999px; font-weight: 700; }
.dl-state.on { color: var(--ok); background: rgba(52, 211, 153, .14); }
.dl-state.off { color: var(--danger); background: rgba(255, 107, 107, .13); }

/* 拨动开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #3a4658; border-radius: 999px; transition: .2s; }
.switch .slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.switch input:checked + .slider { background: var(--grad); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: .55; cursor: not-allowed; }
.switch-inline { vertical-align: middle; margin-right: 8px; }

/* 网页烧录提示 */
.flash-note {
  margin-top: 14px; font-size: 13px; line-height: 1.75; color: var(--muted);
  background: rgba(77, 155, 255, .08); border: 1px solid rgba(77, 155, 255, .18);
  border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 16px;
}
.flash-note b { color: var(--accent); }
.flash-install-btn { width: 240px; }
.flash-install-btn::part(button) { font-family: var(--sans); }

/* 烧录弹窗：固件参数只读展示 + 板子型号确认 */
.flash-lead { margin: 0 0 18px; font-size: 14px; line-height: 1.75; color: #a9b5c8; }
.flash-lead b { color: var(--text); }
.flash-info {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(77, 155, 255, .08), rgba(45, 212, 191, .08));
  border: 1px solid rgba(77, 155, 255, .18);
}
.flash-info-item { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.flash-info-item span { font-size: 11px; color: var(--muted); font-weight: 600; }
.flash-info-item b { font-size: 15px; font-weight: 700; color: var(--text); }
.flash-info-item small { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.flash-file { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px !important; }
.mono { font-family: var(--mono); }
.flash-info-note { margin-top: 9px; font-size: 12px; color: var(--muted); }
.flash-info-note b { color: var(--accent); }
.flash-chip-help, .field-help { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.flash-check { margin: 14px 0 4px; padding: 11px 14px; border-radius: 11px; font-size: 13px; line-height: 1.65; }
.flash-check.ok { color: var(--ok); background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .28); font-weight: 600; }
.flash-check.warn { color: #f0b866; background: rgba(245, 158, 11, .11); border: 1px solid rgba(245, 158, 11, .30); }
.flash-check.warn b { color: #ffd08a; }
.flash-check a { color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: underline; }
.flash-host { margin-top: 16px; display: flex; justify-content: center; min-height: 4px; }
.flash-connect-btn {
  height: 48px; padding: 0 30px; border: none; border-radius: 999px;
  background: var(--grad); color: #fff; font-size: 15px; font-weight: 700;
  font-family: var(--sans); cursor: pointer;
  box-shadow: 0 12px 26px rgba(59, 130, 246, .32); transition: .18s;
}
.flash-connect-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 16px 32px rgba(59, 130, 246, .4); }
.flash-hint { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 12px; line-height: 1.7; color: var(--muted); }
.flash-hint b { color: var(--text); }

/* ---------- 管理后台 ---------- */
.admin { display: grid; grid-template-columns: 190px 1fr; gap: 24px; }
.admin .side { border-right: 1px solid var(--line); padding-right: 14px; }
.admin .side .tab { display: block; padding: 10px 14px; border-radius: 11px; color: var(--muted); cursor: pointer; font-size: 14px; margin-bottom: 4px; font-weight: 600; transition: .18s; }
.admin .side .tab:hover { background: rgba(77, 155, 255, .10); color: var(--accent); }
.admin .side .tab.active { background: rgba(77, 155, 255, .14); color: var(--accent); border-left: 3px solid var(--accent); border-radius: 0 11px 11px 0; }
.admin .side .sec-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 14px 0 8px 14px; font-family: var(--mono); }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: rgba(20, 27, 38, .78); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.table th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; background: rgba(255, 255, 255, .03); }
.table tr:hover td { background: rgba(77, 155, 255, .06); }
.table .actions { display: flex; gap: 6px; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .66);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: #141b26; border: 1px solid rgba(255, 255, 255, .10); border-radius: 22px;
  width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; padding: 26px;
  box-shadow: var(--shadow-lg);
}
.modal h3 { margin: 0 0 16px; font-weight: 800; letter-spacing: -.02em; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; background: rgba(20, 27, 38, .66); border: 1px dashed var(--line); border-radius: 20px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #18212e; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow);
  animation: slidein .25s; max-width: 340px; color: var(--text);
}
.toast.err { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }
@keyframes slidein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.pill { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: rgba(255, 255, 255, .04); }
.center-msg { text-align: center; padding: 60px 20px; color: var(--muted); }
.center-msg .big { font-size: 42px; margin-bottom: 10px; }
.center-msg h2 { color: var(--text); font-weight: 800; letter-spacing: -.02em; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   落地页（Landing）— 极简
   ============================================================ */
.landing { position: relative; }

.lp-hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: clamp(32px, 6vw, 92px); align-items: center;
  padding: 68px 0 52px; min-height: 430px;
}
.lp-copy > .lp-rise { animation: lpRise .7s cubic-bezier(.215, .61, .355, 1) both; }
.lp-copy > .lp-rise:nth-child(1) { animation-delay: .05s; }
.lp-copy > .lp-rise:nth-child(2) { animation-delay: .13s; }
.lp-copy > .lp-rise:nth-child(3) { animation-delay: .21s; }
.lp-copy > .lp-rise:nth-child(4) { animation-delay: .29s; }
.lp-kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: .22em;
  color: var(--accent); text-transform: uppercase;
}
.lp-title {
  margin: 20px 0 18px; font-size: clamp(46px, 5.6vw, 76px);
  line-height: 1.06; font-weight: 800; letter-spacing: -.04em;
}
.lp-desc { margin: 0; max-width: 520px; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.85; color: #a4b1c6; }
.lp-desc b { color: var(--text); font-weight: 700; }
.lp-cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; align-items: center; }
.cta-arrow { display: inline-block; transition: transform .3s cubic-bezier(.215, .61, .355, 1); }
.lp-cta .btn-primary:hover .cta-arrow { transform: translate3d(5px, 0, 0); }

/* 玻璃拟态登录 / 注册卡 */
.lp-auth {
  position: relative; z-index: 2; width: 100%; max-width: 400px; justify-self: end;
  padding: 30px; background: rgba(20, 27, 38, .60);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(28px) saturate(1.2); backdrop-filter: blur(28px) saturate(1.2);
  animation: lpCardIn .8s .16s cubic-bezier(.215, .61, .355, 1) both;
}
.lp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.lp-tab {
  height: 40px; display: grid; place-items: center; border-radius: 11px;
  font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer;
  border: none; background: transparent; font-family: var(--sans); transition: .18s;
}
.lp-tab.active { background: rgba(255, 255, 255, .10); color: var(--accent); font-weight: 700; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.lp-auth-title { margin: 22px 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.lp-auth-sub { margin: 0 0 20px; font-size: 13.5px; color: #9aa7bb; line-height: 1.65; }
.lp-auth .field { margin-bottom: 14px; }
.lp-auth .field input { height: 50px; }
.lp-submit { width: 100%; height: 50px; border-radius: 14px; font-size: 16px; }
.lp-auth .form-error { margin-top: 10px; }
.lp-foot { margin-top: 16px; text-align: center; font-size: 13px; color: #9aa7bb; }
.lp-foot a { color: var(--accent); font-weight: 700; cursor: pointer; }
.lp-note { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; }

/* 已登录 → 欢迎卡 */
.lp-welcome { text-align: center; padding: 10px 4px 4px; }
.lp-welcome-avatar {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px;
  display: grid; place-items: center; background: var(--grad); color: #fff;
  font-size: 26px; font-weight: 800; box-shadow: 0 14px 28px rgba(59, 130, 246, .35);
}
.lp-welcome-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.lp-welcome-role {
  display: inline-block; margin: 10px 0 22px; font-size: 12px; font-family: var(--mono);
  color: var(--accent); background: rgba(77, 155, 255, .12); padding: 4px 12px; border-radius: 999px;
}
.lp-welcome-actions { display: grid; gap: 10px; }

/* 首页极简：仅 hero + 登录卡，其余装饰与卡片已移除 */

/* 关于我 */
.about { max-width: 820px; margin: 0 auto; }
.about h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; margin: 14px 0 12px; }
.about-lead { font-size: 17px; line-height: 1.85; color: #a9b5c8; margin: 0 0 28px; }
.about-panel {
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; padding: 26px 28px;
  background: rgba(20, 27, 38, .80); box-shadow: var(--shadow); margin-bottom: 20px;
}
.about-panel h2 { margin: 0 0 12px; font-size: 19px; font-weight: 800; }
.about-panel p { margin: 0 0 12px; color: #a9b5c8; line-height: 1.85; }
.about-panel p:last-child { margin-bottom: 0; }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

@keyframes lpRise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes lpCardIn {
  from { opacity: 0; transform: translate3d(0, 26px, 0) scale(.975); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes lpGradient { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .lp-hero { grid-template-columns: 1fr; min-height: 0; gap: 34px; }
  .lp-auth { justify-self: center; max-width: 440px; }
  .lp-hero { padding: 44px 0 40px; }
  .lp-title { font-size: clamp(40px, 8vw, 60px); }
  .backup-stats { grid-template-columns: repeat(3, 1fr); }
  .backup-grid { grid-template-columns: 1fr; }
  .reg-card .row { flex-direction: column; }
  .invite-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; gap: 10px; }
  .brand-name { font-size: 15px; }
  .brand-sub { display: none; }
  .nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-top: 6px; }
  .nav a { white-space: nowrap; }
  .app { padding: 20px 16px 56px; }
  .admin { grid-template-columns: 1fr; }
  .admin .side { border-right: none; display: flex; gap: 6px; overflow: auto; padding-bottom: 8px; }
  .admin .side .sec-title { display: none; }
  .admin .side .tab { white-space: nowrap; }
  .lp-cta .btn-lg { width: 100%; }
  .flash-info { grid-template-columns: repeat(2, 1fr); }
  .user-stats { grid-template-columns: repeat(2, 1fr); }
  .backup-stats { grid-template-columns: repeat(2, 1fr); }
  .table { display: block; overflow-x: auto; }
  .footer { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
