/* =============================================================
   TG 代理助手 · 官网首页样式（营销页专属，加载在 app.css 之后）
   依赖 app.css 的 :root 设计 token —— 不要在这里重复定义颜色/圆角，
   改主题色只改 app.css 一处。
   ============================================================= */

body { background: #fff; color: var(--ink); overflow-x: hidden; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ===================== 导航 ===================== */
.nav-in { display: flex; align-items: center; height: 64px; gap: 24px; }
/* 复用 app.css 的 .topbar 容器，这里只补首页特有的居中链接组 */
.nav-links { display: flex; gap: 26px; font-size: var(--fs-body); margin: 0 auto; }
.nav-links a { padding: 6px 2px; position: relative; }
.nav-links a:hover { color: var(--green-dark); }
.nav-links a[aria-current="page"]::after {
    content: ""; position: absolute; left: 50%; transform: translateX(-50%);
    bottom: -2px; width: 18px; height: 3px; border-radius: 2px; background: var(--green);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.btn-dark {
    background: var(--ink); color: #fff; border-radius: 999px;
    padding: 10px 24px; font-size: var(--fs-body); font-weight: 600; display: inline-block;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.nav-login { font-size: var(--fs-body); font-weight: 600; }
.nav-login:hover { color: var(--green-dark); }
.nav-reg { font-size: var(--fs-body); color: var(--green-dark); font-weight: 700; }

/* ===================== Hero ===================== */
.hero { position: relative; text-align: center; background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%); padding: 84px 0 0; overflow: hidden; }
.hero .watermark {
    position: absolute; left: -70px; top: 220px; z-index: 0;
    font-size: 190px; font-weight: 900; font-style: italic; line-height: .88;
    color: #eef1f0; letter-spacing: -6px; transform: rotate(-8deg);
    user-select: none; pointer-events: none; white-space: pre-line;
}
.hero-in { position: relative; z-index: 1; }
.h1-wrap { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.h-title { font-size: 58px; font-weight: 900; letter-spacing: -1px; line-height: 1.08; margin: 0; }
.h-title .mark { font-style: italic; text-align: left; line-height: .95; letter-spacing: -2px; }
.h-title .mark em { color: var(--green); font-style: normal; }
.h-title .mark .dot { display: inline-block; width: 14px; height: 14px; background: var(--green); border-radius: 3px; margin-left: 4px; }
.nav-in .brand em { color: var(--green); font-style: normal; }
.h-sub { margin: 24px auto 0; max-width: 660px; font-size: 17px; color: var(--sub); line-height: 1.9; }
.h-cta { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-green {
    background: var(--green); color: #fff; border-radius: var(--radius-sm); padding: 14px 30px;
    font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 8px 20px rgba(0,195,101,.3); transition: transform .15s ease, box-shadow .15s ease;
}
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,195,101,.4); }
.btn-outline {
    border: 1.5px solid var(--green); color: var(--green-dark); border-radius: var(--radius-sm);
    padding: 13px 30px; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; background: #fff;
}
.btn-outline:hover { background: var(--green-soft); }
/* 竞品标配的信任行：紧跟主 CTA，回答"我为什么要信你" */
.h-trust { margin-top: 16px; font-size: var(--fs-xs); color: var(--hint); display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.h-trust span { display: inline-flex; align-items: center; gap: 5px; }
.h-trust .tick { color: var(--green); font-weight: 900; }

.h-stats { margin: 44px auto 0; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.h-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 24px; font-size: var(--fs-sm); color: var(--sub); min-width: 128px; }
.h-stat b { display: block; font-size: 22px; color: var(--ink); font-weight: 900; letter-spacing: -.5px; }
.h-stat b em { color: var(--green); font-style: normal; }
/* 统计值由 home.js 从 /api 真实数据填充。
   没拿到数据就保持隐藏 —— 宁可不给数字，也不放写死的假数字。 */
.h-stats[data-pending] { display: none; }
.h-stat.is-hidden { display: none; }
[data-version][data-empty] { display: none; }

/* ===================== 产品演示卡 ===================== */
.demo { margin: 48px auto 0; max-width: 920px; position: relative; z-index: 1; }
.demo-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: 0 -8px 60px rgba(23,24,26,.08); overflow: hidden; text-align: left; }
.demo-bar { display: flex; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.demo-bar i { width: 11px; height: 11px; border-radius: 50%; }
.demo-bar i:nth-child(1) { background: #ff5f57; } .demo-bar i:nth-child(2) { background: #febc2e; } .demo-bar i:nth-child(3) { background: #28c840; }
.demo-body { display: flex; }
.demo-side { width: 190px; background: var(--bg-soft); padding: 16px 14px; border-right: 1px solid var(--line); flex: none; }
.demo-side .t { font-weight: 900; font-size: var(--fs-xs); margin-bottom: var(--sp-3); }
.demo-side .row { font-size: var(--fs-xs); color: var(--sub); padding: 7px 9px; border-radius: 8px; }
.demo-side .row.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.demo-main { flex: 1; padding: 20px 24px 26px; min-width: 0; }
.demo-main .cap { font-size: var(--fs-sm); font-weight: 700; margin-bottom: 14px; }
.node-row { display: flex; align-items: center; gap: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 9px; font-size: var(--fs-sm); }
.node-row .flag { width: 30px; height: 30px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 800; color: #fff; }
.node-row .nm { font-weight: 600; }
.node-row .meta { color: var(--hint); font-size: var(--fs-xxs); margin-top: 2px; }
.node-row .ms { margin-left: auto; font-weight: 800; font-size: var(--fs-xs); }
.ms.good { color: var(--green); } .ms.mid { color: #e8a13a; }
.demo-connect { margin-top: 14px; background: linear-gradient(90deg, var(--green), #12d47f); border-radius: var(--radius-sm); color: #fff; font-weight: 800; font-size: var(--fs-body); text-align: center; padding: 13px; letter-spacing: 2px; }

/* 演示卡里的国旗色与多端图标色。
   用 data-c 属性选择器而不是内联 style：CSP 收紧到 style-src 'self' 之后，
   任何 style="..." 都会被浏览器直接拒绝（控制台报违规且样式不生效）。 */
.node-row .flag[data-c="jp"] { background: #e8543f; }
.node-row .flag[data-c="sg"] { background: #3f6be8; }
.node-row .flag[data-c="us"] { background: #8a4fe8; }
.node-row .flag[data-c="hk"] { background: #0aa574; }
.node-row .flag[data-c="de"] { background: #c23f77; }

.eco-cell i[data-c="android"] { background: var(--green); }
.eco-cell i[data-c="windows"] { background: #3f6be8; }
.eco-cell i[data-c="web"] { background: #5f6368; }
.eco-cell i[data-c="telegram"] { background: #29a9eb; }
.eco-cell i[data-c="sub"] { background: #8a4fe8; }
.eco-cell i[data-c="cloud"] { background: var(--ink); }

.section.soft { background: var(--bg-soft); }
#feat .cta-band { margin-top: 64px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===================== 通用区块头 ===================== */
.section { padding: 88px 0; }
.section.tight { padding-top: 28px; }
.sec-title { text-align: center; font-size: 40px; font-weight: 900; letter-spacing: -1px; margin: 0; }
.sec-sub { text-align: center; color: var(--sub); font-size: 15px; margin: 14px auto 0; max-width: 620px; }

/* ===================== 场景 Tabs ===================== */
.scene { background: var(--bg-soft); }
.scene-in { display: flex; gap: 48px; margin-top: 44px; align-items: flex-start; }
.tabs { display: flex; gap: 6px; background: #fff; border-radius: var(--radius-sm); padding: 6px; width: fit-content; box-shadow: var(--shadow-md); flex-wrap: wrap; }
.tab { padding: 10px 20px; border-radius: 10px; font-size: var(--fs-body); font-weight: 700; color: var(--sub); cursor: pointer; border: none; background: none; font-family: inherit; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--green); color: #fff; }
.scene-left { flex: 1; min-width: 0; }
.scene-h { font-size: 30px; font-weight: 900; line-height: 1.3; letter-spacing: -.5px; margin: 26px 0 0; }
.scene-h small { display: block; font-size: 26px; }
.scene-p { color: var(--sub); font-size: 15px; line-height: 1.9; margin-top: 16px; max-width: 460px; }
.phone { width: 380px; flex: none; background: var(--ink); border-radius: 36px; padding: 14px; box-shadow: 0 30px 60px rgba(23,24,26,.25); }
.phone-scr { background: #fff; border-radius: 26px; padding: 18px 16px 20px; min-height: 470px; }
.phone-cap { text-align: center; font-size: var(--fs-xs); color: var(--hint); margin-bottom: 14px; }
.pane[hidden] { display: none; }

/* ===================== 多端覆盖 =====================
   原实现是 640×560 的绝对定位环形，5 个 .eco-item 靠 left/top 百分比摆位，
   移动端只能靠 transform:scale(.62) 视觉缩放 —— 布局盒仍是 640px，照样溢出，
   而且缩放后文字小到看不清。改成常规自适应网格，窄屏自然折行。 */
.eco-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 44px; max-width: 940px; margin-left: auto; margin-right: auto; }
.eco-cell {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; display: flex; align-items: center; gap: var(--sp-3);
    font-weight: 700; font-size: 15px; transition: transform .18s ease, box-shadow .18s ease;
}
.eco-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.eco-cell i {
    width: 38px; height: 38px; border-radius: 11px; flex: none;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: var(--fs-sm); font-style: normal;
}
.eco-cell small { display: block; font-size: var(--fs-xxs); font-weight: 500; color: var(--hint); margin-top: 3px; }

/* ===================== 功能网格 ===================== */
.grid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.f-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; transition: transform .18s ease, box-shadow .18s ease; }
.f-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.f-ico { width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green-dark); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.f-card h3 { font-size: 17px; font-weight: 800; margin-top: 18px; }
.f-card p { color: var(--sub); font-size: 13.5px; line-height: 1.85; margin-top: 9px; }

/* ===================== FAQ（原生 details，零 JS） ===================== */
.faq { max-width: 820px; margin: 40px auto 0; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: 10px; overflow: hidden; }
.faq summary {
    cursor: pointer; padding: 16px 20px; font-size: 15px; font-weight: 700;
    list-style: none; display: flex; align-items: center; gap: var(--sp-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--green-dark); font-size: 20px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: var(--bg-soft); }
.faq .a { padding: 0 20px 18px; color: var(--sub); font-size: var(--fs-sm); line-height: 1.9; border-top: 1px solid var(--line); padding-top: 14px; }

/* ===================== CTA ===================== */
.cta-band { background: linear-gradient(135deg, #eafaf2 0%, #d6f5e6 100%); border-radius: var(--radius-lg); padding: 56px 52px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { font-size: 34px; font-weight: 900; letter-spacing: -1px; line-height: 1.25; margin: 0; }
.cta-band p { color: var(--sub); margin-top: var(--sp-3); font-size: 15px; }
.cta-band .ver { display: inline-block; margin-top: 14px; background: #fff; border-radius: 999px; padding: 6px 14px; font-size: var(--fs-xs); color: var(--green-dark); font-weight: 700; }
/* 版本号由 home.js 填真实值；取不到时整条隐藏 */
.cta-band .ver[data-empty] { display: none; }

/* ===================== 页脚 ===================== */
.site-footer { background: var(--bg-soft); margin-top: 88px; padding: 56px 0 0; overflow: hidden; }
.foot-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.foot-card { background: #fff; border-radius: var(--radius-sm); padding: 22px; }
.foot-card h4 { font-size: var(--fs-body); font-weight: 800; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.foot-card a, .foot-card span { display: block; font-size: var(--fs-sm); color: var(--sub); padding: 6px 0; word-break: break-all; }
.foot-card a:hover { color: var(--green-dark); }
.foot-mark { text-align: center; font-size: clamp(56px, 11vw, 140px); font-weight: 900; font-style: italic; color: #e8ecea; letter-spacing: -4px; line-height: 1; margin-top: 36px; user-select: none; }
.foot-mark em { color: #d3e8dc; font-style: italic; }
.foot-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 22px 0 26px; font-size: var(--fs-xs); color: var(--hint); }

/* ===================== 响应式 ===================== */
@media (max-width: 1080px) {
    .grid6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
    .nav-links { display: none; }
    .h-title { font-size: 38px; }
    .hero .watermark { display: none; }
    .scene-in { flex-direction: column; }
    .phone { width: 100%; max-width: 380px; }
    .demo-side { display: none; }
    .cta-band { padding: 36px 26px; }
    .sec-title { font-size: 30px; }
    .section { padding: 60px 0; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 18px; }
    .nav-in { height: 58px; gap: var(--sp-3); }
    .nav-cta { gap: 10px; }
    .nav-login, .nav-reg { font-size: var(--fs-sm); }
    .btn-dark { padding: 8px 16px; font-size: var(--fs-sm); }
    .hero { padding: 52px 0 0; }
    .h-title { font-size: 30px; }
    .h-sub { font-size: 15px; margin-top: 18px; }
    .h-cta { margin-top: 24px; }
    .h-cta .btn-green, .h-cta .btn-outline { width: 100%; justify-content: center; }
    .h-stat { flex: 1 1 44%; min-width: 0; padding: 12px 16px; }
    .grid6 { grid-template-columns: 1fr; }
    .eco-cell { padding: 16px; font-size: var(--fs-body); }
    .eco-cell i { width: 32px; height: 32px; font-size: var(--fs-xs); }
    .cta-band h2 { font-size: 26px; }
    .cta-actions { width: 100%; }
    .cta-band .btn-green, .cta-band .btn-outline { width: 100%; justify-content: center; }
    .scene-h { font-size: 24px; }
    .scene-h small { font-size: 20px; }
}

/* 尊重系统的减弱动效设置 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
