/* app.hw4f.com 自签分发站 - 移动优先 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --card2: #22262f;
  --line: #2e3340;
  --text: #e8ecf3;
  --sub: #9aa4b5;
  --brand: #3b82f6;
  --brand2: #2563eb;
  --ok: #22c55e;
  --warn: #f59e0b;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  padding-bottom: 40px;
}

.notice-bar {
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 13px;
  padding: 8px 14px;
  text-align: center;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* Hero */
.hero { text-align: center; padding: 32px 0 20px; }
.app-icon {
  width: 96px; height: 96px; margin: 0 auto 16px;
  border-radius: 22px; overflow: hidden;
  background: var(--card2);
  box-shadow: 0 8px 30px rgba(59,130,246,.25);
  display: flex; align-items: center; justify-content: center;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.icon-ph { font-size: 42px; }
.hero h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.hero .desc { color: var(--sub); font-size: 14px; margin-bottom: 12px; }
.ver-badge {
  display: inline-block; font-size: 12px; color: var(--sub);
  background: var(--card); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 20px;
}
.ver-badge b { color: var(--brand); }

/* 安装按钮 */
.install-block { margin: 8px 0 20px; text-align: center; }
.btn-main {
  display: block; width: 100%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; text-decoration: none; font-size: 17px; font-weight: 600;
  padding: 16px; border-radius: 14px;
  box-shadow: 0 6px 20px rgba(59,130,246,.35);
  transition: transform .15s;
}
.btn-main:active { transform: scale(.98); }
.btn-sub {
  display: block; width: 100%; text-align: center;
  background: var(--card2); color: var(--text); text-decoration: none;
  font-size: 15px; padding: 13px; border-radius: 12px;
  border: 1px solid var(--line);
}
.hint { font-size: 12px; color: var(--sub); margin-top: 10px; }

/* 卡片 */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; margin-bottom: 16px;
}
.card h3 { font-size: 16px; margin-bottom: 14px; }
.card.empty { text-align: center; color: var(--sub); }
.log { font-size: 14px; color: var(--sub); white-space: pre-wrap; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  flex: 1 1 0; min-width: 0;
  background: var(--card2); color: var(--sub);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 4px; font-size: 14px; cursor: pointer;
  font-family: inherit; line-height: 1.3;
  white-space: normal; word-break: break-word;
  text-align: center; font-weight: 700;
}
.tab span {
  display: block; font-size: 11.5px; font-weight: 400;
  margin-top: 3px; opacity: .85; letter-spacing: -.2px;
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tab.active span { color: #eaf2ff; opacity: 1; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 手机端：三个按钮再收一号，确保每个字都完整 */
@media (max-width: 480px) {
  .tabs { gap: 6px; }
  .tab { font-size: 13px; padding: 8px 3px; }
  .tab span { font-size: 10.5px; }
}

/* 步骤 */
.step { display: flex; gap: 12px; margin-bottom: 18px; }
.step:last-child { margin-bottom: 0; }
.step-no {
  flex-shrink: 0; width: 28px; height: 28px;
  background: var(--brand); color: #fff;
  border-radius: 50%; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-body { flex: 1 1 0; min-width: 0; }
.step-body h4 { font-size: 15px; margin-bottom: 6px; }
.step-body p { font-size: 14px; color: var(--sub); margin-bottom: 6px; }
.step-body code {
  background: var(--card2); padding: 2px 6px; border-radius: 5px;
  font-size: 13px; color: #7dd3fc;
}
.warn { color: var(--warn) !important; font-size: 13px !important; }
.tip { color: var(--ok) !important; font-size: 13px !important; }

.card-inner h4 { font-size: 15px; margin: 14px 0 8px; }
.card-inner h4:first-child { margin-top: 0; }
.card-inner p { font-size: 14px; color: var(--sub); margin-bottom: 10px; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
details:last-child { border-bottom: none; }
details summary {
  font-size: 14px; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
details summary::after { content: "＋"; color: var(--sub); }
details[open] summary::after { content: "−"; }
details p { font-size: 13px; color: var(--sub); margin-top: 8px; padding-left: 4px; }

.footer { text-align: center; padding: 20px 0; color: var(--sub); font-size: 13px; }
.footer .tiny { font-size: 11px; opacity: .6; margin-top: 8px; }

/* 教程新增 */
.lead { font-size: 13px; color: var(--sub); line-height: 1.7; margin: 10px 0 16px; }
.lead b { color: var(--warn); }
.way-note {
  background: rgba(99,102,241,.10); border: 1px solid rgba(99,102,241,.28);
  color: var(--text); font-size: 13px; line-height: 1.6;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 16px;
}
.dl-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.btn-dl {
  display: inline-block; padding: 12px 18px; border-radius: 10px;
  background: #3b82f6; color: #ffffff !important;
  font-size: 14px; font-weight: 700; text-decoration: none !important;
  border: 1px solid #60a5fa;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  box-shadow: 0 4px 14px rgba(59,130,246,.45);
  line-height: 1.4;
}
.btn-dl:hover { background: #2563eb; }
.btn-dl:active { transform: scale(.98); }

/* 正文里的普通超链接（深色背景上要看得清） */
.step-body a, .card-inner a, .tab-panel a:not(.btn-dl):not(.btn-main):not(.btn-sub) {
  color: #7dd3fc; text-decoration: underline; text-underline-offset: 2px;
  font-weight: 600; word-break: break-all;
}
.step-body a:hover, .card-inner a:hover { color: #bae6fd; }
.txt-link { color: #7dd3fc !important; }

/* 步骤配图：图片单独成行、尽可能放大，说明文字紧贴图片下方居中 */
.step-fig {
  margin: 16px auto; text-align: center;
  width: 100%; max-width: 100%;
}
.step-fig img {
  display: block; width: 100%; max-width: 100%; height: auto;
  margin: 0 auto; cursor: zoom-in;
  border-radius: 10px; border: 1px solid var(--line);
  background: #fff;
}
.step-fig figcaption {
  display: block; width: 100%;
  font-size: 12.5px; color: var(--sub); text-align: center;
  margin: 8px auto 0; line-height: 1.5; padding: 0 6px;
}
.step-fig figcaption::before { content: "▲ "; opacity: .5; }
.step-fig img:active { opacity: .85; }

/* 图片放大灯箱（手机可捏合缩放） */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.94);
  touch-action: pinch-zoom pan-x pan-y;
  overscroll-behavior: contain;
}
#lightbox.open { display: block; }
#lightbox img {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  max-width: 96vw; max-height: 82vh;
  width: auto; height: auto;
  border-radius: 8px; background: #fff;
}
#lb-close {
  position: absolute; top: 14px; right: 16px;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff;
  font-size: 24px; line-height: 42px; text-align: center;
  cursor: pointer; border: none; font-family: inherit;
}
#lb-close:active { background: rgba(255,255,255,.35); }
#lb-tip {
  position: absolute; bottom: 18px; left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,.75); font-size: 12.5px;
}

/* 更醒目的主下载按钮 */
.btn-main {
  color: #ffffff !important; text-decoration: none !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.btn-sub { color: #ffffff !important; background: #2563eb; border-color: #60a5fa; font-weight: 700; text-decoration: none !important; }
