/* ========================================================
   爱代挂网 · xiaocheng 模板（重构版 · 现代简洁风）
   ======================================================== */

:root {
    /* 品牌色 */
    --primary: #4361ee;
    --primary-2: #4895ef;
    --primary-dark: #2f4fd1;
    --primary-soft: #eef3ff;

    /* 文字 */
    --ink: #0f172a;
    --ink-2: #475569;
    --ink-3: #94a3b8;

    /* 表面 */
    --bg: #f5f7fb;
    --card: #ffffff;
    --border: #e7ecf3;
    --border-strong: #dbe2ee;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.05);
    --shadow-md: 0 10px 30px rgba(67,97,238,.10);
    --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
*:focus { outline: none !important; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh; overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.6;
}

/* ---------- 导航 ---------- */
header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    transition: all .35s ease;
}
.nav-inner {
    max-width: 1120px; margin: 0 auto;
    padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
    transition: all .35s ease;
}
header.scrolled { background: rgba(255,255,255,.85); backdrop-filter: blur(18px); box-shadow: 0 1px 0 var(--border); }
header.scrolled .nav-inner { padding-top: 12px; padding-bottom: 12px; }

.logo {
    display: flex; align-items: center; gap: 9px; text-decoration: none;
    color: var(--ink); font-size: 19px; font-weight: 800; letter-spacing: -.3px;
}
.logo i { font-size: 22px; color: var(--primary); }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu ul { display: flex; list-style: none; gap: 28px; }
.nav-menu a.navlink {
    text-decoration: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500;
    transition: color .25s; position: relative;
}
.nav-menu a.navlink:hover { color: var(--primary); }
.nav-menu a.navlink::after {
    content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
    background: var(--grad); border-radius: 2px; transition: width .25s;
}
.nav-menu a.navlink:hover::after { width: 100%; }

.auth-buttons { display: flex; gap: 10px; }
.btn {
    padding: 9px 22px; border-radius: 999px; text-decoration: none;
    font-size: 14px; font-weight: 600; transition: all .25s; cursor: pointer;
    white-space: nowrap; border: 1.5px solid transparent;
}
.btn-login { color: var(--primary); border-color: var(--primary); background: rgba(255,255,255,.6); }
.btn-login:hover { background: var(--primary); color: #fff; }
.btn-reg { color: #fff; background: var(--grad); box-shadow: 0 6px 16px rgba(67,97,238,.28); }
.btn-reg:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(67,97,238,.36); }

/* 登录 / APP 下载：与主按钮蓝形成区分的强调色 */
.btn-green { color: var(--primary); border-color: var(--primary); background: rgba(255,255,255,.6); box-shadow: none; }
.btn-green:hover { background: rgba(255,255,255,.85); transform: translateY(-2px); }
.btn-amber { color: #fff; background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 6px 16px rgba(249,115,22,.28); }
.btn-amber:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(249,115,22,.36); }

.nav-toggle {
    display: none; background: none; border: none; font-size: 24px; color: var(--ink);
    cursor: pointer; padding: 4px;
}

/* ---------- 整页背景光晕（固定铺满） ---------- */
.page-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.page-bg::before, .page-bg::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(90px);
}
.page-bg::before {
    width: 620px; height: 620px; top: -180px; left: -140px;
    background: radial-gradient(circle, rgba(72,149,239,.30), transparent 70%);
}
.page-bg::after {
    width: 560px; height: 560px; bottom: -200px; right: -120px;
    background: radial-gradient(circle, rgba(67,97,238,.22), transparent 70%);
}

/* ---------- Hero ---------- */
.hero {
    position: relative; padding: 150px 24px 80px;
    display: flex; justify-content: center; overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 760px; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--primary); background: var(--primary-soft);
    border: 1px solid rgba(67,97,238,.15); margin-bottom: 22px;
}

.hero-title {
    font-size: clamp(24px, 6.2vw, 60px); font-weight: 850; line-height: 1.1;
    letter-spacing: -1px; color: var(--ink); margin-bottom: 18px;
    white-space: nowrap;
}
.hero-title .hl {
    background: var(--grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    font-size: 16.5px; color: var(--ink-2); max-width: 560px; margin: 0 auto 36px;
}

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-ghost {
    color: var(--ink); background: #fff; border: 1.5px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* 统计 + 已运行（同一张卡片） */
.hero-stats {
    display: block; text-align: center; margin-top: 52px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    overflow: hidden; max-width: 560px; margin-left: auto; margin-right: auto;
}

/* 顶部「已运行」条 */
.uptime-top {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 14px 16px; font-size: 14px; color: var(--ink-3); line-height: 1.4;
    border-bottom: 1px solid var(--border);
}
.uptime-ico { color: rgba(67,97,238,.42); font-size: 17px; }
.uptime-top b {
    color: var(--ink); font-weight: 700;
    font-variant-numeric: tabular-nums; margin: 0 1px;
}

/* 下部三项统计 */
.stat-row { display: flex; justify-content: center; }
.stat {
    flex: 1; padding: 18px 10px; position: relative; text-align: center;
    overflow: hidden;
}
.stat + .stat::before {
    content: ''; position: absolute; left: 0; top: 22%; height: 56%; width: 1px;
    background: var(--border); z-index: 2;
}
/* 每个统计项的大号半透明图标背景（右下角水印，完整可见） */
.stat-bg {
    position: absolute; right: 6px; bottom: 6px;
    font-size: 56px; line-height: 1; color: var(--primary);
    opacity: .12; pointer-events: none; z-index: 0;
}
.stat > *:not(.stat-bg) { position: relative; z-index: 1; }
.stat-num { font-size: 25px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-num small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.stat-label { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 通用区块 ---------- */
.section { padding: 80px 24px; position: relative; }
/* 紧邻 Hero 的功能区，顶部留白减半，避免与统计卡片之间出现大块空白 */
#features { padding-top: 30px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-tag {
    display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1px;
    color: var(--primary); text-transform: uppercase; margin-bottom: 10px;
}
.section-title { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.section-sub { font-size: 15.5px; color: var(--ink-2); margin-top: 10px; }

/* ---------- 功能网格 ---------- */
.feat-grid {
    max-width: 1000px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.feat-item {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 15px 12px; border-radius: var(--radius-md);
    background: var(--card); border: 1px solid var(--border);
    color: var(--ink); font-size: 14.5px; font-weight: 600;
    transition: all .25s ease; user-select: none;
    white-space: nowrap; overflow: hidden;
}
.feat-item img,
.feat-item svg {
    width: 24px; height: 24px; flex-shrink: 0; object-fit: contain;
}
.feat-item svg { fill: var(--primary); }
.feat-item span { overflow: hidden; text-overflow: ellipsis; }
.feat-item:hover { background: var(--primary-soft); border-color: rgba(67,97,238,.35); transform: translateY(-2px); }

/* ---------- 功能列表末尾补齐：桌面 4 列时让最后两项各跨 2 列对齐 ---------- */
@media (min-width: 981px) {
    .feat-grid > .feat-item:nth-last-child(1),
    .feat-grid > .feat-item:nth-last-child(2) {
        grid-column: span 2;                /* 最后两项各占两列，整行对齐 */
    }
}

/* ---------- CTA 横幅 ---------- */
.cta-band {
    max-width: 1000px; margin: 0 auto 60px; padding: 0 24px;
}
.cta-inner {
    background: var(--grad); border-radius: 24px; padding: 46px 32px;
    text-align: center; color: #fff; position: relative; overflow: hidden;
    box-shadow: var(--shadow-md);
}
.cta-inner::before {
    content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px;
    background: rgba(255,255,255,.12); border-radius: 50%;
}
.cta-inner::after {
    content: ''; position: absolute; bottom: -80px; left: -40px; width: 240px; height: 240px;
    background: rgba(255,255,255,.10); border-radius: 50%;
}
.cta-inner h3 { font-size: 24px; font-weight: 800; margin-bottom: 10px; position: relative; }
.cta-inner p { font-size: 15px; opacity: .92; margin-bottom: 24px; position: relative; }
.cta-inner .btn-white {
    background: #fff; color: var(--primary-dark); box-shadow: 0 8px 20px rgba(0,0,0,.15);
    position: relative;
}
.cta-inner .btn-white:hover { transform: translateY(-2px); }

/* ---------- 底部 ---------- */
footer { border-top: 1px solid var(--border); background: #fff; }
.footer-inner {
    max-width: 1120px; margin: 0 auto; padding: 32px 24px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.footer-logo { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; color: var(--ink); }
.footer-logo i { color: var(--primary); font-size: 18px; }
.footer-beian { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; transition: color .25s; }
.footer-links a:hover { color: var(--primary); }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .feat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-top: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(15,23,42,.08);
        max-height: 0; overflow: hidden; transition: max-height .35s ease;
    }
    .nav-menu.open { max-height: 360px; }
    .nav-menu ul { flex-direction: column; gap: 0; padding: 8px 24px; }
    .nav-menu a.navlink { display: block; padding: 13px 0; border-bottom: 1px solid var(--border); }
    .nav-menu a.navlink::after { display: none; }
    .auth-buttons { padding: 14px 24px 18px; }
    .auth-buttons .btn { flex: 1; text-align: center; }

    .hero { padding: 120px 18px 60px; }
    .hero-stats { margin-top: 40px; }
    .section { padding: 60px 18px; }
    #features { padding-top: 20px; }
    .cta-band { margin-bottom: 40px; }
    .feat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .reveal { transition: none; opacity: 1; transform: none; }
}
@media (max-width: 420px) {
    .feat-item { font-size: 13px; padding: 13px 8px; gap: 7px; }
    .feat-item img, .feat-item svg { width: 20px; height: 20px; }
    .stat-num { font-size: 22px; }
    .stat { padding: 14px 4px; }
    .stat-label { font-size: 11px; }
    .hero-cta .btn { width: 100%; max-width: 300px; justify-content: center; }
    .uptime-top { font-size: 12.5px; padding: 11px 12px; gap: 7px; }
    .uptime-ico { font-size: 15px; }
    .uptime-top b { margin: 0; }
}
