/* iOS 激活锁检测系统 - 样式 */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #86868b;
  --line: #e8e8ed;
  --accent: #0071e3;
  --accent-dark: #0062c3;
  --danger: #d70015;
  --ok: #1a7f37;
  --radius: 16px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.hidden { display: none !important; }

/* 头部 */
.site-header {
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.brand-icon { color: var(--accent); font-size: 20px; }
.header-tag { font-size: 13px; color: var(--muted); }

/* 主视觉 */
.hero { padding: 44px 0 26px; text-align: center; }
.hero h1 { font-size: 30px; font-weight: 700; letter-spacing: .3px; }
.hero-sub { margin-top: 10px; color: var(--muted); font-size: 15px; }
.hero-sub b { color: var(--text); font-weight: 600; }

/* 卡片与表单 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  padding: 24px;
}
.query-card { margin-bottom: 20px; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.input-row { display: flex; gap: 10px; }
.input-row input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fbfbfd;
  transition: border-color .15s, box-shadow .15s;
}
.input-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,.15);
  background: #fff;
}
.input-row button {
  padding: 13px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.input-row button:hover { background: var(--accent-dark); }
.input-row button:disabled { background: #a9c7e8; cursor: not-allowed; }
.field-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* 加载 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px 0;
  color: var(--muted);
  font-size: 14.5px;
}
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 错误 */
.error {
  background: #fdecec;
  border: 1px solid #f5c2c7;
  color: var(--danger);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14.5px;
  margin-bottom: 20px;
}

/* 结果 */
.result-card { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.result-label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .5px; }
.query-id {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 12px;
  font-family: ui-monospace, Consolas, monospace;
}
.badges { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.badge-item {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.badge-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.badge {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 24px;
}
.badge.on  { background: #fdecec; color: var(--danger); }
.badge.off { background: #e6f4ea; color: var(--ok); }
.badge.na  { background: var(--bg); color: var(--muted); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.detail-item {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
}
.detail-label { display: block; font-size: 12px; color: var(--muted); }
.detail-value { display: block; font-size: 14.5px; font-weight: 600; margin-top: 2px; word-break: break-all; }
.source-note { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }

/* 页脚 */
.site-footer {
  margin-top: auto;
  padding: 26px 0 34px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.site-footer p + p { margin-top: 4px; }

/* ===== 响应式：平板 / 小屏笔记本 ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .hero { padding: 34px 0 22px; }
  .hero h1 { font-size: 26px; }
  .card { padding: 18px; }
  .detail-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  /* 全面屏安全区（iOS 刘海/底部横条） */
  .header-inner, .container, .site-footer {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* ===== 响应式：手机 ===== */
@media (max-width: 520px) {
  .container { padding: 0 14px; }
  .header-inner { padding-top: 10px; padding-bottom: 10px; }
  .header-tag { display: none; }
  .brand-name { font-size: 15px; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 23px; }
  .hero-sub { font-size: 14px; margin-top: 8px; }
  .input-row { flex-direction: column; gap: 8px; }
  .input-row input { padding: 14px 16px; font-size: 16px; }
  .input-row button { width: 100%; padding: 14px 0; font-size: 16px; }
  .badge-item { min-width: 100%; }
  .badge { font-size: 16px; padding: 5px 16px; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .result-top { flex-wrap: wrap; gap: 8px; }
  .query-id { max-width: 100%; overflow-wrap: anywhere; }
  .field-hint { font-size: 12px; }
  .site-footer { padding: 22px 0 28px; font-size: 12px; }
  /* 全面屏安全区 */
  .header-inner, .container, .site-footer {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .official-card h2 { font-size: 16.5px; }
  .official-steps li { font-size: 14px; }
}

/* ===== 设备丢失：苹果官方查找入口 ===== */
.official-card { margin-bottom: 20px; }
.official-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.official-card .oc-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.official-steps { list-style: none; counter-reset: oc; margin-bottom: 16px; }
.official-steps li {
  position: relative;
  padding: 8px 0 8px 34px;
  font-size: 14.5px;
  counter-increment: oc;
}
.official-steps li::before {
  content: counter(oc);
  position: absolute;
  left: 0; top: 9px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.official-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px 20px;
  font-size: 15px; font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  text-decoration: none;
  transition: background .15s;
}
.official-btn:hover { background: var(--accent-dark); }
.official-note { margin-top: 12px; font-size: 12px; color: var(--muted); }
