:root {
    --bg-color: #FAFAFA;
    --surface: #FFFFFF;
    --primary: #0055FF;
    --primary-hover: #0044CC;
    --text-dark: #111827;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --accent: #F3F4F6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Nav ─────────────────────────────────────────── */

nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}
.logo img { width: 32px; height: 32px; object-fit: contain; }

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.3s;
    font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-dark); }

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px 0;
}
.lang-switch:hover { color: var(--text-dark); }

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ─── Hero ────────────────────────────────────────── */

#hero {
    padding: 180px 20px 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

.hero-title span { color: var(--primary); }

.hero-desc {
    max-width: 600px;
    color: var(--text-light);
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0 auto 40px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.btn {
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 85, 255, 0.2);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 85, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--text-light);
    background: var(--accent);
}

.hero-platforms-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeIn 1s ease-out 0.5s both;
}

.hero-platforms-text {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.hero-platforms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.platform-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 100px;
    transition: all 0.3s ease;
    cursor: default;
}

.platform-badge i { font-size: 1.1rem; }

.platform-badge:hover {
    color: var(--primary);
    border-color: rgba(0, 85, 255, 0.3);
    background-color: rgba(0, 85, 255, 0.05);
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Feature Rows ────────────────────────────────── */

.feature-row {
    padding: 120px 0;
    border-bottom: 1px solid var(--border);
}

.feature-row:last-child { border-bottom: none; }

.feature-row.alt-bg { background-color: var(--surface); }

.feature-container {
    display: flex;
    align-items: center;
    gap: 80px;
}

.feature-row:nth-child(even) .feature-container {
    flex-direction: row-reverse;
}

.feature-content { flex: 1; }

.feature-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    display: inline-block;
}

.feature-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.feature-content p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 32px;
    font-weight: 300;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-dark);
    font-weight: 500;
}

.feature-list li i {
    color: var(--primary);
    font-size: 1.2rem;
}

.feature-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ─── Routing Diagram ─────────────────────────────── */

.routing-diagram {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-family: 'Inter', sans-serif;
}

.rd-sources {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.rd-source-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
}

.rd-source-chip i { font-size: 0.85rem; }

.rd-arrow {
    width: 2px;
    height: 28px;
    background: linear-gradient(to bottom, var(--border), var(--primary));
    position: relative;
    margin: 0 auto;
}

.rd-arrow::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--primary);
}

.rd-engine {
    background: var(--primary);
    color: white;
    border-radius: 12px;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(0, 85, 255, 0.25);
    margin: 4px 0;
}

.rd-engine-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.rd-engine-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.rd-engine-text small {
    font-size: 0.72rem;
    opacity: 0.75;
    font-family: 'Fira Code', monospace;
    letter-spacing: 0.02em;
}

.rd-fork-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    width: 100%;
}

.rd-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 160px;
}

.rd-branch-line { width: 2px; height: 28px; }

.rd-branch-line::after {
    content: '';
    display: block;
    width: 0;
    margin: 0 auto;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.rd-dest {
    border-radius: 12px;
    padding: 16px 18px;
    width: 100%;
    text-align: center;
    border: 1px solid;
}

.rd-dest-direct {
    background: rgba(34, 197, 94, 0.07);
    border-color: rgba(34, 197, 94, 0.3);
}

.rd-dest-proxy {
    background: rgba(245, 158, 11, 0.07);
    border-color: rgba(245, 158, 11, 0.3);
}

.rd-dest-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1rem;
}

.rd-dest-direct .rd-dest-icon { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.rd-dest-proxy  .rd-dest-icon { background: rgba(245, 158, 11, 0.15); color: #d97706; }

.rd-dest strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.rd-dest small { font-size: 0.75rem; color: var(--text-light); }

.rd-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    margin-top: 8px;
    letter-spacing: 0.05em;
}

.rd-tag-direct { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.rd-tag-proxy  { background: rgba(245, 158, 11, 0.15); color: #d97706; }

@keyframes flow-dot {
    0%   { top: 0;    opacity: 1; }
    80%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.rd-branch-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: flow-dot 1.6s infinite ease-in;
}

.rd-branch-direct .rd-branch-dot { background: #22c55e; animation-delay: 0s; }
.rd-branch-proxy  .rd-branch-dot { background: #f59e0b; animation-delay: 0.8s; }

.rd-branch-line-wrap {
    position: relative;
    width: 2px;
    height: 28px;
    overflow: visible;
}

/* ─── Protocol Grid ───────────────────────────────── */

.protocol-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.protocol-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
}

.protocol-group-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 12px;
}

.protocol-group-label i { font-size: 0.75rem; }

.protocol-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proto-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    letter-spacing: 0.01em;
}

.proto-core {
    background: rgba(0, 85, 255, 0.08);
    color: var(--primary);
    border: 1px solid rgba(0, 85, 255, 0.18);
}

.proto-new {
    background: rgba(245, 158, 11, 0.08);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.proto-transport {
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ─── Stats Banner ────────────────────────────────── */

.stats-banner {
    background-color: var(--text-dark);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 8px;
    color: var(--surface);
}

.stat-item p {
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ─── Download Section ────────────────────────────── */

.download-section {
    padding: 120px 0;
    border-top: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 300;
}

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

.download-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.25s ease;
}

.download-card:hover {
    border-color: rgba(0, 85, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 85, 255, 0.08);
    transform: translateY(-4px);
}

.download-card-icon {
    width: 52px;
    height: 52px;
    background: rgba(0, 85, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.download-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.download-card .version-hint {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: -4px;
    flex: 1;
}

.btn-download {
    margin-top: 8px;
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
}

.download-note {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.download-note i { margin-right: 6px; color: #22c55e; }

/* ─── Footer ──────────────────────────────────────── */

footer {
    background: var(--surface);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-light);
    margin-top: 20px;
    max-width: 300px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links h4 { margin-bottom: 24px; font-weight: 600; font-size: 1rem; }
.footer-links ul li { margin-bottom: 16px; }
.footer-links ul li a { color: var(--text-light); transition: color 0.2s; font-size: 0.95rem; }
.footer-links ul li a:hover { color: var(--primary); }

.footer-disclaimer {
    border-top: 1px solid var(--border);
    padding: 24px 0 20px;
}

.footer-disclaimer p {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.7;
    opacity: 0.75;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ─── Responsive ──────────────────────────────────── */

@media (max-width: 1024px) {
    .mobile-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 80px; left: 0; right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 40px 20px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    .nav-links.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .lang-switch { display: none; }
    .feature-container { gap: 40px; }
}

@media (max-width: 768px) {
    #hero { padding: 130px 20px 72px; }
    .hero-title { font-size: 3rem; overflow-wrap: break-word; }
    .hero-desc { font-size: 1.12rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { justify-content: center; width: 100%; }

    .feature-container,
    .feature-row:nth-child(even) .feature-container {
        flex-direction: column;
        text-align: center;
    }

    .feature-list { text-align: left; }
    .feature-list li { justify-content: flex-start; align-items: flex-start; overflow-wrap: anywhere; min-width: 0; }
    .feature-list li i { margin-top: 5px; flex-shrink: 0; }
    .feature-visual, .routing-diagram { max-width: 100%; }
    .rd-sources { flex-wrap: wrap; justify-content: center; }
    .rd-fork-row { gap: 14px; }
    .rd-branch { max-width: 150px; }
    .feature-content h2 { font-size: 2rem; }
    .section-header { margin-bottom: 44px; }
    .section-header h2 { font-size: 2.1rem; }
    .stat-item h3 { font-size: 2.8rem; }
    .download-section { padding: 80px 0; }

    .stats-grid { flex-direction: column; gap: 40px; }
    .download-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}

@media (max-width: 560px) {
    .container { padding: 0 18px; }
    #hero { padding: 116px 16px 56px; }
    .hero-title { font-size: clamp(1.9rem, 7.5vw, 2.3rem); line-height: 1.15; }
    .rd-fork-row { gap: 10px; }
    .rd-branch { max-width: 135px; }
    .hero-desc { font-size: 1.02rem; }
    .feature-content h2 { font-size: 1.7rem; }
    .feature-content p { font-size: 1rem; }
    .section-header h2 { font-size: 1.75rem; }
    .section-header p { font-size: 1rem; }
    .stat-item h3 { font-size: 2.4rem; }
    .download-grid { grid-template-columns: 1fr; }
}
