/* ===== 全局重置与变量 ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-deep: #0b0f19;
    --bg-card: #0f172a;
    --bg-card-hover: #111c2d;
    --border-default: #1e293b;
    --border-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --accent-blue: #3b82f6;
    --accent-blue-soft: #60a5fa;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-teal: #14b8a6;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition: 0.25s ease;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    background: rgba(11, 15, 25, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-default);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: none;
}

.nav-logo-text {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition);
    padding: 6px 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-blue);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}

.github-btn:hover {
    background: #273549;
    border-color: var(--border-hover);
}

.github-btn svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}

/* ===== Hero 区域 ===== */
.hero-section {
    padding: 160px 24px 60px 24px;
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-eyebrow {
    font-size: 14px;
    color: var(--accent-blue-soft);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.04em;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    margin: 0 0 36px 0;
    text-align: justify;
    max-width: 680px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.hero-stats-mini {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.stat-chip {
    display: flex;
    align-items: baseline;
    gap: 6px;
    background: rgba(30, 41, 59, 0.6);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.stat-chip strong {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

/* Hero 终端显示 */
.hero-display {
    background: #0a0f1c;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 32px;
    font-family: var(--font-mono);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    position: relative;
}

.hero-display::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 20px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 20px 0 0 #f59e0b, 40px 0 0 #10b981;
}

.console-log {
    margin-top: 20px;
    color: #38bdf8;
    font-size: 13px;
    line-height: 1.7;
}

.log-prompt {
    color: #64748b;
    font-weight: 600;
}

/* ===== 媒体展示区 ===== */
.media-section {
    max-width: 1320px;
    margin: 0 auto 80px auto;
    padding: 0 24px;
}

.banner-placeholder {
    width: 100%;
    height: auto;
    min-height: 380px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--border-hover);
    border-radius: 24px;
    display: block;
    object-fit: cover;
    margin-bottom: 40px;
}

.video-container {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border: 1px solid var(--border-hover);
    border-radius: 24px;
    overflow: hidden;
    background: #000000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== 通用按钮样式 ===== */
.btn-primary {
    background: var(--accent-blue);
    color: #ffffff;
    text-decoration: none;
    padding: 16px 34px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.45);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    padding: 16px 34px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    border: 1px solid var(--border-hover);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--border-hover);
    border-color: #475569;
}

/* ===== 核心知识版块 (卡片网格) ===== */
.features-section {
    max-width: 1320px;
    margin: 0 auto 100px auto;
    padding: 0 24px;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.section-title p {
    font-size: 15px;
    color: var(--text-tertiary);
    margin: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 38px 34px;
    transition: all var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 18px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 14px 0;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 24px 0;
    flex: 1;
}

.card-link {
    text-decoration: none;
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 15px;
    transition: gap 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.card-link:hover {
    gap: 12px;
    text-decoration: underline;
}

/* 卡片强调色边框 (hover 时显示) */
.card-accent-blue:hover { border-color: var(--accent-blue); }
.card-accent-green:hover { border-color: var(--accent-green); }
.card-accent-purple:hover { border-color: var(--accent-purple); }
.card-accent-amber:hover { border-color: var(--accent-amber); }
.card-accent-rose:hover { border-color: var(--accent-rose); }
.card-accent-teal:hover { border-color: var(--accent-teal); }

/* ===== 策略三原色版块 ===== */
.strategy-visual-section {
    max-width: 1320px;
    margin: 0 auto 100px auto;
    padding: 0 24px;
}

.strategy-trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.strategy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: all var(--transition);
    text-align: center;
}

.strategy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.strategy-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin: 0 auto 18px auto;
}

.strategy-direct .strategy-dot { background: #10b981; box-shadow: 0 0 12px #10b981; }
.strategy-proxy .strategy-dot { background: #3b82f6; box-shadow: 0 0 12px #3b82f6; }
.strategy-reject .strategy-dot { background: #ef4444; box-shadow: 0 0 12px #ef4444; }

.strategy-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.strategy-tag {
    display: inline-block;
    background: rgba(59,130,246,0.15);
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.strategy-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.strategy-card code {
    background: #1a202c;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: #cbd5e1;
    display: inline-block;
    word-break: break-all;
}

/* ===== 协议矩阵版块 ===== */
.protocol-matrix-section {
    max-width: 1320px;
    margin: 0 auto 100px auto;
    padding: 0 24px;
}

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.protocol-item {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: border-color var(--transition);
}

.protocol-item:hover {
    border-color: var(--accent-blue);
}

.proto-name {
    font-weight: 700;
    font-size: 18px;
    color: #ffffff;
}

.proto-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.proto-badge.partial {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* ===== 步骤流程版块 ===== */
.steps-flow-section {
    max-width: 1320px;
    margin: 0 auto 100px auto;
    padding: 0 24px;
}

.steps-track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 180px;
}

.step-number {
    width: 44px;
    height: 44px;
    background: var(--accent-blue);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 16px;
    box-shadow: 0 0 16px rgba(59,130,246,0.5);
}

.step-body h4 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.step-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: var(--border-default);
    margin-top: 22px;
    flex-shrink: 0;
}

/* ===== 部署拓扑版块 ===== */
.deployment-section {
    max-width: 1320px;
    margin: 0 auto 120px auto;
    padding: 0 24px;
}

.deployment-showcase {
    background: radial-gradient(ellipse at top right, #111827, #0f172a);
    border: 1px solid var(--border-default);
    border-radius: 28px;
    padding: 50px;
}

.deployment-showcase h3 {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.deployment-showcase p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 36px 0;
    max-width: 800px;
}

.topology-badge-flow {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.topology-node {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-hover);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topology-node span {
    color: var(--accent-blue);
    font-family: var(--font-mono);
    font-size: 13px;
}

.topology-arrow {
    display: flex;
    align-items: center;
    color: #475569;
    font-weight: bold;
    font-size: 18px;
}

/* ===== Footer ===== */
.footer-new {
    background-color: #090d16;
    border-top: 1px solid var(--border-default);
    padding: 80px 24px 60px 24px;
}

.footer-new-container {
    max-width: 1320px;
    margin: 0 auto;
}

.footer-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--border-default);
    flex-wrap: wrap;
    gap: 48px;
}

.footer-brand-info {
    max-width: 420px;
}

.footer-brand-info h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 12px 0;
}

.footer-brand-info p {
    color: var(--text-tertiary);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.footer-links-group-wrapper {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-links-cluster {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-cluster span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-links-cluster a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
}

.footer-links-cluster a:hover {
    color: var(--accent-blue);
}

.footer-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 36px;
    font-size: 13px;
    color: #475569;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-meta-row a {
    color: #475569;
    text-decoration: none;
    margin-left: 24px;
    transition: color var(--transition);
}

.footer-meta-row a:hover {
    color: #64748b;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-desc {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats-mini {
        justify-content: center;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .strategy-trio {
        grid-template-columns: 1fr;
    }
    .protocol-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-track {
        flex-direction: column;
        align-items: center;
    }
    .step-connector {
        width: 2px;
        height: 30px;
        margin: 6px 0;
    }
    .footer-main-row {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .footer-links-group-wrapper {
        justify-content: center;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    .nav-links {
        display: none;
    }
    .hero-section {
        padding-top: 130px;
    }
    .hero-content h1 {
        font-size: 34px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .topology-badge-flow {
        flex-direction: column;
        align-items: stretch;
    }
    .topology-arrow {
        justify-content: center;
        transform: rotate(90deg);
        margin: 6px 0;
    }
    .footer-meta-row {
        flex-direction: column;
        text-align: center;
    }
    .footer-meta-row div:last-child {
        margin-top: 8px;
    }
    .footer-meta-row a {
        margin: 0 12px;
    }
    .protocol-grid {
        grid-template-columns: 1fr;
    }
}