/* ============================================================
   AppForge · 分发系统风格下载页覆盖层
   保留全部 JS 依赖类名；加载顺序位于 download.css 之后。
   ============================================================ */

:root {
  --accent: #0a84ff;
  --ink: #1d1d2b;
  --muted: rgba(40, 50, 90, 0.55);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-blur: saturate(170%) blur(24px);
  --shadow-glass: 0 16px 44px rgba(60, 60, 120, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Helvetica Neue", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1100px 650px at 14% -6%, rgba(138, 130, 255, 0.5), transparent 60%),
    radial-gradient(900px 600px at 90% 12%, rgba(10, 132, 255, 0.32), transparent 55%),
    radial-gradient(1000px 700px at 60% 105%, rgba(48, 209, 88, 0.18), transparent 60%),
    linear-gradient(180deg, #f4f6fb 0%, #edf0f8 100%);
  color: var(--ink);
}

/* 背景光球 */
body .orb-a,
body .orb-b {
  background: radial-gradient(circle, rgba(138, 130, 255, 0.35), transparent 65%);
}

/* 顶部导航 */
body .download-header {
  height: 96px;
  max-width: 1080px;
}
body .wordmark > span {
  background: linear-gradient(180deg, #8e8bff, #5f5cf5);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(95, 92, 245, 0.35);
}
body .wordmark { font-weight: 700; }
body .subtle-button {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: #2c3a5f;
  font-weight: 600;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 下载区布局：分发系统风格（上下分区） */
body .download-layout {
  grid-template-columns: 1fr;
  max-width: 860px;
  gap: 26px;
  margin: 26px auto 56px;
  align-items: stretch;
}

/* 顶部：品牌介绍横幅 */
body .download-hero {
  text-align: center;
  padding: 22px 0 6px;
}
body .release-pill {
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: rgba(40, 50, 90, 0.7);
  font-weight: 700;
  letter-spacing: 1.4px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
body .release-pill i { background: var(--ios-green, #30d158); }
body .download-hero h1 {
  font-size: 42px;
  font-weight: 750;
  letter-spacing: -1.4px;
  color: var(--ink);
}
body .download-hero h1 span { color: var(--accent); }
body .hero-description { color: var(--muted); font-size: 14px; }
body .hero-tags > span {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: #3a4a75;
  font-weight: 600;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* 中央玻璃面板：App 信息 + 下载按钮 */
body .download-panel {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  box-shadow: var(--shadow-glass);
  padding: 30px 34px;
}

/* App 摘要：分发系统风格（图标 + 名称 + 元信息） */
body .app-summary {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
body .app-summary > .app-icon {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  font-size: 46px;
  background: linear-gradient(180deg, #8e8bff, #5f5cf5);
  color: #fff;
  box-shadow: 0 12px 28px rgba(95, 92, 245, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
body .app-summary > .app-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
body .app-summary > div { min-width: 0; flex: 1; }
body .download-kicker {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 10px;
}
body .app-summary h2 {
  font-size: 26px;
  font-weight: 750;
  margin: 5px 0 6px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .app-summary p { color: var(--muted); font-size: 13px; margin: 0; }

/* 平台切换 */
body .os-tabs {
  display: flex;
  gap: 10px;
  margin: 22px 0 6px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 5px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
body .os-tab {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 650;
  color: rgba(40, 50, 90, 0.65);
  font-size: 13px;
  transition: all 0.18s ease;
}
body .os-tab.active {
  background: linear-gradient(180deg, #2f95ff, #0a6fff);
  color: #fff;
  box-shadow: 0 6px 16px rgba(10, 111, 255, 0.3);
}

/* 元信息行 */
body .download-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 22px;
}
body .download-meta > span {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}
body .download-meta b {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  margin-bottom: 3px;
}

/* 主下载按钮：大号胶囊 */
body .download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #2f95ff, #0a6fff);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 999px;
  padding: 17px 22px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(10, 111, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
body .download-button:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(10, 111, 255, 0.45); }
body .download-button.disabled {
  background: rgba(120, 120, 150, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  transform: none;
}
body .download-button svg { width: 22px; height: 22px; }

body .download-hint {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 14px 0 4px;
}
body .download-error {
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #d9261d;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  text-align: center;
}
body .refresh-link {
  display: block;
  margin: 10px auto 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  background: none;
  border: none;
  cursor: pointer;
}

/* 提示条 */
body .demo-badge,
body .browser-notice,
body .device-suggestion {
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.3);
  color: #a35c00;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 12px;
}
body .device-suggestion a { color: var(--accent); font-weight: 700; }

/* 安装步骤 */
body .guide-divider {
  color: rgba(40, 50, 90, 0.7);
  font-weight: 650;
  font-size: 13px;
  letter-spacing: 0.5px;
  margin: 26px 0 18px;
}
body .guide-divider i {
  background: linear-gradient(90deg, rgba(10, 132, 255, 0.4), transparent);
}
body .install-steps {
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
body .install-steps li {
  list-style: none;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 16px 18px;
}
body .install-steps .step-number {
  background: linear-gradient(180deg, #2f95ff, #0a6fff);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 750;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(10, 111, 255, 0.3);
}
body .install-steps strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
body .install-steps p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}

/* 帮助 */
body .download-panel details {
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  padding: 13px 16px;
  margin-top: 18px;
}
body .download-panel summary {
  color: rgba(40, 50, 90, 0.8);
  font-weight: 650;
  cursor: pointer;
  font-size: 13px;
}
body .download-panel details p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 10px 0 2px;
}
body .download-panel details a { color: var(--accent); font-weight: 600; }

body .publisher-note {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 20px;
}

/* 页脚 */
body .download-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 12px;
}
body .download-footer a { color: rgba(40, 50, 90, 0.7); font-weight: 600; }

/* Toast */
body .copy-toast {
  background: rgba(20, 25, 45, 0.82);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  body .download-layout { max-width: 500px; margin: 14px auto 30px; }
  body .download-panel { border-radius: 20px; padding: 24px 20px; }
  body .app-summary { gap: 16px; }
  body .app-summary > .app-icon { width: 68px; height: 68px; border-radius: 19px; font-size: 36px; }
  body .app-summary h2 { font-size: 21px; }
  body .download-hero h1 { font-size: 28px; }
  body .download-meta b { font-size: 13px; }
  body .download-button { font-size: 14px; padding: 15px 18px; }
  body .hero-illustration { display: none; }
  body .hero-tags { display: none; }
}
@media (max-width: 480px) {
  body .download-layout { padding: 0 15px; }
  body .download-panel { padding: 20px 16px; }
  body .app-summary { flex-direction: column; text-align: center; gap: 12px; }
  body .app-summary > div { width: 100%; }
  body .download-meta { gap: 8px; }
  body .install-steps li { padding: 13px 14px; }
}
