/* ========== xray.css — Xray核心专题专用样式（与首页风格底色完全一致） ========== */

:root {
    --primary: #1a6dd4;
    --primary-hover: #1255a8;
    --text: #1e1e2e;
    --text-secondary: #585861;
    --bg: #ffffff;
    --bg-soft: #f8f9fb;
    --border: #eaeaef;
    --radius: 10px;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 导航栏（与首页一致） ========== */
header {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text);
}

.logo img {
    width: 32px;
    height: 32px;
}

nav {
    display: flex;
    gap: 28px;
    height: 100%;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--primary);
}

nav a.active::after {
    content: "";
    position: absolute;
    bottom: -22px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
}

/* ========== 页面标题区 ========== */
.page-hero {
    padding: 60px 0 40px;
    text-align: center;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}

.hero-badge {
    display: inline-block;
    background: #eef4ff;
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text);
}

.hero-sub {
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* 快速跳转锚点 */
.anchor-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.anchor-strip span {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.anchor-strip a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 14px;
    transition: background 0.2s;
}

.anchor-strip a:hover {
    background: #eef4ff;
}

/* ========== 区块通用样式 ========== */
.section-block {
    padding: 70px 0;
    border-bottom: 1px solid var(--border);
}

.sec-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
    color: var(--text);
}

.sec-sub {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========== Xray 简介区 ========== */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: center;
}

.intro-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.intro-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.feature-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-list li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding-left: 20px;
    position: relative;
}

.feature-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* 视觉核心卡片 */
.intro-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: #f4f6fb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
}

.core-badge {
    background: #1a1a22;
    color: #fff;
    padding: 20px 30px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.core-name {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.core-ver {
    font-size: 0.9rem;
    color: #aaa;
}

.core-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========== 协议卡片 ========== */
.protocol-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 20px;
}

.proto-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 24px;
    transition: box-shadow 0.2s, transform 0.15s;
}

.proto-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.proto-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.proto-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.proto-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.proto-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.proto-card ul {
    list-style: none;
    padding: 0;
}

.proto-card li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
    margin-bottom: 6px;
}

.proto-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* ========== XTLS/uTLS 双栏卡片 ========== */
.dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.dual-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
}

.dual-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.dual-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* XTLS 流程示意 */
.flow-box {
    background: #f0f6ff;
    border: 1px solid #d4e2fc;
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text);
}

.flow-box strong {
    color: var(--primary);
}

.flow-desc {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* uTLS 指纹列表 */
.fingerprint-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fp-item {
    background: #f9fafb;
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text);
}

/* ========== 安全对比表格 ========== */
.compare-table-wrap {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem;
}

.compare-table th {
    background: #f4f5f7;
    color: var(--text);
    font-weight: 600;
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.compare-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

/* ========== 调优指南步骤 ========== */
.tuning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 30px;
}

.tuning-step {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.tuning-step:hover {
    box-shadow: var(--shadow);
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.tuning-step h4 {
    font-size: 1.1rem;
    font-weight: 650;
    margin-bottom: 12px;
    color: var(--text);
}

.tuning-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tuning-step a {
    color: var(--primary);
    font-weight: 500;
}

/* ========== 页脚（与首页一致） ========== */
footer {
    background: #1a1a22;
    color: #ddd;
    padding: 56px 0 28px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 36px;
    margin-bottom: 40px;
    border-bottom: 1px solid #2e2e3a;
    padding-bottom: 36px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

.footer-about p {
    color: #aaa;
    line-height: 1.7;
    font-size: 0.85rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: #777;
    font-size: 0.8rem;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .nav-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 20px;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        background: #fff;
        padding: 16px 0;
    }

    nav.nav-open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    nav a.active::after {
        display: none;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .dual-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .protocol-cards,
    .tuning-grid {
        grid-template-columns: 1fr;
    }
}