
/* ============================================================
 * iOS / macOS 风格覆盖层（2026-11）
 * 只覆盖视觉，不改布局与交互逻辑
 * ============================================================ */

/* ---------- 1. 设计令牌：苹果系统色 + 连续圆角 ---------- */
:root {
  --ap-radius-s: 10px;
  --ap-radius-m: 14px;
  --ap-radius-l: 20px;
  --ap-radius-xl: 28px;

  --ap-blue: #0071e3;
  --ap-blue-soft: rgba(0, 113, 227, .10);
  --ap-green: #34c759;
  --ap-orange: #ff9500;
  --ap-gray-1: #f5f5f7;
  --ap-gray-2: #e8e8ed;
  --ap-gray-3: #d2d2d7;
  --ap-label: #1d1d1f;
  --ap-label-2: #6e6e73;
  --ap-label-3: #86868b;

  --ap-shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --ap-shadow-hover: 0 2px 4px rgba(0,0,0,.06), 0 16px 40px rgba(0,0,0,.12);
  --ap-ease: cubic-bezier(.32, .72, 0, 1);

  /* 覆盖主色 */
  --accent: var(--ap-blue);
  --accent-soft: var(--ap-blue-soft);
  --accent-line: rgba(0, 113, 227, .35);
}

/* ---------- 2. 浅色主题 ---------- */
:root {
  --body-bg: #fbfbfd;
  --color-paper: #ffffff;
  --color-ink-strong: var(--ap-label);
  --color-ink-mid: #424245;
  --color-ink-soft: var(--ap-label-2);
  --color-line: rgba(0, 0, 0, .08);
  --color-header-bg: rgba(251, 251, 253, .82);
  --color-surface-soft: rgba(255, 255, 255, .72);
  --color-surface: #ffffff;
  --color-surface-strong: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-control-bg: rgba(255, 255, 255, .9);
  --color-control-border: rgba(0, 0, 0, .06);
  --color-control-shadow: 0 1px 3px rgba(0,0,0,.04);
  --color-card-border: rgba(0, 0, 0, .06);
  --color-card-shadow: var(--ap-shadow-card);
  --color-card-shadow-strong: var(--ap-shadow-hover);
  --color-overlay: rgba(0, 0, 0, .38);
  --color-chip-muted: rgba(0, 0, 0, .05);
  --color-tag-bg: rgba(0, 113, 227, .08);
  --color-accent-strong: var(--ap-blue);
  --banner-warm-bg: linear-gradient(160deg, #e8f0fe 0%, #f5f7ff 55%, #eef4ff 100%);
  --drawer-bg: #ffffff;
}

/* ---------- 3. 深色主题 ---------- */
:root[data-theme="dark"] {
  --body-bg: #000000;
  --color-paper: #1c1c1e;
  --color-ink-strong: #f5f5f7;
  --color-ink-mid: #d2d2d7;
  --color-ink-soft: #98989d;
  --color-line: rgba(255, 255, 255, .1);
  --color-header-bg: rgba(22, 22, 23, .8);
  --color-surface-soft: rgba(28, 28, 30, .72);
  --color-surface: #1c1c1e;
  --color-surface-strong: #1c1c1e;
  --color-surface-elevated: #2c2c2e;
  --color-control-bg: rgba(118, 118, 128, .24);
  --color-control-border: rgba(255, 255, 255, .08);
  --color-control-shadow: none;
  --color-card-border: rgba(255, 255, 255, .08);
  --color-card-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --color-card-shadow-strong: 0 2px 6px rgba(0,0,0,.4), 0 20px 48px rgba(0,0,0,.55);
  --color-overlay: rgba(0, 0, 0, .6);
  --color-chip-muted: rgba(118, 118, 128, .24);
  --color-tag-bg: rgba(10, 132, 255, .16);
  --color-accent-strong: #0a84ff;
  --banner-warm-bg: linear-gradient(160deg, #0a1a2f 0%, #121826 55%, #0d1520 100%);
  --drawer-bg: #1c1c1e;
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, .16);
  --accent-line: rgba(10, 132, 255, .4);
  --ap-blue: #0a84ff;
  --ap-label: #f5f5f7;
  --ap-label-2: #98989d;
  --ap-shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --ap-shadow-hover: 0 2px 6px rgba(0,0,0,.4), 0 20px 48px rgba(0,0,0,.55);
}

/* ---------- 4. 全局字体：苹果系统栈 ---------- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, sans-serif;
  letter-spacing: -.011em;
}

/* 标题收紧字距 */
.hero__title,
.card__title,
.index__head h2,
.sheet__title {
  letter-spacing: -.024em;
  font-weight: 650;
}

/* ---------- 5. 顶栏：毛玻璃 ---------- */
.site-header {
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-line);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.site-header::before,
.site-header::after { display: none !important; }

.brand__name {
  font-weight: 650;
  letter-spacing: -.02em;
}

/* ---------- 6. 搜索框：iOS 胶囊 ---------- */
.search {
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--color-chip-muted);
  box-shadow: none;
  transition: background .22s var(--ap-ease), border-color .22s var(--ap-ease);
}

.search:focus-within {
  background: var(--color-surface);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search input {
  background: transparent;
  border: 0;
  font-size: 15px;
}

/* ---------- 7. Hero：苹果式大标题 ---------- */
.hero {
  border-radius: var(--ap-radius-l);
  border: 1px solid var(--color-card-border);
  background: var(--banner-warm-bg);
  padding: 22px 22px 20px;
  box-shadow: none;
  text-align: center;
}

.hero__eyebrow {
  display: none;
}

.hero__title {
  font-size: clamp(22px, 4.2vw, 30px);
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 700;
}

.hero__sub {
  font-size: 14px;
  color: var(--ap-label-2);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.5;
}

.hero__stats {
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hero__stat {
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  box-shadow: none;
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- 8. 分类胶囊 ---------- */
.cat-chip {
  border-radius: var(--ap-radius-m);
  border: 1px solid var(--color-card-border);
  background: var(--color-surface);
  box-shadow: none;
  transition: transform .24s var(--ap-ease), box-shadow .24s var(--ap-ease),
              border-color .24s var(--ap-ease);
}

.cat-chip:hover {
  transform: translateY(-2px) scale(1.012);
  box-shadow: var(--ap-shadow-card);
  border-color: var(--accent-line);
}

.cat-chip:active { transform: scale(.985); }

.cat-chip__emoji {
  border-radius: var(--ap-radius-s);
}

.cat-chip__text strong { font-weight: 600; letter-spacing: -.012em; }

/* ---------- 9. 卡片 ---------- */
.card {
  border-radius: var(--ap-radius-l);
  border: 1px solid var(--color-card-border);
  background: var(--color-surface);
  box-shadow: var(--ap-shadow-card);
  transition: transform .28s var(--ap-ease), box-shadow .28s var(--ap-ease);
  will-change: transform;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ap-shadow-hover);
}

.card:active {
  transform: translateY(-1px) scale(.994);
  transition-duration: .1s;
}

.card__thumb {
  border-radius: var(--ap-radius-m);
  overflow: hidden;
}

.card__title {
  font-weight: 600;
  letter-spacing: -.016em;
}

.card__summary {
  color: var(--ap-label-2);
  font-size: 13.5px;
  line-height: 1.5;
}

/* 标签：iOS 淡色胶囊 */
.chip,
.t-pill {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border: 0;
}

/* ---------- 10. 弹层：iOS Sheet ---------- */
.modal__panel,
.sheet,
#modal > div {
  border-radius: var(--ap-radius-xl) var(--ap-radius-xl) 0 0;
  box-shadow: 0 -8px 60px rgba(0,0,0,.24);
}

@media (min-width: 720px) {
  .modal__panel,
  .sheet,
  #modal > div {
    border-radius: var(--ap-radius-xl);
  }
}

.sheet__cta,
a.sheet__cta,
button.sheet__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 50px;
  text-align: center;
  text-decoration: none;
  border-radius: var(--ap-radius-m);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  border: 0;
  box-shadow: none;
  transition: transform .2s var(--ap-ease), filter .2s var(--ap-ease);
}

.sheet__cta:hover { filter: brightness(1.08); }
.sheet__cta:active { transform: scale(.98); }

/* ---------- 11. 抽屉 ---------- */
.drawer__panel {
  border-radius: 0 var(--ap-radius-xl) var(--ap-radius-xl) 0;
  background: var(--drawer-bg);
  box-shadow: 24px 0 80px rgba(0,0,0,.28);
}

/* ---------- 12. 分页 / 工具条 ---------- */
.pager button,
.tab {
  border-radius: 999px;
  transition: background .2s var(--ap-ease), color .2s var(--ap-ease);
}

/* ---------- 13. 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-chip-muted);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ap-gray-3); background-clip: content-box; }

/* ---------- 14. 入场动画 ---------- */
@keyframes ap-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card, .cat-chip {
  animation: ap-fade-up .44s var(--ap-ease) both;
}

.card:nth-child(1), .cat-chip:nth-child(1) { animation-delay: .02s; }
.card:nth-child(2), .cat-chip:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3), .cat-chip:nth-child(3) { animation-delay: .08s; }
.card:nth-child(4), .cat-chip:nth-child(4) { animation-delay: .11s; }
.card:nth-child(5), .cat-chip:nth-child(5) { animation-delay: .14s; }
.card:nth-child(6), .cat-chip:nth-child(6) { animation-delay: .17s; }
.card:nth-child(n+7) { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  .card, .cat-chip { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- 15. 移动端 ---------- */
@media (max-width: 640px) {
  .hero { padding: 30px 20px; border-radius: var(--ap-radius-l); }
  .card { border-radius: var(--ap-radius-m); }
  .cat-chip { border-radius: var(--ap-radius-s); }
}

/* ---------- 16. HERO 整块可点击：苹果风格提示 ---------- */
.hero {
  cursor: pointer;
  transition: transform .28s var(--ap-ease), box-shadow .28s var(--ap-ease);
}

.hero:hover {
  transform: translateY(-2px);
  box-shadow: var(--ap-shadow-card);
}

.hero:active { transform: scale(.994); }

/* 底部居中提示胶囊（用 left/right + margin auto 居中，不依赖 transform） */
.hero__link::after {
  content: "立即领取 ›";
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 18px;
  width: -moz-fit-content;
  width: fit-content;
  margin: 0 auto;
  transform: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.01em;
  text-align: center;
  white-space: nowrap;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 0 4px 14px rgba(0,113,227,.28);
  transition: filter .2s var(--ap-ease);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.hero__link:hover::after {
  filter: brightness(1.1);
}

/* 点击/访问后保持同一外观，避免返回时变灰或位移 */
.hero__link:visited::after {
  background: var(--accent);
  color: #fff;
}

.hero__link:active::after {
  background: var(--accent);
  filter: brightness(.94);
  transform: none;
}

/* 给底部按钮留出空间 */
.hero { padding-bottom: 62px; }

@media (max-width: 640px) {
  .hero { padding-bottom: 58px; }
  .hero__link::after { bottom: 15px; font-size: 12.5px; padding: 7px 16px; }
}

/* ---------- 17. 彻底压掉原站的 hero__link 提示样式 ---------- */
.hero__link::after,
.hero:hover .hero__link::after,
.hero:focus-within .hero__link::after,
.hero__link:visited::after,
.hero__link:active::after {
  top: auto !important;
  right: 0 !important;
  bottom: 18px !important;
  left: 0 !important;
  transform: none !important;
  margin: 0 auto !important;
  width: fit-content !important;
  border: 0 !important;
  background: var(--accent) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0,113,227,.28) !important;
}

.hero:hover .hero__link::after {
  filter: brightness(1.1);
}

@media (max-width: 640px) {
  .hero__link::after,
  .hero:hover .hero__link::after {
    bottom: 15px !important;
  }
}
