/* 第二个首页（index2.php）：全部限定在 .home2 内，不影响其他页面 */
.home2 {
  --blue: #254dff;
  --blue-dark: #1a3bd6;
  --orange: #ff5515;
  --ink: #161a2e;
  --sub: #5b6378;
  --line: #e7eaf3;
  --soft: #f5f7ff;
  color: var(--ink);
}
.home2 h1, .home2 h2, .home2 h3, .home2 p, .home2 figure { margin: 0; }
.home2 img { display: block; max-width: 100%; }
.home2 [hidden] { display: none !important; }
.home2 .h2-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.home2 kbd {
  display: inline-block; min-width: 1.5em; padding: 0 .4em; font: inherit; font-size: .9em; line-height: 1.5; text-align: center;
  color: var(--blue); background: #fff; border: 1px solid #d5ddff; border-bottom-width: 2px; border-radius: 5px;
}

/* ---------- 按钮 ---------- */
.home2 .h2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 30px; border-radius: 999px; font-size: 17px; font-weight: 600; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.home2 .h2-btn img { width: 22px; height: 22px; }
.home2 .h2-btn-main { background: #fff; color: var(--blue); box-shadow: 0 10px 30px rgba(20, 40, 160, .22); }
.home2 .h2-btn-main:hover { color: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 14px 36px rgba(20, 40, 160, .3); }
.home2 .h2-btn-ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); }
.home2 .h2-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.home2 .h2-btn-solid { background: var(--blue); color: #fff; box-shadow: 0 10px 30px rgba(37, 77, 255, .35); }
.home2 .h2-btn-solid:hover { background: var(--blue-dark); color: #fff; }

/* ---------- 首屏 ---------- */
.home2 .h2-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(255, 255, 255, .35), transparent 60%),
    linear-gradient(125deg, #22cfee 0%, #4fa7ff 45%, #5f86ff 75%, #8ea8ff 100%);
}
.home2 .h2-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 90px;
  background: linear-gradient(transparent, #fff);
}
.home2 .h2-hero-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 96px;
}
.home2 .h2-hero-text h1 img { width: min(440px, 100%); height: auto; }
.home2 .h2-lead { margin-top: 24px; max-width: 30em; font-size: 16px; line-height: 1.9; opacity: .92; }
.home2 .h2-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.home2 .h2-modes li { padding: 3px 14px; border-radius: 999px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); font-size: 13px; }
.home2 .h2-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.home2 .h2-hero-visual { position: relative; }
.home2 .h2-shot {
  border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 11;
  box-shadow: 0 30px 70px rgba(16, 40, 140, .35); border: 6px solid rgba(255, 255, 255, .55);
}
.home2 .h2-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 100%; }
.home2 .h2-fly { position: absolute; left: -9%; top: -14%; width: 30%; animation: h2-float 4s ease-in-out infinite; }
.home2 .h2-type { position: absolute; left: -12%; bottom: -10%; width: 62%; filter: drop-shadow(0 14px 24px rgba(16, 40, 140, .25)); }
@keyframes h2-float { 50% { transform: translateY(-10px); } }

/* ---------- 通用区块 ---------- */
.home2 .h2-section { padding: 88px 0; }
.home2 .h2-soft { background: var(--soft); }
.home2 .h2-head { text-align: center; margin-bottom: 40px; }
.home2 .h2-head h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 700; line-height: 1.3; }
.home2 .h2-head h2 span { color: var(--orange); }
.home2 .h2-head p { margin-top: 10px; color: var(--sub); font-size: 15px; }
.home2 .h2-link { text-align: center; margin-top: 32px; }
.home2 .h2-link a { color: var(--blue); font-weight: 600; }
.home2 .h2-link a:hover { text-decoration: underline; }

/* ---------- 功能卡片 ---------- */
.home2 .h2-features-wrap { padding-top: 0; margin-top: -40px; position: relative; z-index: 2; }
.home2 .h2-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.home2 .h2-feature {
  display: flex; flex-direction: column; padding: 26px 24px; border-radius: 16px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(28, 59, 166, .08);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.home2 a.h2-feature:hover { color: var(--ink); transform: translateY(-4px); border-color: #c9d4ff; box-shadow: 0 18px 40px rgba(37, 77, 255, .14); }
.home2 .h2-feature i {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  font-style: normal; font-weight: 800; font-size: 17px; color: #fff; background: linear-gradient(135deg, #4d6bff, var(--blue));
}
.home2 .h2-feature:nth-child(2) i { background: linear-gradient(135deg, #ff8a4c, var(--orange)); }
.home2 .h2-feature:nth-child(3) i { background: linear-gradient(135deg, #34c6e8, #0ea5c9); }
.home2 .h2-feature:nth-child(4) i { background: linear-gradient(135deg, #9a6bff, #6a3cf0); }
.home2 .h2-feature h3 { font-size: 18px; line-height: 1.4; }
.home2 .h2-feature p { margin-top: 10px; color: var(--sub); font-size: 14px; line-height: 1.8; flex: 1; }
.home2 .h2-more { margin-top: 16px; color: var(--blue); font-size: 14px; font-weight: 600; }

/* ---------- AI 标签切换 ---------- */
.home2 .h2-tabs { display: flex; justify-content: center; gap: 6px; width: max-content; margin: 0 auto 28px; padding: 5px; border-radius: 999px; background: var(--soft); }
.home2 .h2-tabs button {
  border: 0; cursor: pointer; padding: 9px 26px; border-radius: 999px; font: inherit; font-size: 15px;
  color: var(--sub); background: transparent; transition: background .2s, color .2s;
}
.home2 .h2-tabs button:hover { color: var(--blue); }
.home2 .h2-tabs button[aria-selected="true"] { color: #fff; background: var(--blue); box-shadow: 0 6px 16px rgba(37, 77, 255, .3); }
.home2 .h2-tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.home2 .h2-ai-stage { max-width: 1040px; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(28, 59, 166, .14); }
.home2 .h2-ai-stage img { width: 100%; height: auto; }

/* ---------- 桌面宠物 ---------- */
.home2 .h2-pets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.home2 .h2-pet { border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.home2 .h2-pet:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(28, 59, 166, .12); }
.home2 .h2-pet-img { position: relative; aspect-ratio: 2888 / 1420; }
.home2 .pet-poster { width: 100%; height: 100%; object-fit: cover; }
.home2 .pet-overlay { position: absolute; object-fit: contain; pointer-events: none; }
.home2 .pet-1 .pet-overlay { width: 53.5%; height: 81.7%; left: 23.8%; bottom: 17.8%; }
.home2 .pet-2 .pet-overlay { width: 26.78%; height: 81.69%; left: 47.99%; bottom: 6.62%; }
.home2 .pet-3 .pet-overlay { width: 26.78%; height: 81.69%; left: 43.35%; bottom: 17.75%; }
.home2 .pet-4 .pet-overlay { width: 26.78%; height: 81.69%; left: 45.76%; bottom: 23.66%; }
.home2 .h2-pet figcaption { padding: 14px 20px; font-weight: 600; font-size: 15px; }

/* ---------- 皮肤滚动 ---------- */
.home2 .h2-marquee { overflow: hidden; }
.home2 .h2-marquee-track { display: flex; width: max-content; animation: h2-scroll 40s linear infinite; }
.home2 .h2-marquee-track:hover { animation-play-state: paused; }
.home2 .h2-marquee-track img { flex: none; width: max(1400px, 110vw); height: auto; margin-right: 24px; }
@keyframes h2-scroll { to { transform: translateX(-50%); } }

/* ---------- 手机端 ---------- */
.home2 .h2-mobile { width: 100%; height: auto; }

/* ---------- 三步安装 ---------- */
.home2 .h2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.home2 .h2-steps li { position: relative; padding: 30px 28px; border-radius: 16px; background: linear-gradient(180deg, #f2f5ff, #fff 75%); border: 1px solid #e8edfb; }
.home2 .h2-steps li:not(:last-child)::after {
  content: ""; position: absolute; right: -15px; top: 42px; width: 10px; height: 10px; z-index: 1;
  border: solid #b9c6f5; border-width: 2px 2px 0 0; transform: rotate(45deg);
}
.home2 .h2-steps b { display: block; font-size: 34px; line-height: 1; font-weight: 800; color: var(--blue); margin-bottom: 16px; }
.home2 .h2-steps h3 { font-size: 18px; }
.home2 .h2-steps p { margin-top: 8px; color: var(--sub); font-size: 14px; line-height: 1.8; }

/* ---------- 使用教程 ---------- */
.home2 .h2-help { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.home2 .h2-cats { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.home2 .h2-cats a { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-size: 15px; }
.home2 .h2-cats a:hover { background: var(--soft); color: var(--blue); }
.home2 .h2-cats em { font-style: normal; font-size: 12px; color: var(--sub); }
.home2 .h2-posts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.home2 .h2-posts a {
  display: block; height: 100%; padding: 18px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.home2 .h2-posts a:hover { border-color: #c9d4ff; box-shadow: 0 10px 28px rgba(37, 77, 255, .1); color: var(--ink); }
.home2 .h2-posts strong { display: block; font-size: 16px; line-height: 1.5; }
.home2 .h2-posts a:hover strong { color: var(--blue); }
.home2 .h2-posts span { display: -webkit-box; margin-top: 6px; color: var(--sub); font-size: 13px; line-height: 1.7; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 底部下载 ---------- */
.home2 .h2-cta { padding: 72px 0; text-align: center; background: linear-gradient(125deg, #22cfee 0%, #4fa7ff 45%, #5f86ff 100%); }
.home2 .h2-cta img:first-child { width: min(360px, 80%); height: auto; margin: 0 auto 28px; }

/* 首屏下载按钮滚出视野后出现的悬浮按钮 */
.home2 .h2-float { position: fixed; right: 28px; bottom: 28px; z-index: 40; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .25s; }
.home2 .h2-float.visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .home2 .h2-hero-grid { grid-template-columns: 1fr; gap: 56px; padding-top: 48px; }
  .home2 .h2-hero-text { text-align: center; }
  .home2 .h2-lead { margin-left: auto; margin-right: auto; }
  .home2 .h2-modes, .home2 .h2-actions { justify-content: center; }
  .home2 .h2-hero-text h1 img { margin: 0 auto; }
  .home2 .h2-hero-visual { max-width: 640px; margin: 0 auto; width: 88%; }
  .home2 .h2-features { grid-template-columns: repeat(2, 1fr); }
  .home2 .h2-help { grid-template-columns: 1fr; }
  .home2 .h2-cats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .home2 .h2-wrap { padding: 0 16px; }
  .home2 .h2-section { padding: 56px 0; }
  .home2 .h2-head { margin-bottom: 28px; }
  .home2 .h2-lead { font-size: 15px; }
  .home2 .h2-btn { height: 46px; padding: 0 24px; font-size: 16px; }
  .home2 .h2-hero-grid { gap: 44px; padding-bottom: 80px; }
  .home2 .h2-fly { left: -2%; top: -16%; }
  .home2 .h2-type { left: -4%; bottom: -12%; width: 66%; }
  .home2 .h2-features { grid-template-columns: 1fr; }
  .home2 .h2-features-wrap { margin-top: -24px; }
  .home2 .h2-pets, .home2 .h2-steps, .home2 .h2-posts { grid-template-columns: 1fr; }
  .home2 .h2-steps li:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -13px; transform: translateX(-50%) rotate(135deg); }
  .home2 .h2-cats { grid-template-columns: repeat(2, 1fr); }
  .home2 .h2-tabs button { padding: 8px 18px; font-size: 14px; }
  .home2 .h2-ai-stage { border-radius: 14px; }
  .home2 .h2-float { left: 16px; right: 16px; bottom: 16px; }
  .home2 .h2-float .h2-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .home2 .h2-fly, .home2 .h2-marquee-track { animation: none; }
}
