/* ==========================================================================
   UDID 助手 — 设计系统
   现代清爽科技风：柔和渐变背景 + 白色卡片 + 靛紫渐变主色
   ========================================================================== */

:root {
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-dark: #4f46e5;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --card: #ffffff;
  --border: #e8eaf3;
  --success: #10b981;
  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 48px -16px rgba(79, 70, 229, 0.20);
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fbfbff 0%, #f4f6fd 100%);
  -webkit-font-smoothing: antialiased;
}

/* 背景装饰光斑 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(640px 420px at 8% -4%, rgba(99, 102, 241, 0.10), transparent 60%),
    radial-gradient(720px 520px at 96% 12%, rgba(139, 92, 246, 0.09), transparent 60%),
    radial-gradient(560px 420px at 50% 110%, rgba(99, 102, 241, 0.07), transparent 60%);
}

.container { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(232, 234, 243, 0.8);
}
.header-inner { display: flex; align-items: center; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(99, 102, 241, 0.6);
}
.logo-text { font-size: 16px; font-weight: 650; letter-spacing: 0.2px; }
.header-badge {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent-dark);
  background: rgba(99, 102, 241, 0.10);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- 主内容 ---------- */
main { flex: 1; padding: 56px 0 64px; }

.hero { text-align: center; margin-bottom: 40px; }
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.12;
  margin-bottom: 16px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle { color: var(--muted); font-size: 17px; max-width: 520px; margin: 0 auto; }

.hero-sm { margin-bottom: 32px; }
.success-mark {
  width: 60px; height: 60px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(16, 185, 129, 0.5);
}

/* ---------- 主卡片 ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), var(--shadow-lg);
  padding: 40px;
}

.qr-hero { text-align: center; margin-bottom: 40px; }

.qr-frame {
  position: relative;
  width: 232px;
  height: 232px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px -24px rgba(99, 102, 241, 0.40);
}
.qr-frame img { width: 100%; height: 100%; display: block; border-radius: 12px; }

/* 扫描角标（相机取景框效果） */
.corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid var(--accent);
  pointer-events: none;
}
.corner-tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.corner-tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.corner-bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.corner-br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }

.qr-caption { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-block;
  background: var(--gradient);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  padding: 15px 58px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 26px -10px rgba(99, 102, 241, 0.65);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 16px 32px -12px rgba(99, 102, 241, 0.7); }
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.btn-sm { padding: 10px 30px; font-size: 14px; }

.ios-only { display: none; }
.desktop-only { display: block; }
body.is-ios .desktop-only { display: none; }
body.is-ios .ios-only { display: block; }
.ios-action { text-align: center; margin-bottom: 36px; }

/* ---------- 步骤 ---------- */
.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.10);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 14px;
}
.steps strong { font-size: 15px; color: var(--ink); }
.steps p { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 20px; margin-top: 24px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}
.faq-item h2 { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.faq-item p { color: var(--muted); font-size: 14px; }

/* ---------- 结果页 ---------- */
.result-card { text-align: center; max-width: 460px; margin: 0 auto; }
.udid {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  word-break: break-all;
  background: #f5f6fb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0 20px;
  color: var(--ink-soft);
}

.device-info {
  display: grid;
  margin: 28px 0 12px;
  text-align: left;
  border-top: 1px solid var(--border);
}
.device-info > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.device-info dt { color: var(--muted); font-size: 14px; }
.device-info dd { color: var(--ink); font-size: 14px; font-weight: 550; }

.note { margin-top: 20px; color: var(--faint); font-size: 12.5px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .panel { padding: 28px 20px; }
  .qr-frame { width: 200px; height: 200px; }
  .subtitle { font-size: 15px; }
}
