
#reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-red), #f97316);
    z-index: 9999;
    transition: width 0.1s linear;
}


.docs-toc-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 500;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.7rem 1.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(225, 29, 72, 0.45);
    gap: 8px;
    align-items: center;
}
.docs-toc-toggle i { font-size: 0.85rem; }


.docs-layout {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 2rem 0;
    gap: 0;
    min-height: 100vh;
    align-items: flex-start;
}


.docs-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 1.5rem 0;
    padding-right: 1.5rem;
    border-right: 1px solid var(--border-color);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

.docs-toc-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.toc-close {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1.1rem; padding: 4px;
}
.toc-close:hover { color: var(--text-main); }

.docs-toc { padding-bottom: 1rem; }

.toc-group { margin-bottom: 1.8rem; }

.toc-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 0 0.6rem;
    margin-bottom: 0.3rem;
}

.toc-link {
    display: block;
    padding: 0.4rem 0.8rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    border-radius: 8px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    margin-bottom: 2px;
}

.toc-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.toc-link.active {
    color: var(--primary-red);
    border-left-color: var(--primary-red);
    background: rgba(225, 29, 72, 0.08);
    font-weight: 600;
}

.toc-sub {
    padding-left: 1.4rem;
    font-size: 0.83rem;
}

.toc-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.toc-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 1rem;
    background: var(--primary-red);
    color: white;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s;
    text-align: center;
}

.toc-dl-btn:hover {
    background: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
}


.docs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 400;
    backdrop-filter: blur(4px);
}


.docs-main {
    flex: 1;
    min-width: 0;
    padding: 0 0 120px 3rem;
}

.docs-article { max-width: 780px; }


.docs-page-header {
    padding: 2rem 0 3rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.docs-page-header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -1px;
    margin: 1rem 0 1rem;
    line-height: 1.2;
}

.docs-page-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 640px;
    margin-bottom: 1.5rem;
}

.docs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.docs-meta i { margin-right: 5px; color: var(--primary-red); }


.docs-section {
    margin-bottom: 3rem;
    scroll-margin-top: 90px;
}

.docs-section h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.docs-section h2 i { color: var(--primary-red); font-size: 1.2rem; }

.docs-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 0.9rem;
    scroll-margin-top: 90px;
}

.docs-section p {
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 1rem;
    font-size: 0.96rem;
}

.docs-section a { color: var(--primary-red); }
.docs-section a:hover { text-decoration: underline; }

.docs-section a.btn { color: white; text-decoration: none; }
.docs-section a.btn-primary { color: white; }
.docs-section a.btn-secondary { color: white; }

code {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-color);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.88em;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: #f472b6;
}

.step-badge {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-right: 4px;
}

.docs-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}


.docs-step-overview {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.step-overview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.step-num-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.step-arrow {
    color: var(--border-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}


.docs-platform-grid {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1.2rem 0 1.5rem;
}

.docs-platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.1rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.25s ease;
    text-align: center;
    min-width: 100px;
    flex: 1;
}

.docs-platform-card i { font-size: 1.6rem; margin-bottom: 0.2rem; }
.docs-platform-card span { color: var(--text-main); }
.docs-platform-card small { font-size: 0.72rem; font-weight: 400; }

.docs-platform-card:hover {
    border-color: rgba(225, 29, 72, 0.4);
    background: rgba(225, 29, 72, 0.06);
    transform: translateY(-4px);
    color: var(--primary-red);
}


.docs-callout {
    display: flex;
    gap: 0.9rem;
    padding: 1rem 1.3rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.7;
    align-items: flex-start;
}

.docs-callout i { font-size: 1rem; margin-top: 3px; flex-shrink: 0; }
.docs-callout strong { display: block; margin-bottom: 0.2rem; }
.docs-callout a { font-weight: 600; }

.docs-callout-tip {
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.25);
    color: #93c5fd;
}
.docs-callout-tip i { color: #60a5fa; }
.docs-callout-tip a { color: #60a5fa; }

.docs-callout-warning {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #fcd34d;
}
.docs-callout-warning i { color: #fbbf24; }

.docs-callout-success {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
    color: #86efac;
}
.docs-callout-success i { color: #4ade80; }


.docs-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1.5rem 0;
    position: relative;
}

.docs-steps::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-red), var(--border-color));
    opacity: 0.4;
}

.docs-step-item {
    display: flex;
    gap: 1.2rem;
    padding: 0 0 1.8rem;
    position: relative;
}

.docs-step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.15);
}

.docs-step-body { flex: 1; padding-top: 6px; }

.docs-step-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.docs-step-body p {
    font-size: 0.9rem;
    margin-bottom: 0;
}


.docs-mode-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.2rem 0 1.5rem;
}

.docs-mode-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.docs-mode-recommended {
    border-color: rgba(225, 29, 72, 0.35);
    background: rgba(225, 29, 72, 0.05);
}

.docs-mode-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.docs-mode-header i { color: var(--primary-red); }

.docs-mode-card p {
    font-size: 0.87rem;
    margin-bottom: 0;
}


.docs-rule-flow {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
}

.rule-flow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.rule-flow-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.rule-icon-req    { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.rule-icon-clash  { background: rgba(225, 29, 72, 0.15); color: var(--primary-red); box-shadow: 0 0 15px rgba(225,29,72,0.2); }
.rule-icon-direct { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.rule-icon-proxy  { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }

.rule-flow-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.rule-flow-arrow { color: var(--border-color); font-size: 1.2rem; }

.rule-flow-split {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.rule-flow-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rule-flow-arrow-down { color: var(--border-color); font-size: 1.2rem; }
.rule-flow-branch small { font-size: 0.72rem; color: var(--text-muted); }


.docs-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.docs-compare-item {
    padding: 1.3rem;
    border-radius: 14px;
    font-size: 0.88rem;
}

.docs-compare-bad {
    background: rgba(248, 113, 113, 0.06);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.docs-compare-good {
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.docs-compare-header {
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.docs-compare-bad .docs-compare-header { color: #f87171; }
.docs-compare-good .docs-compare-header { color: #4ade80; }

.docs-compare-item ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.docs-compare-item ul li {
    color: var(--text-muted);
    padding-left: 0;
}

.docs-compare-bad ul li::before { content: "✕  "; color: #f87171; }
.docs-compare-good ul li::before { content: "✓  "; color: #4ade80; }


.docs-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.docs-info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.docs-info-card:hover {
    border-color: rgba(225, 29, 72, 0.3);
    transform: translateY(-4px);
}

.docs-info-card i {
    font-size: 1.4rem;
    color: var(--primary-red);
    margin-bottom: 0.8rem;
    display: block;
}

.docs-info-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.docs-info-card p {
    font-size: 0.87rem;
    margin-bottom: 0;
}


.docs-latency-guide {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.3rem 1.5rem;
    margin: 1.5rem 0;
}

.latency-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.88rem;
}

.latency-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.latency-range {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    min-width: 90px;
    font-weight: 600;
}

.latency-good .latency-dot  { background: #4ade80; }
.latency-ok .latency-dot    { background: #fbbf24; }
.latency-warn .latency-dot  { background: #fb923c; }
.latency-bad .latency-dot   { background: #f87171; }

.latency-good .latency-range  { color: #4ade80; }
.latency-ok .latency-range    { color: #fbbf24; }
.latency-warn .latency-range  { color: #fb923c; }
.latency-bad .latency-range   { color: #f87171; }

.latency-item:not(.latency-dot):last-child { color: var(--text-muted); }


.docs-trouble-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.2rem 0;
}

.docs-trouble-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.trouble-q {
    padding: 1rem 1.3rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.trouble-q i { color: var(--primary-red); flex-shrink: 0; margin-top: 3px; }

.trouble-a {
    padding: 1rem 1.3rem 1rem 1.3rem;
}

.trouble-a ol {
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trouble-a li {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}


.docs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem 0 1.2rem;
    padding-left: 0.5rem;
}

.docs-list li {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    padding-left: 1.2rem;
    position: relative;
}

.docs-list li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-size: 1.4rem;
    line-height: 1;
    top: 2px;
}

.docs-list li strong { color: var(--text-main); }


.docs-bottom-cta {
    margin-top: 4rem;
    padding: 3rem;
    background: radial-gradient(circle at 50% 0%, rgba(225, 29, 72, 0.1) 0%, transparent 70%);
    border: 1px solid rgba(225, 29, 72, 0.25);
    border-radius: 24px;
    text-align: center;
}

.docs-bottom-cta h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.docs-bottom-cta p {
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    font-size: 1rem;
}


@media (max-width: 1024px) {
    .docs-mode-cards { grid-template-columns: 1fr; }
    .docs-compare { grid-template-columns: 1fr; }
    .docs-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .docs-layout {
        padding-top: 70px;
        flex-direction: column;
    }

    .docs-toc-toggle {
        display: inline-flex;
    }

    .docs-sidebar {
        position: fixed;
        top: 0; left: 0;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        max-height: 100vh;
        z-index: 450;
        background: #0a0a0a;
        border-right: 1px solid var(--border-color);
        border-radius: 0;
        padding: 0;
        transform: translateX(-110%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    .docs-overlay.open {
        display: block;
    }

    .docs-toc-header { display: flex; }

    .docs-toc { padding: 0 1.5rem 1rem; }
    .toc-footer { margin: 0 1.5rem 1.5rem; padding-top: 1rem; }

    .docs-main {
        padding: 0 0 80px;
        width: 100%;
    }

    .docs-rule-flow { flex-direction: column; }
    .rule-flow-split { flex-direction: column; gap: 1rem; }
}

@media (max-width: 600px) {
    .docs-layout { padding: 60px 1.2rem 0; }
    .docs-platform-grid { gap: 0.5rem; }
    .docs-platform-card { min-width: calc(50% - 0.25rem); }
    .docs-step-overview { gap: 0.5rem; justify-content: center; }
    .step-arrow { display: none; }
    .docs-bottom-cta { padding: 2rem 1.5rem; }
}




.tun-compare-wrap {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.tun-compare-col {
    flex: 1;
    min-width: 240px;
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tun-compare-system {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--border-color);
}

.tun-compare-tun {
    background: rgba(225, 29, 72, 0.05);
    border: 1px solid rgba(225, 29, 72, 0.3);
}

.tun-compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
    padding: 0 0.3rem;
}

.tun-compare-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 0.95rem;
}

.tun-compare-system .tun-compare-title { color: var(--text-muted); }
.tun-compare-tun .tun-compare-title    { color: var(--primary-red); }

.tun-compare-layer {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: fit-content;
}

.tun-compare-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}

.tun-compare-list li {
    font-size: 0.87rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tun-compare-list li .fa-check { color: #4ade80; flex-shrink: 0; }
.tun-compare-list li .fa-times  { color: #f87171; flex-shrink: 0; }

.tun-compare-note {
    font-size: 0.78rem;
    text-align: center;
    color: var(--text-muted);
    padding: 0.5rem 0.8rem;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tun-compare-note-good {
    color: var(--primary-red);
    background: rgba(225,29,72,0.08);
    border-color: rgba(225,29,72,0.25);
}


.tun-flow-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
}

.tun-flow-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.tun-flow-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 2rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    text-align: center;
    min-width: 180px;
    transition: 0.3s;
}

.tun-flow-box i   { font-size: 1.4rem; }
.tun-flow-box span { font-weight: 700; font-size: 0.92rem; }
.tun-flow-box small { font-size: 0.75rem; color: var(--text-muted); }

.tun-box-app   { background: rgba(96,165,250,0.08);  border-color: rgba(96,165,250,0.3);  }
.tun-box-app i { color: #60a5fa; }

.tun-box-tun   { background: rgba(251,191,36,0.08);  border-color: rgba(251,191,36,0.3);  }
.tun-box-tun i { color: #fbbf24; }

.tun-box-clash   { background: rgba(225,29,72,0.1);  border-color: rgba(225,29,72,0.4); box-shadow: 0 0 20px rgba(225,29,72,0.12); }
.tun-box-clash i { color: var(--primary-red); }

.tun-box-direct   { background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.3); }
.tun-box-direct i { color: #4ade80; }

.tun-box-proxy   { background: rgba(167,139,250,0.08); border-color: rgba(167,139,250,0.3); }
.tun-box-proxy i { color: #a78bfa; }

.tun-flow-arrow-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0.5rem 0;
    color: var(--border-color);
    font-size: 1rem;
}

.tun-flow-arrow-down span {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.tun-flow-fork-row {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.tun-flow-fork-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}


.tun-use-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.tun-use-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.tun-use-card:hover {
    border-color: rgba(225,29,72,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.tun-use-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.tun-icon-game   { background: rgba(96,165,250,0.15);  color: #60a5fa; }
.tun-icon-stream { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.tun-icon-dev    { background: rgba(74,222,128,0.15);  color: #4ade80; }
.tun-icon-dns    { background: rgba(225,29,72,0.12);   color: var(--primary-red); }

.tun-use-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.6rem; }
.tun-use-card p  { font-size: 0.87rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 0.9rem; }

.tun-use-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #4ade80;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.25);
    padding: 3px 10px;
    border-radius: 20px;
}


.tun-platform-tabs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.2rem 0;
}

.tun-tab-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.tun-tab-title {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.tun-tab-title i { color: var(--text-muted); }

.tun-tab-group .docs-steps::before { opacity: 0.25; }


.tun-dns-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.tun-dns-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    backdrop-filter: blur(10px);
}

.tun-dns-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tun-dns-header h4 { font-size: 1rem; font-weight: 700; margin: 0; }

.tun-dns-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
}

.tun-dns-recommended {
    background: rgba(225,29,72,0.15);
    color: var(--primary-red);
    border: 1px solid rgba(225,29,72,0.35);
}

.tun-dns-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.tun-dns-pros {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tun-dns-pro {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.tun-dns-pro i { color: var(--primary-red); flex-shrink: 0; margin-top: 3px; }


.tun-notice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin: 1.2rem 0;
}

.tun-notice-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.3rem;
    backdrop-filter: blur(10px);
}

.tun-notice-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(225,29,72,0.1);
    color: var(--primary-red);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.tun-notice-item h4 { font-size: 0.92rem; font-weight: 700; margin-bottom: 0.4rem; }
.tun-notice-item p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; margin: 0; }


.tun-why-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1.8rem 0;
    position: relative;
}

.tun-why-list::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 30px;
    bottom: 30px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-red), var(--border-color));
    opacity: 0.3;
}

.tun-why-item {
    display: flex;
    gap: 1.3rem;
    padding-bottom: 2rem;
    position: relative;
}

.tun-why-num {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08);
}

.tun-why-body { flex: 1; padding-top: 8px; }

.tun-why-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.tun-why-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 0;
}

.tun-why-body p strong { color: var(--text-main); }


.tun-recommendation {
    background: rgba(225, 29, 72, 0.04);
    border: 1px solid rgba(225, 29, 72, 0.2);
    border-radius: 20px;
    padding: 1.8rem;
    margin-top: 0.5rem;
}

.tun-rec-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tun-rec-title i { color: var(--primary-red); }

.tun-rec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tun-rec-item {
    border-radius: 14px;
    padding: 1.2rem 1.3rem;
}

.tun-rec-no {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--border-color);
}

.tun-rec-yes {
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.tun-rec-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.8rem;
}

.tun-rec-no .tun-rec-label   { color: var(--text-muted); }
.tun-rec-yes .tun-rec-label  { color: #4ade80; }

.tun-rec-item ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
}

.tun-rec-item ul li {
    font-size: 0.87rem;
    color: var(--text-muted);
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.5;
}

.tun-rec-no  ul li::before { content: "·"; position: absolute; left: 0; color: var(--text-muted); font-size: 1.3rem; line-height: 1; top: 1px; }
.tun-rec-yes ul li::before { content: "✓"; position: absolute; left: 0; color: #4ade80; font-size: 0.8rem; top: 2px; }


.docs-next-section {
    margin: 2.5rem 0 1rem;
}

.docs-next-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.8rem 2rem;
    background: var(--card-bg);
    border: 1px solid rgba(225, 29, 72, 0.25);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.docs-next-card:hover {
    border-color: rgba(225, 29, 72, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(225, 29, 72, 0.1);
}

.docs-next-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 14px;
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid rgba(225, 29, 72, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-red);
}

.docs-next-body { flex: 1; }

.docs-next-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-red);
    margin-bottom: 0.4rem;
}

.docs-next-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.docs-next-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
    line-height: 1.6;
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}


@media (max-width: 900px) {
    .tun-compare-wrap { flex-direction: column; }
    .tun-compare-vs   { display: none; }
    .tun-use-grid     { grid-template-columns: 1fr; }
    .tun-dns-compare  { grid-template-columns: 1fr; }
    .tun-notice-grid  { grid-template-columns: 1fr; }
    .tun-flow-fork-row { gap: 1.5rem; }
    .tun-rec-grid     { grid-template-columns: 1fr; }
    .tun-why-list::before { display: none; }
}

@media (max-width: 600px) {
    .tun-flow-box { min-width: 140px; padding: 0.8rem 1rem; }
    .tun-flow-fork-row { flex-direction: column; align-items: center; }
}

@media (max-width: 768px) {
    .docs-next-card { flex-direction: column; gap: 1rem; padding: 1.4rem; }
    .docs-next-icon { width: 46px; height: 46px; font-size: 1.1rem; }
}
