/* ==========================================================
   首页（index.php）专用样式：多彩渐变 + 卡片 + 界面示意
   只在 index.php 加载（header.php 的 $extraCss）
   ========================================================== */
.n2 {
  --tg: #2aabee; --tg-d: #1c8fd0;
  --violet: #7c5cff; --pink: #ff5c8a; --orange: #ff9f43;
  --green: #22c55e; --cyan: #06b6d4; --amber: #f59e0b;
  --ink: #0f172a; --sub: #5b6474; --soft: #f5f8fc;
  overflow-x: hidden;
  color: var(--ink);
}
.n2 .wrap { max-width: 1120px; }
.n2 section { position: relative; }
.n2 h2 { font-size: 34px; letter-spacing: -.01em; margin-bottom: 12px; }

/* ---------- 通用：标签、按钮、渐变文字 ---------- */
.n2-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--ac, var(--tg)); background: color-mix(in srgb, var(--ac, var(--tg)) 12%, #fff);
  margin-bottom: 14px;
}
.n2-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.n2-grad {
  background: linear-gradient(90deg, var(--tg) 0%, var(--violet) 55%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.n2-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.n2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 168px; padding: 13px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 700; transition: transform .2s, box-shadow .2s;
}
.n2-btn:hover { transform: translateY(-2px); }
.n2-btn-main { color: #fff; background: linear-gradient(135deg, var(--tg), var(--violet)); box-shadow: 0 10px 24px rgba(42,171,238,.35); }
.n2-btn-main:hover { color: #fff; box-shadow: 0 14px 30px rgba(124,92,255,.38); }
.n2-btn-line { color: var(--ink); background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 4px 14px rgba(15,23,42,.06); }
.n2-btn-line:hover { color: var(--tg-d); border-color: var(--tg); }

/* ---------- 1. 首屏（品牌区 + 主标题 + 桌面端截图） ---------- */
.n2-hero {
  padding: 36px 0 0; text-align: center;
  background:
    radial-gradient(45% 40% at 12% 8%, rgba(42,171,238,.28), transparent 70%),
    radial-gradient(40% 38% at 88% 12%, rgba(124,92,255,.24), transparent 70%),
    radial-gradient(38% 30% at 70% 70%, rgba(255,92,138,.14), transparent 70%),
    radial-gradient(35% 30% at 20% 75%, rgba(34,197,94,.12), transparent 70%),
    linear-gradient(180deg, #f3faff 0%, #fff 100%);
}
.n2-hero .tl_main_logo_wrap { padding: 8px 0 4px; }
.n2-hero .tl_main_logo_lead { padding-bottom: 0; }
.n2-hero h1 { font-size: 46px; line-height: 1.25; margin: 26px auto 14px; max-width: 820px; letter-spacing: -.02em; }
.n2-lead { color: var(--sub); font-size: 17px; max-width: 640px; margin: 0 auto 28px; }
.n2-platforms { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 26px 0 8px; }
.n2-platforms span {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: #fff; border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); color: var(--c);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--c) 14%, transparent);
}
.n2-hero .tl_main_download_desktop_section { margin-top: 18px; }

/* ---------- 2. 为什么选择（沿用首页的贴纸图） ---------- */
.n2-why { padding: 84px 0; }
.n2-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.n2-head p { color: var(--sub); margin: 0; }
.n2-why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.n2-why-card {
  --c: var(--tg);
  border-radius: 20px; padding: 26px 24px; display: flex; gap: 18px; align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 12%, #fff), #fff 70%);
  border: 1px solid color-mix(in srgb, var(--c) 18%, #fff);
  transition: transform .25s, box-shadow .25s;
}
.n2-why-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px color-mix(in srgb, var(--c) 22%, transparent); }
.n2-why-card img { width: 72px; height: 72px; flex: none; object-fit: contain; }
.n2-why-card h3 { font-size: 18px; margin: 0 0 4px; color: color-mix(in srgb, var(--c) 75%, #0f172a); }
.n2-why-card p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.6; }

/* ---------- 3. 功能区：文字 + 彩色舞台上的界面示意 ---------- */
.n2-feature { padding: 88px 0; }
.n2-feature.is-tint { background: linear-gradient(180deg, var(--soft), #fff); }
.n2-feature .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.n2-feature.is-flip .n2-stage { order: -1; }
.n2-feature p.n2-desc { color: var(--sub); font-size: 16px; margin-bottom: 22px; }
.n2-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.n2-points li {
  position: relative; padding: 14px 16px 14px 56px; border-radius: 14px; background: #fff;
  border: 1px solid #edf1f6; box-shadow: 0 2px 10px rgba(15,23,42,.04);
}
.n2-points li::before {
  content: "✓"; position: absolute; left: 16px; top: 15px; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--ac), var(--ac2));
}
.n2-points strong { display: block; font-size: 16px; margin-bottom: 2px; }
.n2-points span { color: var(--sub); font-size: 14px; }
.n2-points a { color: var(--ac); font-size: 13px; font-weight: 600; margin-right: 10px; }

.n2-stage {
  position: relative; border-radius: 28px; padding: 44px 38px;
  background: linear-gradient(135deg, var(--ac) 0%, var(--ac2) 100%);
  box-shadow: 0 24px 50px color-mix(in srgb, var(--ac) 30%, transparent);
  overflow: hidden; isolation: isolate;
}
.n2-stage::before, .n2-stage::after {
  content: ""; position: absolute; border-radius: 50%; z-index: -1; background: rgba(255,255,255,.18);
}
.n2-stage::before { width: 240px; height: 240px; top: -90px; right: -70px; }
.n2-stage::after  { width: 160px; height: 160px; bottom: -60px; left: -40px; background: rgba(255,255,255,.12); }

.n2-ac-blue   { --ac: #2aabee; --ac2: #5b7cfa; }
.n2-ac-violet { --ac: #7c5cff; --ac2: #c056f5; }
.n2-ac-green  { --ac: #10b981; --ac2: #06b6d4; }
.n2-ac-sunset { --ac: #ff7a59; --ac2: #ff5c8a; }

/* 窗口与聊天示意（CSS 绘制，非第三方截图） */
.n2-window { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px rgba(15,23,42,.22); }
.n2-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #f6f8fb; border-bottom: 1px solid #eef1f5; font-size: 12px; color: var(--sub); }
.n2-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.n2-bar i:nth-child(1) { background: #ff5f57; } .n2-bar i:nth-child(2) { background: #febc2e; } .n2-bar i:nth-child(3) { background: #28c840; }
.n2-bar b { margin-left: 8px; font-weight: 600; color: var(--ink); }
.n2-chat {
  padding: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; min-height: 230px;
  background: linear-gradient(160deg, #e7f6e9 0%, #d9f0fb 50%, #ece4fb 100%);
}
.n2-msg { max-width: 76%; padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: #fff; line-height: 1.5; box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.n2-msg.me { align-self: flex-end; background: #effdde; border-radius: 16px 16px 4px 16px; }
.n2-msg small { display: block; text-align: right; font-size: 11px; color: #8a96a3; margin-top: 2px; }
.n2-msg.me small { color: #4fae4e; }
.n2-badge { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px; color: #fff; background: var(--ac); margin-left: 4px; }
.n2-voice { display: flex; align-items: center; gap: 8px; }
.n2-voice i { width: 30px; height: 30px; border-radius: 50%; background: var(--ac); flex: none; position: relative; }
.n2-voice i::after { content: ""; position: absolute; left: 11px; top: 9px; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.n2-wave { flex: 1; height: 18px; background: repeating-linear-gradient(90deg, var(--ac) 0 3px, transparent 3px 6px); -webkit-mask: linear-gradient(90deg, #000 60%, rgba(0,0,0,.3)); mask: linear-gradient(90deg, #000 60%, rgba(0,0,0,.3)); border-radius: 2px; }

.n2-setting { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; border-bottom: 1px solid #eef1f5; font-size: 14px; }
.n2-setting:last-child { border-bottom: 0; }
.n2-setting em { font-style: normal; color: var(--ac); font-weight: 600; }
.n2-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; font-size: 14px; margin-right: 10px; vertical-align: middle; }
.n2-switch { width: 40px; height: 22px; border-radius: 999px; background: var(--ac); position: relative; }
.n2-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }

.n2-tabs { display: flex; gap: 6px; padding: 12px 14px 4px; }
.n2-tabs span { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: var(--sub); }
.n2-tabs span.on { background: var(--ac); color: #fff; }
.n2-list { padding: 8px 14px 16px; display: grid; gap: 6px; }
.n2-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.n2-row:first-child { background: color-mix(in srgb, var(--ac) 10%, #fff); }
.n2-row .av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.n2-row div { flex: 1; min-width: 0; }
.n2-row div small { display: block; color: var(--sub); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n2-row em { font-style: normal; font-size: 11px; color: #fff; background: var(--ac); border-radius: 999px; padding: 1px 8px; }
.n2-tr { margin-top: 4px; padding-top: 6px; border-top: 1px dashed #cbd5e1; color: var(--ac); font-size: 13px; }

/* ---------- 4. 消息类型：彩色图标卡片 ---------- */
.n2-types { padding: 88px 0; }
.n2-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.n2-type {
  display: block; padding: 26px; border-radius: 20px; background: #fff; color: var(--ink);
  border: 1px solid #edf1f6; box-shadow: 0 4px 18px rgba(15,23,42,.05);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.n2-type:hover { color: var(--ink); transform: translateY(-4px); border-color: transparent; box-shadow: 0 18px 36px color-mix(in srgb, var(--c1) 24%, transparent); }
.n2-type .ic {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 18px color-mix(in srgb, var(--c1) 35%, transparent);
}
.n2-type h3 { font-size: 17px; margin-bottom: 6px; }
.n2-type p { color: var(--sub); font-size: 14px; margin: 0 0 14px; }
.n2-type .more { font-size: 13px; font-weight: 700; color: var(--c1); }

/* ---------- 5. 数字概览：深色渐变条 ---------- */
.n2-stats {
  padding: 64px 0; color: #fff;
  background:
    radial-gradient(40% 80% at 10% 0%, rgba(42,171,238,.55), transparent 70%),
    radial-gradient(40% 80% at 90% 100%, rgba(255,92,138,.45), transparent 70%),
    linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #5b21b6 100%);
}
.n2-stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.n2-stats b { display: block; font-size: 30px; line-height: 1.2; margin-bottom: 6px; background: linear-gradient(90deg, #7dd3fc, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.n2-stats span { color: rgba(255,255,255,.78); font-size: 14px; }

/* ---------- 6. 教程列表 ---------- */
.n2-tuts { padding: 88px 0 72px; }
.n2-tuts-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.n2-tuts-head h2 { margin: 0; }
.n2-tuts-head a { font-weight: 700; }
.n2-tut-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; counter-reset: tut; }
.n2-tut-grid li { counter-increment: tut; }
.n2-tut-grid a {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px;
  background: #fff; border: 1px solid #edf1f6; color: var(--ink); font-size: 15px; transition: border-color .2s, transform .2s;
}
.n2-tut-grid a:hover { border-color: var(--tg); transform: translateX(3px); color: var(--ink); }
.n2-tut-grid a::before {
  content: counter(tut, decimal-leading-zero); flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--tg), var(--violet));
}
.n2-tut-grid li:nth-child(4n+2) a::before { background: linear-gradient(135deg, #10b981, #06b6d4); }
.n2-tut-grid li:nth-child(4n+3) a::before { background: linear-gradient(135deg, #ff7a59, #ff5c8a); }
.n2-tut-grid li:nth-child(4n+4) a::before { background: linear-gradient(135deg, #f59e0b, #f97316); }

/* ---------- 7. 结尾 CTA：彩色渐变卡 ---------- */
.n2-final { padding: 0 0 88px; }
.n2-final-card {
  position: relative; overflow: hidden; text-align: center; color: #fff; border-radius: 32px; padding: 64px 24px;
  background: linear-gradient(120deg, #2aabee 0%, #7c5cff 50%, #ff5c8a 100%);
  box-shadow: 0 30px 60px rgba(124,92,255,.3);
}
.n2-final-card::before, .n2-final-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.14); }
.n2-final-card::before { width: 320px; height: 320px; top: -140px; left: -80px; }
.n2-final-card::after  { width: 260px; height: 260px; bottom: -130px; right: -60px; }
.n2-final-card h2 { color: #fff; position: relative; }
.n2-final-card p { color: rgba(255,255,255,.88); margin-bottom: 28px; position: relative; }
.n2-final-card .n2-btns { position: relative; }
.n2-final-card .n2-btn-main { background: #fff; color: #5b3df5; box-shadow: 0 10px 24px rgba(15,23,42,.18); }
.n2-final-card .n2-btn-line { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); box-shadow: none; }
.n2-final-card .n2-btn-line:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .n2-feature .wrap { grid-template-columns: 1fr; gap: 36px; }
  .n2-feature.is-flip .n2-stage { order: 0; }
  .n2-why-grid, .n2-type-grid { grid-template-columns: 1fr 1fr; }
  .n2-stats .wrap { grid-template-columns: 1fr 1fr; }
  .n2-hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .n2 h2 { font-size: 26px; }
  .n2-hero h1 { font-size: 28px; }
  .n2-why-grid, .n2-type-grid, .n2-tut-grid { grid-template-columns: 1fr; }
  .n2-stage { padding: 28px 18px; border-radius: 22px; }
  .n2-feature, .n2-types, .n2-why, .n2-tuts { padding: 56px 0; }
}

/* ---------- 深色主题 ---------- */
html[data-theme="dark"] .n2 { --ink: #e9edf1; --sub: #9aa6b2; --soft: #1b2733; }
html[data-theme="dark"] .n2-hero {
  background:
    radial-gradient(45% 40% at 12% 8%, rgba(42,171,238,.22), transparent 70%),
    radial-gradient(40% 38% at 88% 12%, rgba(124,92,255,.22), transparent 70%),
    linear-gradient(180deg, #17212b 0%, #17212b 100%);
}
html[data-theme="dark"] .n2-feature.is-tint { background: #1b2733; }
html[data-theme="dark"] .n2-points li,
html[data-theme="dark"] .n2-type,
html[data-theme="dark"] .n2-tut-grid a,
html[data-theme="dark"] .n2-btn-line,
html[data-theme="dark"] .n2-platforms span { background: #232e3c; border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .n2-why-card { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, #232e3c), #232e3c 70%); border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .n2-why-card h3 { color: #fff; }
html[data-theme="dark"] .n2-pill { background: color-mix(in srgb, var(--ac, var(--tg)) 22%, #17212b); }

/* 首屏：下载按钮位于「开启即时通讯新时代」上方（后台开启时显示） */
.n2-dl-top { margin: 14px auto 12px; }
