:root {
  --bg: #0a0810;
  --bg-soft: #120e18;
  --card: #17131f;
  --card-2: #1d1826;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f6f4f8;
  --text-dim: #a6a2b3;
  --text-mute: #6f6b7d;
  --brand: #ff4d3d;
  --brand-2: #e11d48;
  --brand-soft: rgba(255, 77, 61, 0.14);
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 420px at 12% -6%, rgba(255, 77, 61, 0.20), transparent 62%),
    radial-gradient(620px 460px at 88% 8%, rgba(120, 60, 220, 0.20), transparent 65%),
    radial-gradient(900px 600px at 50% 108%, rgba(225, 29, 72, 0.12), transparent 70%);
  z-index: 0;
}

.wrap { position: relative; z-index: 1; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(10, 8, 16, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, #ff6a3d, #e11d48);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff;
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.42);
  letter-spacing: -0.5px;
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.brand-sub { font-size: 11px; color: var(--text-mute); margin-top: 2px; letter-spacing: 1px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-dim);
  transition: .18s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-link.active { color: var(--text); background: var(--brand-soft); }
.nav-link.admin { border: 1px solid var(--line); margin-left: 6px; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px 24px 40px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid rgba(255, 77, 61, 0.28);
  color: #ff9c8f;
  font-size: 12.5px;
  letter-spacing: 0.4px;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }

h1.title {
  margin: 22px 0 0;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1px;
}
h1.title em {
  font-style: normal;
  background: linear-gradient(100deg, #ff7a4d, #ff4d3d 45%, #e11d48);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  margin: 18px 0 0;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 520px;
}

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px;
  padding: 0 30px;
  border-radius: 14px;
  font-size: 16px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, background .16s;
}
.btn-primary {
  background: linear-gradient(135deg, #ff6a3d, #e11d48);
  color: #fff;
  box-shadow: 0 14px 34px rgba(225, 29, 72, 0.36);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(225, 29, 72, 0.46); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn[disabled], .btn.disabled {
  opacity: .45; cursor: not-allowed; pointer-events: none;
  box-shadow: none;
}
.btn svg { flex: none; }

.meta-line {
  margin-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: 13px; color: var(--text-mute);
}
.meta-line .k { color: var(--text-dim); }
.meta-line b { color: var(--text); font-weight: 600; }

.stats { display: flex; gap: 40px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.stat span { font-size: 12.5px; color: var(--text-mute); }

/* ---------- 手机 + 二维码 ---------- */
.showcase { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.phone {
  width: 268px; height: 546px;
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(160deg, #2b2436, #14101c);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 34px;
  background: #0d0a12;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}
.phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 22px; border-radius: 12px; background: #050409;
  z-index: 3;
}
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px 8px;
  font-size: 11px; color: var(--text-mute);
}
.phone-app { padding: 8px 16px 14px; }
.phone-app-row { display: flex; align-items: center; gap: 10px; }
.phone-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(140deg, #ff6a3d, #e11d48);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff;
}
.phone-app-name { font-size: 13px; font-weight: 600; }
.phone-app-desc { font-size: 10.5px; color: var(--text-mute); margin-top: 2px; }
.phone-hero {
  margin: 6px 16px 12px;
  height: 108px; border-radius: 14px;
  background: linear-gradient(135deg, #3a1c2c, #4b1f2b 45%, #2a1430);
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  font-size: 12px; color: #ffd9cf;
}
.phone-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120px 80px at 30% 20%, rgba(255, 122, 77, 0.35), transparent 70%);
}
.phone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px; }
.phone-poster {
  aspect-ratio: 3 / 4; border-radius: 8px;
  background: linear-gradient(150deg, #241b2e, #191323);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
.phone-poster:nth-child(2n) { background: linear-gradient(150deg, #2f1b26, #1c1320); }
.phone-poster:nth-child(3n) { background: linear-gradient(150deg, #1f2440, #171b2c); }
.phone-poster::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 3px;
  border-radius: 2px; background: rgba(255, 255, 255, 0.12);
}
.phone-tabbar {
  margin-top: auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px; color: var(--text-mute); text-align: center;
}
.phone-tabbar .on { color: #ff7a68; }

.qr-card {
  width: 268px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
}
.qr-box {
  width: 100%; display: grid; place-items: center;
  background: #fff; border-radius: 12px; padding: 10px;
}
.qr-box img { width: 100%; max-width: 200px; display: block; }
.qr-title { margin-top: 12px; font-size: 14px; font-weight: 600; }
.qr-desc { margin-top: 4px; font-size: 12px; color: var(--text-mute); }

/* ---------- 特性 ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: 70px 24px; }
.section-head { margin-bottom: 34px; }
.section-head h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.section-head p { margin: 10px 0 0; color: var(--text-dim); font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
  padding: 26px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  transition: .2s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(255, 77, 61, 0.35); }
.feature .ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: #ff8b7a;
  font-size: 20px;
  margin-bottom: 16px;
}
.feature h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.feature p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text-dim); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  background: rgba(0, 0, 0, 0.25);
}
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 34px 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-mute); line-height: 1.9;
}
.footer a:hover { color: var(--text-dim); }

/* ---------- 登录 ---------- */
.auth-page {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 400px;
  padding: 40px 36px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.auth-head { text-align: center; margin-bottom: 30px; }
.auth-head .brand-mark { margin: 0 auto 16px; width: 52px; height: 52px; border-radius: 15px; font-size: 19px; }
.auth-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.auth-head p { margin: 8px 0 0; font-size: 13px; color: var(--text-mute); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.field input {
  width: 100%; height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: .16s;
}
.field input:focus { border-color: rgba(255, 77, 61, 0.6); background: rgba(255, 77, 61, 0.05); }
.field input::placeholder { color: var(--text-mute); }
.btn-block { width: 100%; margin-top: 8px; }
.auth-tip {
  margin-top: 20px; padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--line);
  font-size: 12px; color: var(--text-mute); line-height: 1.7;
}
.auth-back { display: block; text-align: center; margin-top: 22px; font-size: 13px; color: var(--text-mute); }
.auth-back:hover { color: var(--text-dim); }
.err {
  margin-top: 14px; padding: 10px 14px; border-radius: 10px;
  background: rgba(225, 29, 72, 0.14);
  border: 1px solid rgba(225, 29, 72, 0.35);
  color: #ff9db0; font-size: 13px;
  display: none;
}
.err.show { display: block; }

/* ---------- 后台 ---------- */
.admin-top {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 8, 16, 0.7);
  backdrop-filter: blur(18px);
}
.admin-top-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px; height: 62px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-top h1 { margin: 0; font-size: 16px; font-weight: 700; }
.admin-user { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-dim); }
.link-btn {
  background: none; border: none; color: var(--text-mute);
  cursor: pointer; font-size: 13px; padding: 6px 10px; border-radius: 8px;
}
.link-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.admin-main { max-width: 1080px; margin: 0 auto; padding: 34px 24px 60px; }
.admin-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 20px; align-items: start; }
.panel {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
}
.panel h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.panel .hint { margin: 0 0 18px; font-size: 12.5px; color: var(--text-mute); }

.drop {
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: .18s;
  background: rgba(255, 255, 255, 0.02);
}
.drop:hover, .drop.over { border-color: rgba(255, 77, 61, 0.65); background: rgba(255, 77, 61, 0.06); }
.drop .big { font-size: 30px; margin-bottom: 10px; }
.drop .t1 { font-size: 14.5px; font-weight: 600; }
.drop .t2 { font-size: 12.5px; color: var(--text-mute); margin-top: 6px; }
.file-info {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid rgba(255, 77, 61, 0.28);
  font-size: 13px; display: none;
}
.file-info.show { display: block; }
.file-info .row { display: flex; justify-content: space-between; gap: 12px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.progress {
  margin-top: 16px; height: 6px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.08); overflow: hidden; display: none;
}
.progress.show { display: block; }
.progress i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ff6a3d, #e11d48); transition: width .2s; }

.current-item { padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.current-item + .current-item { margin-top: 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; }
.kv span { color: var(--text-mute); }
.kv b { font-weight: 600; }
.plat-name { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: var(--brand-soft); color: #ff9c8f; border: 1px solid rgba(255, 77, 61, 0.25);
  font-weight: 500;
}
.empty { font-size: 13px; color: var(--text-mute); padding: 10px 0; }

.history { margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--text-mute); font-weight: 500; font-size: 12px; }
td { color: var(--text-dim); }
tbody tr:hover td { color: var(--text); background: rgba(255, 255, 255, 0.02); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  padding: 12px 22px; border-radius: 12px;
  background: #221a2b; border: 1px solid var(--line);
  color: var(--text); font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: .24s;
  z-index: 99;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { border-color: rgba(74, 222, 128, 0.4); }
#toast.bad { border-color: rgba(225, 29, 72, 0.5); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 52px; }
  .showcase { align-items: center; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; }
  .brand-sub { display: none; }
  .hero { padding: 40px 16px 24px; }
  .section { padding: 48px 16px; }
  .features { grid-template-columns: 1fr; }
  .stats { gap: 24px; }
  .actions .btn { width: 100%; }
  .admin-main { padding: 24px 16px 48px; }
  .two { grid-template-columns: 1fr; }
  .phone { width: 232px; height: 474px; }
  .qr-card { width: 232px; }
}

/* 下载入口集中在首屏左侧，每款应用独占一行。 */
.hero > div:first-child { min-width: 0; }
.download-list { margin-top: 30px; }
.download-row { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 20px; align-items: center; padding: 13px 0; }
.download-row + .download-row { border-top: 1px solid var(--line); }
.download-row .btn { width: 100%; padding: 0 15px; white-space: nowrap; }
.download-info { display: flex; align-items: baseline; gap: 9px; min-width: 0; white-space: nowrap; font-size: 14px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.download-info b { font-weight: 600; color: var(--text); }
.download-separator { color: var(--text-mute); }
.download-alternatives { margin-top: 6px; }
.download-alternatives .btn { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 9px; gap: 7px; }
.download-alternatives .btn svg { width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .download-row { grid-template-columns: 190px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  .download-row .btn { height: 50px; padding: 0 10px; font-size: 14px; gap: 7px; }
  .download-row .btn svg { width: 17px; height: 17px; }
  .download-info { font-size: 12.5px; gap: 7px; }
}
@media (max-width: 359px) {
  .download-row { grid-template-columns: 162px minmax(0, 1fr); gap: 10px; }
  .download-row .btn { font-size: 12px; padding: 0 7px; gap: 5px; }
  .download-row .btn svg { width: 15px; height: 15px; }
  .download-info { font-size: 11px; gap: 5px; }
}
.field select { width:100%; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--text); font:inherit; }
#app-detected { margin:9px 0 0; }.history { overflow-x:auto; }.file-info b { overflow-wrap:anywhere; }
@media(max-width:700px) { .admin-top-inner { flex-wrap:wrap; gap:12px; }.admin-top h1 { font-size:18px; }.kv b { overflow-wrap:anywhere; min-width:0; } }

.tag { flex-shrink:0; white-space:nowrap; }.kv > span:first-child { flex-shrink:0; }.kv b { min-width:0; overflow-wrap:anywhere; text-align:right; }
