/* =========================================
   CSS Variables
========================================= */
:root {
    --primary: #2563EB;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.1);
    --primary-glow: rgba(37, 99, 235, 0.25);
    --accent: #7C3AED;
    --accent-light: rgba(124, 58, 237, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --bg: #ffffff;
    --bg-2: #f8faff;
    --bg-3: #f1f5fb;
    --bg-4: #e8eef8;

    --text-1: #0f172a;
    --text-2: #334155;
    --text-3: #64748b;
    --text-4: #94a3b8;

    --border: rgba(0, 0, 0, 0.07);
    --border-focus: rgba(37, 99, 235, 0.3);

    --shadow-xs: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,30,0.09);
    --shadow-lg: 0 20px 60px rgba(0,0,30,0.12);
    --shadow-blue: 0 8px 30px rgba(37,99,235,0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    --trans: all 0.3s var(--ease);

    --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* =========================================
   Reset & Base
========================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; transition: var(--trans); }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: var(--font); }

/* =========================================
   Utilities
========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: var(--radius-full);
    background: var(--primary-light); color: var(--primary);
    font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; margin-bottom: 16px;
}
.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800; line-height: 1.2;
    color: var(--text-1); margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.section-desc {
    font-size: 16px; color: var(--text-3);
    max-width: 580px; line-height: 1.8;
    text-align: center;
}
.text-center { text-align: center; }
.text-center .section-desc, .section-header .section-desc { margin: 0 auto; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   Navbar
========================================= */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 0 5%;
    height: 68px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: var(--trans);
}
.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,30,0.08);
    background: rgba(255, 255, 255, 0.96);
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 800; color: var(--text-1);
}
.logo-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 17px;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.logo-img {
    width: 36px; height: 36px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 2px 6px var(--primary-glow));
    transition: var(--trans);
}
.logo:hover .logo-img {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px var(--primary-glow));
}
.footer-logo-img {
    width: 48px; height: 48px;
    object-fit: contain;
    margin-bottom: 14px;
    filter: brightness(1.1);
}
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
    padding: 7px 14px; border-radius: var(--radius-sm);
    color: var(--text-2); font-weight: 500; font-size: 14.5px;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.nav-links a.active {
    color: var(--primary); font-weight: 700;
    background: var(--primary-light);
    position: relative;
}
.nav-links a.active::after {
    content: '';
    position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 2px; border-radius: 2px;
    background: var(--primary);
}
/* .nav-lang styles injected by navbar.js */
.mobile-btn {
    display: none; font-size: 22px; color: var(--text-1); cursor: pointer;
    background: none; border: none; padding: 4px 8px; line-height: 1;
    transition: color 0.2s;
}
.mobile-btn:hover { color: var(--primary); }

/* 移动端菜单面板（默认隐藏，768px 以下激活） */
.mobile-menu {
    display: none;
    position: fixed; top: 68px; left: 0; right: 0;
    background: #ffffff; border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    z-index: 998;
    padding: 16px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.mobile-nav-list { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 0 0 16px; padding: 0; }
.mobile-nav-list a {
    display: block; padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 16px; font-weight: 500; color: var(--text-1);
    transition: var(--trans);
}
.mobile-nav-list a:hover, .mobile-nav-list a.active {
    background: var(--primary-light); color: var(--primary);
}
.mobile-nav-list a.active { font-weight: 700; }
.mobile-dl-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; border-radius: var(--radius-lg);
    background: var(--primary); color: white; font-weight: 600; font-size: 15px;
    transition: var(--trans);
}
.mobile-dl-btn:hover { background: var(--primary-dark); }

/* 遮罩层 */
.mobile-overlay {
    display: none;
    position: fixed; inset: 0; top: 68px;
    background: rgba(0,0,0,0.3); z-index: 997;
    opacity: 0; transition: opacity 0.25s;
    pointer-events: none;
}

/* 打开状态 */
body.nav-open .mobile-menu {
    transform: translateY(0); opacity: 1; pointer-events: auto;
}
body.nav-open .mobile-overlay { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

/* =========================================
   Hero
========================================= */
.hero {
    position: relative;
    padding: 120px 8% 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
    overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37, 99, 235, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(124, 58, 237, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 10% 70%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
}
.hero-bg::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(37,99,235,0.12) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
}

.orb {
    position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: 0;
}
.orb-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
    top: -100px; left: -80px;
    animation: float1 10s ease-in-out infinite;
}
.orb-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 70%);
    top: 100px; right: -60px;
    animation: float2 13s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,20px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-20px,30px)} }

.hero-content { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; margin-bottom: 28px;
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px; font-weight: 600; color: var(--text-2);
    box-shadow: var(--shadow-xs);
}
.badge-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 4px var(--success); }
    50% { box-shadow: 0 0 10px var(--success), 0 0 20px rgba(16,185,129,0.4); }
}
.hero-title {
    font-size: clamp(40px, 6vw, 70px);
    font-weight: 900; line-height: 1.08;
    letter-spacing: -2px;
    margin-bottom: 24px; color: var(--text-1);
}
.hero-desc {
    font-size: 17px; color: var(--text-3);
    line-height: 1.9; margin-bottom: 40px;
    max-width: 520px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-start; margin-bottom: 48px; }
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 13px 26px; border-radius: var(--radius-md);
    font-size: 15px; font-weight: 600;
    border: none; cursor: pointer; transition: var(--trans);
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary); color: white;
    box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover); transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37,99,235,0.38);
}
.btn-ghost {
    background: white; color: var(--text-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { background: var(--bg-2); border-color: rgba(0,0,0,0.12); transform: translateY(-2px); }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: var(--radius-lg); }

.hero-metrics {
    display: flex; gap: 0; align-items: center;
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 18px 28px;
    box-shadow: var(--shadow-sm); width: fit-content; margin: 0;
}
.metric-item {
    display: flex; flex-direction: column; align-items: center;
    padding: 0 28px;
}
.metric-item:not(:last-child) { border-right: 1px solid var(--border); }
.metric-num { font-size: 26px; font-weight: 800; color: var(--text-1); line-height: 1; }
.metric-label { font-size: 12px; color: var(--text-3); margin-top: 4px; font-weight: 500; }

/* =========================================
   Hero Visual Mockup (right column)
========================================= */
.hero-visual {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: flex-end;
    padding: 20px 0;
}

.hv-pill {
    position: absolute;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--radius-full);
    font-size: 12px; font-weight: 600; color: white;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    white-space: nowrap; pointer-events: none;
    animation: hvFloat 3.5s ease-in-out infinite;
    z-index: 2;
}
.hv-pill-1 { background: linear-gradient(135deg,#2563eb,#7c3aed); top: -16px; left: 24px; animation-delay: 0s; }
.hv-pill-2 { background: linear-gradient(135deg,#059669,#0891b2); top: 50px; right: -16px; animation-delay: 1.2s; }
.hv-pill-3 { background: linear-gradient(135deg,#dc2626,#ea580c); bottom: -16px; left: 24px; animation-delay: 2.4s; }
@keyframes hvFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.hv-window {
    width: 100%; max-width: 440px;
    background: #0f172a;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 70px rgba(0,0,0,0.28), 0 0 0 1px rgba(37,99,235,0.12), inset 0 1px 0 rgba(255,255,255,0.05);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
    transition: transform 0.5s ease;
}
.hv-window:hover { transform: perspective(1200px) rotateY(-2deg) rotateX(1deg); }

.hv-title-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hv-dots { display: flex; gap: 6px; }
.hv-dots span { width: 11px; height: 11px; border-radius: 50%; display: block; }
.hv-tbar-title { flex: 1; text-align: center; font-size: 11.5px; color: rgba(255,255,255,0.35); font-weight: 500; }
.hv-connected { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #22c55e; font-weight: 600; }
.hv-connected-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 4px #22c55e; animation: pulse-dot 2s ease-in-out infinite; }

.hv-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }

.hv-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.hv-stat {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.04); border-radius: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(255,255,255,0.05);
}
.hv-stat-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.hv-stat-icon.hv-down { background: rgba(34,197,94,0.15); color: #22c55e; }
.hv-stat-icon.hv-up { background: rgba(245,158,11,0.15); color: #f59e0b; }
.hv-stat-icon.hv-conn { background: rgba(96,165,250,0.15); color: #60a5fa; }
.hv-stat-val { font-size: 12.5px; font-weight: 700; color: white; line-height: 1; }
.hv-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.3); margin-top: 2px; }

.hv-chart-box {
    background: rgba(255,255,255,0.03);
    border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);
    padding: 6px 12px 8px; height: 58px; overflow: hidden; position: relative;
}
.hv-chart-lbl { font-size: 10px; color: rgba(255,255,255,0.3); margin-bottom: 4px; }

.hv-section-hd { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,0.28); text-transform: uppercase; letter-spacing: 0.8px; }

.hv-nodes { display: flex; flex-direction: column; gap: 5px; }
.hv-node {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 10px; border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    font-size: 12px;
}
.hv-node.active { background: rgba(37,99,235,0.12); border-color: rgba(37,99,235,0.3); }
.hv-ndot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.18); flex-shrink: 0; }
.hv-ndot.act { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.hv-nname { flex: 1; color: rgba(255,255,255,0.75); }
.hv-nping { font-size: 11px; font-weight: 600; font-family: var(--mono); padding: 1px 7px; border-radius: 4px; }
.hv-nping.green { color: #22c55e; background: rgba(34,197,94,0.1); }
.hv-nping.yellow { color: #f59e0b; background: rgba(245,158,11,0.1); }

.hv-log { display: flex; flex-direction: column; gap: 4px; }
.hv-log-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; font-size: 11.5px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.03); }
.hv-ldom { flex: 1; color: rgba(255,255,255,0.55); font-family: var(--mono); font-size: 11px; }
.hv-ltag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.hv-ltag.proxy { background: rgba(37,99,235,0.2); color: #60a5fa; }
.hv-ltag.direct { background: rgba(34,197,94,0.2); color: #4ade80; }
.hv-lms { font-size: 10px; color: rgba(255,255,255,0.25); font-family: var(--mono); min-width: 28px; text-align: right; }

/* =========================================
   Protocol Banner (marquee)
========================================= */
.proto-banner {
    padding: 30px 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.proto-track {
    display: flex; gap: 12px; width: max-content;
    animation: marquee 25s linear infinite;
}
.proto-banner:hover .proto-track { animation-play-state: paused; }
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }
.proto-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; border-radius: var(--radius-full);
    background: white; border: 1px solid var(--border);
    font-size: 13.5px; font-weight: 600; color: var(--text-2);
    white-space: nowrap; box-shadow: var(--shadow-xs);
}
.proto-chip i { color: var(--primary); font-size: 14px; }

/* =========================================
   Showcase Carousel
========================================= */
.showcase { padding: 80px 5%; background: var(--bg); }
.showcase-header {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; margin-bottom: 48px;
}
.carousel-wrap { position: relative; max-width: 1040px; margin: 0 auto; }
.carousel-frame {
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.carousel-track { display: flex; transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1); }
.carousel-slide { min-width: 100%; }

.slide-body { height: 480px; position: relative; overflow: hidden; }
.app-mockup {
    width: 90%; max-width: 680px;
    background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.mockup-header {
    height: 42px; background: var(--bg-3); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 16px; gap: 14px;
}
.wc { display: flex; gap: 6px; }
.wd { width: 12px; height: 12px; border-radius: 50%; }
.wr { background: #ff5f57; } .wy { background: #febc2e; } .wg { background: #28c840; }
.mt { flex: 1; text-align: center; font-size: 12px; color: var(--text-3); font-weight: 500; }
.ms { font-size: 11px; color: var(--success); display: flex; align-items: center; gap: 4px; font-weight: 600; }
.sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); }
.mockup-body { display: flex; gap: 14px; padding: 14px; background: var(--bg-2); height: 300px; }
.mockup-sidebar {
    width: 52px; background: white; border-radius: var(--radius-md);
    border: 1px solid var(--border); display: flex; flex-direction: column;
    align-items: center; padding: 12px 0; gap: 10px; box-shadow: var(--shadow-xs);
}
.si {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-4); font-size: 14px; cursor: default;
}
.si.active { background: var(--primary-light); color: var(--primary); }
.si:hover:not(.active) { background: var(--bg-2); }
.mockup-main { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.stat-row { display: flex; gap: 10px; }
.stat-card {
    flex: 1; background: white; border-radius: var(--radius-md);
    border: 1px solid var(--border); padding: 12px 14px;
    display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-xs);
}
.sico { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.snum { font-size: 17px; font-weight: 800; color: var(--text-1); line-height: 1; }
.slbl { font-size: 10px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.chart-area {
    flex: 1; background: white; border-radius: var(--radius-md);
    border: 1px solid var(--border); padding: 14px 16px;
    box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
}
.chart-lbl { font-size: 12px; color: var(--text-3); font-weight: 500; display: flex; justify-content: space-between; margin-bottom: 8px; }
.chart-wave-2 {
    position: absolute; bottom: 0; left: 0; width: 200%; height: 60%;
    background: linear-gradient(to top, rgba(37,99,235,0.12), transparent);
    border-top: 2px solid rgba(37,99,235,0.4);
    animation: waveSlide 4s linear infinite;
}
@keyframes waveSlide { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

.slide-traffic {
    background: #060e1f;
    display: flex; flex-direction: column;
    /* 不设 height：.slide-body 的 480px 已经生效，flex-column 直接用那 480px */
}

/* Traffic slide header */
.traf-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
}
.traf-hd-left { display: flex; align-items: center; gap: 10px; }
.traf-live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
    box-shadow: 0 0 8px #22c55e; animation: pulse-dot 2s ease-in-out infinite;
}
.traf-hd-title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.8); }
.traf-hd-right { display: flex; align-items: center; gap: 10px; }
.traf-hd-time { font-size: 12px; color: rgba(255,255,255,0.35); font-family: var(--mono); }
.traf-hd-badge {
    font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: var(--radius-full); color: #22c55e;
    background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25);
}

/* Stats grid */
.traf-stats-grid {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.traf-cell {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.traf-cell:last-child { border-right: none; }
.tc-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}
.tc-lbl { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.tc-val { font-size: 16px; font-weight: 800; font-family: var(--mono); line-height: 1; }

/* Chart area */
.traf-chart-wrap {
    flex: 1; min-height: 0;   /* min-height:0 让 flex:1 在 flex 列中正确伸展 */
    display: flex; flex-direction: column;
    padding: 14px 20px 10px;
}
.traf-chart-wrap svg {
    flex: 1; min-height: 0;   /* SVG 也跟着填满剩余高度 */
    width: 100%; display: block;
}
.traf-chart-hd {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 10px;
}
.traf-legend { display: flex; gap: 16px; align-items: center; font-size: 11.5px; color: rgba(255,255,255,0.5); }
.tleg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* Keep old styles for backward compat */
.traf-stats { display: flex; gap: 28px; z-index: 2; }
.traf-box {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    padding: 20px 36px; border-radius: var(--radius-lg); text-align: center;
    backdrop-filter: blur(10px);
}
.traf-lbl { color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; margin-bottom: 8px; }
.traf-val { color: white; font-size: 30px; font-weight: 800; font-family: var(--font-mono); }

.slide-code {
    background: #13111f; padding: 24px 28px 0;
    font-family: var(--font-mono); font-size: 13px; line-height: 1.7; overflow: hidden;
    display: flex; flex-direction: column;
}

/* 代码滚动容器：用户手动滑动（纵向 + 横向） */
.code-scroll-wrap {
    flex: 1; overflow: auto; position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.code-scroll-wrap::-webkit-scrollbar { width: 4px; height: 4px; }
.code-scroll-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.code-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
.editor-tabs {
    display: flex; gap: 2px; margin-bottom: 20px; align-items: center;
}
.editor-tab {
    padding: 5px 14px; border-radius: 6px 6px 0 0; font-size: 12px;
    color: #64748b; cursor: default; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06); border-bottom: none;
}
.editor-tab.active { color: #e2e8f0; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); }
.code-line { display: flex; gap: 16px; padding: 1px 0; white-space: nowrap; min-width: max-content; }
.ln { color: #3f3f5c; width: 22px; text-align: right; user-select: none; font-size: 13px; }
.ck { color: #f472b6; } .cv { color: #86efac; } .cs { color: #93c5fd; } .cc { color: #fbbf24; }
.cm { color: #6b7280; }

.slide-nodes {
    background: #0d1117; padding: 20px 28px;
    overflow: hidden; display: flex; flex-direction: column; gap: 12px;
    /* 不设 height：依赖 .slide-body 的 480px */
}
.nodes-header {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 820px; margin-left: auto; margin-right: auto; width: 100%;
    gap: 8px;
}
.nh-left { min-width: 0; }
.nh-left { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.nh-title { color: white; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nh-subtitle { color: #64748b; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nh-act { color: #fbbf24; font-size: 12.5px; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 12px; border: 1px solid rgba(251,191,36,0.2); border-radius: 6px; white-space: nowrap; flex-shrink: 0; }

/* Node filter row */
.nodes-filter {
    display: flex; align-items: center; gap: 12px;
    max-width: 820px; margin: 0 auto; width: 100%;
}
.nf-search {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    padding: 7px 12px; border-radius: 8px; color: #64748b; font-size: 12px;
    cursor: text;
}
.nf-tags { display: flex; gap: 6px; margin-left: auto; }
.nf-tag {
    padding: 4px 10px; border-radius: 6px;
    font-size: 11.5px; font-weight: 600; cursor: pointer;
    color: #64748b; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}
.nf-tag.active { color: #60a5fa; background: rgba(37,99,235,0.15); border-color: rgba(37,99,235,0.3); }

.nodes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 820px; margin: 0 auto; }
.node-card {
    background: #161b22; border: 1px solid #21262d;
    padding: 13px 16px; border-radius: var(--radius-md);
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; transition: var(--trans);
}
.node-card:hover { border-color: #30363d; transform: translateY(-1px); }
.node-card.selected { border-color: var(--primary); background: rgba(37,99,235,0.12); }
.node-nm { color: #e6edf3; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-ping { font-size: 12px; font-family: var(--font-mono); padding: 3px 8px; border-radius: 6px; font-weight: 700; }
.ping-green { color: var(--success); background: rgba(16,185,129,0.12); }
.ping-yellow { color: var(--warning); background: rgba(245,158,11,0.12); }
.ping-red { color: var(--danger); background: rgba(239,68,68,0.12); }

.slide-caption {
    padding: 18px 24px;
    background: white; border-top: 1px solid var(--border);
    font-size: 14px; font-weight: 600; color: var(--text-2);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.slide-caption i { color: var(--primary); }

.carousel-btn {
    position: absolute; top: calc(50% - 22px); transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%;
    background: white; border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    cursor: pointer; z-index: 10; transition: var(--trans);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--text-2);
}
.carousel-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.prev-btn { left: -22px; }
.next-btn { right: -22px; }
.carousel-dots {
    display: flex; justify-content: center; gap: 10px; margin-top: 24px;
}
.cdot {
    width: 8px; height: 8px; border-radius: var(--radius-full);
    background: var(--bg-4); cursor: pointer; transition: var(--trans);
}
.cdot.active { background: var(--primary); width: 24px; }

/* =========================================
   Features
========================================= */
.section-header {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; margin-bottom: 56px;
}
.features { padding: 100px 5%; background: var(--bg-2); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px; max-width: 1200px; margin: 0 auto;
}
.feature-card {
    background: white; padding: 36px 28px;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    transition: var(--trans); position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.fi {
    width: 56px; height: 56px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 20px; transition: var(--trans);
    background: var(--primary-light); color: var(--primary);
}
.feature-card:hover .fi { background: var(--primary); color: white; transform: scale(1.08); }
.ft { font-size: 19px; font-weight: 700; margin-bottom: 10px; color: var(--text-1); }
.fd { font-size: 14.5px; color: var(--text-3); line-height: 1.7; }

/* =========================================
   How to Start (3-step guide)
========================================= */
.howto { padding: 100px 5%; background: var(--bg); }
.howto-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0; max-width: 900px; margin: 56px auto 0;
    position: relative;
}
.howto-grid::before {
    content: ''; position: absolute; top: 36px; left: calc(16.666% + 28px);
    right: calc(16.666% + 28px);
    height: 2px; border-top: 2px dashed var(--bg-4); z-index: 0;
}
.step-card { padding: 0 28px; text-align: center; position: relative; z-index: 1; }
.step-num {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 900; color: white;
    box-shadow: 0 8px 24px var(--primary-glow);
}
.step-title { font-size: 18px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.step-desc { font-size: 14px; color: var(--text-3); line-height: 1.7; }

/* =========================================
   Testimonials
========================================= */
.testimonials { padding: 100px 5%; background: var(--bg-2); }
/* 跑马灯外层：裁剪溢出，两侧渐隐 */
.testi-marquee-wrap {
    overflow: hidden;
    margin-top: 56px;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
/* 鼠标悬停暂停 */
.testi-marquee-wrap:hover .testi-grid { animation-play-state: paused; }

.testi-grid {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: testiScroll 32s linear infinite;
}
@keyframes testiScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.testi-card {
    background: white; padding: 32px 26px;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    position: relative;
    flex: 0 0 320px;
}
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stars { color: #fbbf24; font-size: 14px; margin-bottom: 16px; display: flex; gap: 3px; }
.testi-quote { font-size: 14.5px; color: var(--text-2); line-height: 1.8; margin-bottom: 24px; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--bg-3);
}
.testi-name { font-size: 14.5px; font-weight: 700; color: var(--text-1); }
.testi-role { font-size: 12px; color: var(--text-4); margin-top: 2px; }

/* =========================================
   Platforms
========================================= */
.platforms { padding: 100px 5%; background: var(--bg); }
.platform-grid {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 16px; max-width: 1000px; margin: 56px auto 0;
}
.platform-card {
    background: var(--bg-2); border: 1px solid var(--border);
    padding: 22px 36px; border-radius: var(--radius-lg);
    display: flex; align-items: center; gap: 16px;
    min-width: 210px; cursor: pointer; transition: var(--trans);
    position: relative; overflow: hidden;
}
.platform-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    opacity: 0; transition: var(--trans);
}
.platform-card:hover::after { opacity: 1; }
.platform-card:hover { border-color: var(--border-focus); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.platform-card i { font-size: 30px; color: var(--text-2); transition: var(--trans); position: relative; z-index: 1; }
.platform-card:hover i { color: var(--primary); }
.plat-info { position: relative; z-index: 1; }
.plat-name { font-weight: 700; font-size: 15.5px; color: var(--text-1); }
.plat-action { font-size: 12.5px; color: var(--primary); font-weight: 600; margin-top: 4px; }

/* =========================================
   FAQ
========================================= */
.faq { padding: 100px 5%; background: var(--bg-2); }
.faq-list { max-width: 800px; margin: 56px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden; transition: var(--trans);
}
.faq-item:hover { border-color: var(--border-focus); }
.faq-item.open { border-color: var(--border-focus); box-shadow: var(--shadow-sm); }
.faq-q {
    padding: 20px 24px; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-weight: 600; font-size: 15.5px; color: var(--text-1);
    user-select: none;
}
.faq-q:hover { color: var(--primary); }
.faq-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--bg-2); display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--text-3); transition: var(--trans); flex-shrink: 0;
}
.faq-item.open .faq-icon { background: var(--primary-light); color: var(--primary); transform: rotate(45deg); }
.faq-a {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease), padding 0.3s var(--ease);
    font-size: 14.5px; color: var(--text-3); line-height: 1.8;
}
.faq-a-inner { padding: 0 24px 20px; }

/* =========================================
   CTA Banner
========================================= */
.cta-banner {
    padding: 80px 5%;
    background: linear-gradient(135deg, #1e3a8a 0%, #312e81 50%, #1e1b4b 100%);
    text-align: center; position: relative; overflow: hidden;
}
.cta-banner::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 28px 28px;
}
.cta-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.cta-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: white; margin-bottom: 16px; letter-spacing: -0.5px; }
.cta-desc { font-size: 16px; color: rgba(255,255,255,0.7); margin-bottom: 36px; line-height: 1.8; }
.btn-white { background: white; color: var(--primary); font-weight: 700; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.btn-outline-white {
    background: transparent; color: white;
    border: 2px solid rgba(255,255,255,0.4); font-weight: 600;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); transform: translateY(-2px); }

/* =========================================
   Footer
========================================= */
.footer { background: #0f172a; color: #94a3b8; padding: 64px 5% 32px; }
.footer-inner {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 48px;
    max-width: 1200px; margin: 0 auto;
    padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand .logo-mark { margin-bottom: 16px; }
.footer-brand .footer-logo-img { display: block; }
.footer-brand h3 { color: white; font-size: 18px; margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; max-width: 280px; line-height: 1.8; }
.footer-cols { display: flex; gap: 56px; }
.fcol h4 { color: rgba(255,255,255,0.85); font-size: 14px; font-weight: 700; margin-bottom: 18px; letter-spacing: 0.5px; }
.fcol li { margin-bottom: 10px; }
.fcol a { font-size: 13.5px; transition: var(--trans); }
.fcol a:hover { color: white; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 28px auto 0; font-size: 12.5px;
    flex-wrap: wrap; gap: 12px;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a:hover { color: white; }

/* =========================================
   Scroll Progress Bar
========================================= */
.progress-bar {
    position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%; transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* =========================================
   Responsive
========================================= */
@media (max-width: 992px) {
    .hero { padding-top: 110px; }
    .howto-grid::before { display: none; }
}
@media (max-width: 1100px) {
    .hero { gap: 40px; padding: 110px 5% 70px; }
    .hv-window { max-width: 380px; }
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding: 110px 5% 60px; }
    .hero-visual { display: none; }
    .hero-desc { max-width: 640px; margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-metrics { margin: 0 auto; }
}
@media (max-width: 768px) {
    .nav-links, .nav-lang { display: none; }
    .mobile-btn { display: block; }
    .mobile-menu, .mobile-overlay { display: block; }
    .hero-metrics { flex-wrap: wrap; gap: 0; padding: 14px 20px; width: 100%; justify-content: center; }
    .metric-item { padding: 10px 16px; flex: 1 1 calc(33.33% - 2px); justify-content: center; }
    .metric-item:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); }
    .feature-grid { grid-template-columns: 1fr; }
    .testi-card { flex: 0 0 260px; }
    .footer-inner { flex-direction: column; }
    .footer-cols { flex-direction: column; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .slide-body { height: 360px; }
    .slide-code { font-size: 11px; padding: 14px 14px 0; }
    .traf-stats { flex-direction: column; align-items: center; gap: 12px; }
    .traf-box { padding: 14px 24px; }
    .traf-val { font-size: 22px; }
    /* 节点滑块：2 列紧凑竖排布局 */
    .nodes-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; max-width: 100%; }
    .slide-nodes { padding: 12px 14px; gap: 8px; overflow: hidden; }
    .nh-title { font-size: 13px; }
    .nh-subtitle { font-size: 11px; }
    .nf-search { display: none; }
    .nf-tags { margin-left: 0; flex-wrap: wrap; gap: 4px; }
    .nf-tag { padding: 3px 8px; font-size: 11px; }
    /* 卡片改为竖排：名字在上，延迟在下 */
    .node-card { padding: 8px 10px; border-radius: 8px; flex-direction: column; align-items: flex-start; gap: 6px; }
    .node-nm { font-size: 12px; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .node-ping { font-size: 11px; padding: 2px 6px; }
    /* 超出 6 个节点在移动端隐藏 */
    .nodes-grid .node-card:nth-child(n+7) { display: none; }
    /* 流量监控：3 列统计格 */
    .traf-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .traf-hd { padding: 10px 12px 8px; }
    .traf-cell { padding: 8px 6px; gap: 6px; }
    .tc-icon { width: 26px; height: 26px; font-size: 11px; }
    .tc-val { font-size: 13px; }
    .tc-lbl { font-size: 9px; }
    /* 图表区给右侧箭头让出空间 */
    .traf-chart-wrap { padding: 10px 28px 8px 14px; }
    .traf-chart-hd { font-size: 11px; }
    .traf-legend { gap: 8px; font-size: 10.5px; }
    /* 仪表盘 mockup：缩小各元素 */
    .app-mockup { width: 96%; }
    .mockup-header { height: 36px; padding: 0 10px; gap: 8px; }
    .mt { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ms { font-size: 10px; }
    .mockup-body { height: 240px; padding: 10px; gap: 10px; }
    .mockup-sidebar { width: 40px; padding: 8px 0; }
    .si { width: 28px; height: 28px; font-size: 12px; }
    .stat-card { padding: 8px 10px; gap: 7px; }
    .sico { width: 26px; height: 26px; font-size: 11px; }
    .snum { font-size: 14px; }
    .slbl { font-size: 9px; letter-spacing: 0; }
    /* 移动端：加大触摸区，无背景纯箭头，对准 slide 中心 */
    .carousel-btn {
        background: none;
        border: none;
        box-shadow: none;
        color: rgba(255,255,255,0.8);
        width: 44px; height: 44px;
        font-size: 22px;
        text-shadow: 0 1px 6px rgba(0,0,0,0.6);
        /* 对准 slide-body 中心（slide-body = 360px，此处取 180px） */
        top: 180px;
        transform: translateY(-50%);
        /* 确保触摸事件不被拦截 */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        pointer-events: auto;
        z-index: 20;
    }
    .carousel-btn:hover, .carousel-btn:active { background: none; border-color: transparent; color: white; }
    .prev-btn { left: 4px; }
    .next-btn { right: 4px; }
    .howto-grid { grid-template-columns: 1fr; gap: 40px; }
    /* 平台卡片：768px 两列 */
    .platform-card { min-width: 0; flex: 1 1 calc(50% - 10px); padding: 18px 20px; }
    /* 各 section 垂直间距缩减 */
    .features, .howto, .testimonials, .platforms, .faq, .cta-banner { padding-top: 60px; padding-bottom: 60px; }
    .showcase { padding: 60px 0; }
    /* 按钮缩小 */
    .btn-lg { padding: 14px 22px; font-size: 15px; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 34px; }
    .hero-metrics { width: 100%; }
    /* 平台卡片：480px 单列 */
    .platform-card { flex: 1 1 100%; padding: 16px 18px; }
    /* 轮播固定高度，代码滑块内部自行滚动 */
    .slide-body { height: 320px; }
    /* 对应 slide-body 高度 320px，按钮垂直中心在 160px */
    .carousel-btn { top: 160px; }
    /* 更小屏进一步缩减间距 */
    .features, .howto, .testimonials, .platforms, .faq, .cta-banner { padding-top: 48px; padding-bottom: 48px; }
    .metric-item { flex: 1 1 100%; border-bottom: 1px solid var(--border); border-right: none !important; }
    .metric-item:last-child { border-bottom: none; }
}

/* =========================================
   Animations
========================================= */
.fade-up {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-d1 { transition-delay: 0.1s; }
.fade-up-d2 { transition-delay: 0.2s; }
.fade-up-d3 { transition-delay: 0.3s; }
.fade-up-d4 { transition-delay: 0.4s; }
