/* 官网样式：深色、干净、手机上也能用（拉新链接大多是手机点开的）。
   纯静态，不需要 PHP / 数据库。 */
:root {
  --bg: #0f1218;
  --panel: #171c25;
  --panel2: #1d232e;
  --line: #262d39;
  --ink: #eef1f6;
  --muted: #8b95a3;
  --brand: #3d6cf3;
  --brand2: #6b5bf0;
  --good: #3ecf8e;
  --bad: #f2889a;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 15% -10%, #1b2540 0%, var(--bg) 55%) no-repeat, var(--bg);
  color: var(--ink);
  font: 15px/1.7 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: #9db4ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---- 顶栏 ---- */
.nav { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.nav .logo { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.nav .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; }
.nav .spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 9px 16px; border-radius: 11px; font: inherit; font-size: 14px; cursor: pointer;
  transition: .16s ease; text-decoration: none;
}
.btn:hover { border-color: #3a4352; background: var(--panel2); text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
/* 按钮暂时不可用（比如后台还没填安装包地址）：看上去像灰掉，点不动 */
.btn.off { opacity: .5; pointer-events: none; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---- 首屏 ---- */
.hero { padding: 46px 0 28px; }
.hero h1 { font-size: 40px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #7fa0ff, #b39bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 16.5px; margin: 0 0 22px; max-width: 620px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .tiny { color: #6b7482; font-size: 12.5px; margin-top: 12px; }

/* 邀请提示条 / 公告条 */
.invite { display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin: 0 0 18px;
  border: 1px solid rgba(61,108,243,.4); background: linear-gradient(90deg, rgba(61,108,243,.14), rgba(107,91,240,.1));
  border-radius: 13px; font-size: 14px; }
.invite b { color: #c7d6ff; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; margin: 0 0 18px;
  border: 1px solid rgba(240,180,80,.32); background: rgba(240,180,80,.09); border-radius: 13px; font-size: 13.5px; }
.notice b { flex: 0 0 auto; color: #f0b450; }
.notice span { white-space: pre-wrap; }
.invite.hidden, .notice.hidden { display: none !important; }

/* ---- 卡片 / 栅格 ---- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.section { padding: 26px 0; }
.section h2 { font-size: 21px; margin: 0 0 6px; }
.section .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin: 0 0 8px; font-size: 15.5px; }
.card p { color: var(--muted); font-size: 13.5px; margin: 0; }
.card .ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(61,108,243,.15); margin-bottom: 10px; font-size: 17px; }

/* ---- 登录/注册面板 ---- */
.auth { max-width: 420px; }
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line);
  background: #12161d; color: var(--ink); font: inherit; font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
.row { display: flex; gap: 9px; align-items: center; }
.row > * { flex: 1; }
.row > .btn { flex: 0 0 auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: inherit; font-size: 13.5px; cursor: pointer; }
.tab.on { background: var(--panel2); color: var(--ink); border-color: #3d4757; }
.tip { font-size: 12.5px; color: var(--muted); min-height: 20px; margin-top: 4px; }
.tip.bad { color: var(--bad); }
.tip.good { color: var(--good); }
.hint { font-size: 12px; color: #6b7482; }
.hidden { display: none !important; }

/* ---- 滑块（和客户端同一套参数，服务端出题）---- */
.cap { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #12161d; margin: 10px 0; }
.cap-head { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.cap-head.good { color: var(--good); }
.cap-head.bad { color: var(--bad); }
.cap-stage { position: relative; width: 300px; height: 150px; border-radius: 9px; overflow: hidden; background: #0d1117; user-select: none; }
.cap-stage canvas { position: absolute; left: 0; top: 0; display: block; }
.cap-track { position: relative; width: 300px; height: 38px; margin-top: 9px; border: 1px solid var(--line); border-radius: 9px; background: #171d26; }
.cap-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(61,108,243,.22); border-radius: 9px 0 0 9px; }
.cap-handle { position: absolute; left: 0; top: 0; width: 46px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-size: 13px;
  letter-spacing: -1px; cursor: grab; touch-action: none; }
.cap.done .cap-handle { background: linear-gradient(135deg, #1f9e6b, #3ecf8e); }

/* ---- 推广中心 ---- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; }
.stat b { display: block; font-size: 22px; letter-spacing: -.5px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat.ok b { color: var(--good); }
.invitebox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.invitebox code { background: #0e1219; border: 1px solid var(--line); padding: 9px 12px; border-radius: 10px; font-size: 13px;
  flex: 1; min-width: 220px; overflow: auto; white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; }
.tag.ok { background: rgba(62,207,142,.16); color: var(--good); }
.tag.warn { background: rgba(240,180,80,.16); color: #f0b450; }
.tag.off { background: rgba(139,149,163,.16); color: var(--muted); }
.empty { color: var(--muted); font-size: 13px; padding: 12px 0; }
.qr-pick { display: flex; gap: 10px; align-items: center; }
.qr-pick img { width: 84px; height: 84px; object-fit: contain; border-radius: 8px; background: #fff; }
footer { color: #5c6572; font-size: 12.5px; padding: 30px 0 40px; text-align: center; }

@media (max-width: 640px) {
  .hero h1 { font-size: 29px; }
  .hero { padding: 26px 0 18px; }
  .cap-stage, .cap-track { width: 100%; max-width: 300px; }
}
