/* CSS Variables defining the theme — palette synced with Clash icon */
:root {
    --font-family-base: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    --color-bg: #ffffff;
    --color-bg-alt: #F0F5FA;          /* icon light-blue tint */
    --color-text-main: #0D1B2E;       /* deep navy text */
    --color-text-muted: #5A6E82;      /* steel-blue muted text */
    --color-border: #C6D5E4;          /* blue-tinted border */
    --color-primary: #162D54;         /* icon dark-navy — buttons bg */
    --color-primary-hover: #1F4377;   /* icon main navy — button hover */
    --color-brand-blue: #1F4377;      /* icon dominant navy — links/accents */
    --blob-yellow: #C5D8ED;           /* steel-blue (replaces yellow) */
    --blob-blue: #D4E7F7;             /* pale sky-blue */
    --blob-green: #B8D1E6;            /* medium steel-blue */
    --blob-purple: #E2EDF6;           /* near-white blue */

    --max-width: 1200px;
    --radius-btn: 999px;
    --radius-card: 16px;
    --radius-lg: 24px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, background-color 0.2s ease;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.2;
}

h1 { font-size: 3.5rem; letter-spacing: -0.02em; font-weight: 600; }
h2 { font-size: 2.5rem; letter-spacing: -0.01em; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; font-weight: 600; }
p { color: var(--color-text-muted); font-size: 1.1rem; }

.section-header {
    margin-bottom: 48px;
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    transition: all 0.2s ease;
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.btn-outline:hover {
    background-color: var(--color-bg-alt);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
}

main {
    padding-top: 72px;
}

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

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-brand-blue);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 1.2rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 5px 11px;
    border-radius: 8px;
    position: relative;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--color-text-main);
    background-color: var(--color-bg-alt);
}

.nav-links a.active {
    color: var(--color-primary);
    font-weight: 700;
    background-color: rgba(22, 45, 84, 0.09);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 11px;
    right: 11px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* Language Dropdown */
.lang-switch {
    position: relative;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-switch:hover {
    color: var(--color-text-main);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    min-width: 148px;
    z-index: 1000;
    overflow: hidden;
    animation: langDropIn 0.18s ease;
}

@keyframes langDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lang-dropdown.open {
    display: block;
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.lang-dropdown a:hover {
    background: var(--color-bg-alt);
    color: var(--color-text-main);
}

.lang-dropdown a.active {
    color: var(--color-text-main);
    font-weight: 600;
    background: var(--color-bg-alt);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--color-text-main);
}

/* Section Spacing */
section {
    padding: 100px 0;
    border-top: 1px solid var(--color-border);
}

/* Sections that also carry .container lose vertical padding due to specificity —
   .container (class, 0,1,0) beats section (type, 0,0,1) on the padding shorthand.
   Restore top/bottom padding explicitly with equal or higher specificity. */
.features-section,
.faq-section {
    padding-top: 100px;
    padding-bottom: 100px;
}

/* Hero Section */
.hero {
    padding-top: 100px;
    padding-bottom: 100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    border-top: none;
}

.hero-content {
    max-width: 540px;
}

.hero-content h1 {
    margin-bottom: 24px;
    font-size: 2.8rem;
    text-wrap: balance;
    font-weight: 700;
}

.hero-content p {
    margin-bottom: 40px;
    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Hero Platform Badges */
.hero-platforms {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.hero-platforms-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-platforms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-main);
    background: var(--color-bg);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    text-decoration: none;
}

.platform-badge:hover {
    border-color: var(--color-text-main);
    background: var(--color-bg-alt);
    transform: translateY(-1px);
}

.platform-badge i {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.platform-badge:hover i {
    color: var(--color-text-main);
}

/* Hero Illustration */
.hero-illustration {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-illustration svg {
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 48px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-icon {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-text-main);
    margin-bottom: 24px;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transition: all 0.5s ease;
}

.feature-card:hover .feature-icon::before {
    border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
    transform: scale(1.05);
}

.icon-bg-yellow::before { background-color: var(--blob-yellow); }
.icon-bg-blue::before { background-color: var(--blob-blue); }
.icon-bg-green::before { background-color: var(--blob-green); }

.feature-list {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    width: 100%;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--color-text-main);
    margin-bottom: 12px;
}

.feature-list li i {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* Quick Start Section */
.quick-start-section {
    background-color: var(--color-bg-alt);
}

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

.step-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.step-number {
    font-size: 6rem;
    font-weight: 900;
    color: var(--color-bg-alt);
    position: absolute;
    top: -20px;
    right: 10px;
    z-index: 0;
    user-select: none;
}

.step-content {
    position: relative;
    z-index: 1;
}

.step-icon {
    font-size: 2rem;
    color: var(--color-brand-blue);
    margin-bottom: 24px;
}

.step-content h3 {
    margin-bottom: 12px;
    font-size: 1.4rem;
}

/* Downloads Section */
.downloads-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.community-stats {
    margin-top: 32px;
    display: flex;
    gap: 40px;
}

.stat-item h4 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.stat-item span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.platform-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.platform-card:hover {
    box-shadow: 0 10px 24px rgba(0,0,0,0.05);
    transform: translateY(-2px);
    border-color: transparent;
}

.platform-icon {
    font-size: 2rem;
    color: var(--color-text-main);
    width: 48px;
    text-align: center;
}

.platform-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.platform-info p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Ecosystem Section */
.ecosystem-section {
    background-color: var(--color-bg-alt);
}

.eco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.eco-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--color-border);
    display: flex;
    gap: 20px;
}

.eco-icon {
    width: 48px;
    height: 48px;
    background: var(--color-bg-alt);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-text-main);
    flex-shrink: 0;
}

.eco-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.eco-content p {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.eco-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-brand-blue);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.eco-link:hover {
    color: var(--color-brand-blue);
}

/* FAQ Section */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
    border-top: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 24px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question:hover {
    color: var(--color-brand-blue);
}

.faq-icon {
    transition: transform 0.3s ease;
    font-size: 1rem;
    color: var(--color-text-muted);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer-inner {
    padding-bottom: 24px;
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

.faq-item.active .faq-answer {
    max-height: 4000px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* Footer */
.footer {
    background-color: #ffffff;
    padding: 80px 0 40px;
    border-top: 1px solid var(--color-border);
}

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

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--color-text-main);
}

.social-links a:hover {
    color: var(--color-brand-blue);
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-text-main);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--color-text-main);
}

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

/* Platform Introduction Section */
.platforms-intro-section {
    padding: 96px 0;
    background-color: var(--color-bg-alt);
}

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

.pi-card {
    background: #ffffff;
    border-radius: var(--radius-card);
    border: 1px solid var(--color-border);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pi-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.pi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--color-text-main);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.pi-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-main);
}

.pi-card p {
    font-size: 0.925rem;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 24px;
    color: var(--color-text-muted);
}

.pi-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    border: 1.5px solid var(--color-border);
    color: var(--color-text-main);
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    align-self: flex-start;
    white-space: nowrap;
}

.pi-btn:hover {
    background: var(--color-text-main);
    color: #ffffff;
    border-color: var(--color-text-main);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero, .downloads-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content { margin: 0 auto; }
    .hero-actions { justify-content: center; }
    .hero-platforms { justify-content: center; }
    .hero-platforms-list { justify-content: center; }
    .steps-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .section-header { margin: 0 auto 40px auto; text-align: center; }
}

@media (max-width: 992px) {
    .platforms-intro-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    section { padding: 60px 0; }
    .features-section,
    .faq-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    /* 移动端隐藏导航链接，但保留语言切换按钮 */
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }

    /* 移动端导航右侧收紧间距，隐藏 GitHub 按钮，只留语言切换 + 汉堡菜单 */
    .nav-right { gap: 8px; }
    .nav-right .btn { display: none; }

    /* 移动端语言切换：只显示地球图标，隐藏文字和箭头 */
    .lang-switch > span { display: none; }
    .lang-switch .fa-chevron-down { display: none; }
    .lang-switch { gap: 0; padding: 6px; min-width: 32px; justify-content: center; }

    /* 移动端语言下拉菜单右对齐，防止右侧溢出屏幕 */
    .lang-dropdown {
        left: auto;
        right: 0;
    }

    /* Hero 上下间距缩小，保证横向内边距由 .container 继承 */
    .hero {
        padding-top: 60px;
        padding-bottom: 60px;
        gap: 32px;
    }

    /* Hero 区域段落字号缩小 */
    .hero-content p { font-size: 1rem; }

    /* Hero 按钮纵向堆叠、全宽，align-items: stretch 让按钮撑满容器 */
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: none;
        justify-content: center;
    }

    .platforms-intro-section { padding: 60px 0; }
    .platforms-intro-grid { grid-template-columns: 1fr; gap: 16px; }

    .nav-links.nav-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 8px 0;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        animation: menuSlideDown 0.2s ease forwards;
        min-width: 0;
    }

    .nav-links.nav-open li {
        width: 100%;
    }

    .nav-links.nav-open li a {
        display: block;
        width: 100%;
        padding: 10px 24px;
        font-size: 1rem;
        border-radius: 0;
        border-left: 3px solid transparent;
    }

    .nav-links.nav-open li a:hover {
        background: var(--color-bg-alt);
        color: var(--color-text-main);
    }

    .nav-links.nav-open li a.active {
        color: var(--color-primary);
        font-weight: 700;
        background: rgba(22, 45, 84, 0.07);
        border-left-color: var(--color-primary);
        padding-left: 21px;
    }

    .nav-links.nav-open li a.active::after {
        display: none;
    }

    .platforms-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* 超小屏（手机竖屏）额外微调 */
@media (max-width: 390px) {
    h1 { font-size: 1.9rem; }
    .hero-content p { font-size: 0.95rem; }
    .hero-actions .btn { max-width: none; }
}

/* Nav dropdown animation — must be outside @media to avoid fill-mode locking */
@keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* SVG Animation */
@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.animated-node       { animation: float 6s ease-in-out infinite; }
.animated-node-delay { animation: float 6s ease-in-out infinite; animation-delay: -3s; }

/* ===============================================
   Eyebrow tag
   =============================================== */
.eyebrow-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

/* ===============================================
   Protocol Compatibility Section
   =============================================== */
.proto-section {
    background: var(--color-text-main);
    border-top: none;
    overflow: hidden;
}

.proto-inner {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 80px;
    align-items: center;
}

.proto-copy .eyebrow-tag {
    color: rgba(255, 255, 255, 0.4);
}

.proto-copy h2 {
    color: #ffffff;
    margin-bottom: 20px;
}

.proto-copy > p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 32px;
}

.proto-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.proto-cta-link:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
}

.proto-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.proto-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.proto-row-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.proto-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulseDot 2.8s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.75); }
}

.c-green  { background: var(--blob-green); }
.c-blue   { background: var(--blob-blue); }
.c-yellow { background: var(--blob-yellow); }

.proto-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.93rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
}

.proto-chip {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.07);
    padding: 3px 10px;
    border-radius: 99px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.proto-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.proto-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(149, 163, 188, 0.4), var(--color-brand-blue));
    transition: width 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.proto-note {
    margin-top: 24px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1.6;
}

@media (max-width: 992px) {
    .proto-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ===============================================
   Use Cases Section  (alternating zigzag)
   =============================================== */
.usecases-section {
    background: var(--color-bg);
    padding-bottom: 0;
}

.ue-list {
    display: flex;
    flex-direction: column;
}

.ue-entry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--color-border);
}

.ue-entry:last-child {
    border-bottom: 1px solid var(--color-border);
}

.ue-entry.ue-reverse .ue-vis { order: 2; }
.ue-entry.ue-reverse .ue-body { order: 1; }

.ue-vis {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 40px;
    position: relative;
    overflow: hidden;
}

.ue-vis-stream { background: #f0f9ff; }
.ue-vis-dev    { background: #f0fdf4; }
.ue-vis-game   { background: #fefce8; }

.ue-vis-inner {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vis-shape {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.vs1 { width: 160px; height: 160px; background: rgba(14, 165, 233, 0.1); }
.vs2 { width: 108px; height: 108px; background: rgba(14, 165, 233, 0.18); }
.vs3 { width: 62px;  height: 62px;  background: rgba(14, 165, 233, 0.32); }

.vis-icon {
    font-size: 1.8rem;
    color: var(--color-brand-blue);
    position: relative;
    z-index: 1;
}

.vis-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 180px;
}

.vis-lines span {
    display: block;
    height: 10px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 5px;
    width: 100%;
}

.vis-lines span:nth-child(2) { width: 72%; }
.vis-lines span:nth-child(3) { width: 88%; background: rgba(34, 197, 94, 0.38); }
.vis-lines span:nth-child(4) { width: 50%; }
.vis-lines span:nth-child(5) { width: 80%; }

.vis-ping {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 80px;
}

.ping-bar {
    width: 18px;
    border-radius: 3px 3px 0 0;
}

.pb1 { height: 25%; background: rgba(234, 179, 8, 0.3); }
.pb2 { height: 50%; background: rgba(234, 179, 8, 0.5); }
.pb3 { height: 75%; background: rgba(234, 179, 8, 0.7); }
.pb4 { height: 100%; background: rgba(234, 179, 8, 0.9); }

.vis-ms {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--color-text-main);
    opacity: 0.07;
    letter-spacing: -3px;
    line-height: 1;
    user-select: none;
}

.ue-body {
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--color-border);
}

.ue-entry.ue-reverse .ue-body {
    border-left: none;
    border-right: 1px solid var(--color-border);
    padding-left: max(24px, calc((100vw - var(--max-width)) / 2 + 24px));
}

.ue-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-brand-blue);
    margin-bottom: 12px;
}

.ue-body h3 {
    font-size: 1.65rem;
    margin-bottom: 16px;
    line-height: 1.3;
}

.ue-body p {
    font-size: 0.97rem;
    line-height: 1.8;
    margin-bottom: 24px;
    max-width: 420px;
}

.ue-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
}

.ue-tags li {
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 4px 14px;
    border-radius: 99px;
}

@media (max-width: 768px) {
    .usecases-section { padding-bottom: 0; }

    .ue-entry {
        grid-template-columns: 1fr;
    }

    .ue-entry.ue-reverse .ue-vis,
    .ue-entry.ue-reverse .ue-body {
        order: unset;
    }

    .ue-vis { min-height: 160px; padding: 32px; }

    .ue-body {
        padding: 32px 24px;
        border-left: none;
        border-top: 1px solid var(--color-border);
    }

    .ue-entry.ue-reverse .ue-body {
        border-right: none;
        border-top: 1px solid var(--color-border);
    }

    .ue-body h3 { font-size: 1.35rem; }
    .ue-body p  { max-width: none; }
}

/* ===============================================
   Config Preview Section
   =============================================== */
.config-section {
    background: var(--color-bg-alt);
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
    gap: 24px;
    flex-wrap: wrap;
}

.config-header .section-header {
    margin-bottom: 0;
}

.config-wrap {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.code-editor {
    background: #1a1b26;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.editor-chrome {
    background: #16161e;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ec-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ec-r { background: #ff5f57; }
.ec-y { background: #febc2e; }
.ec-g { background: #28c840; }

.ec-fname {
    margin-left: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Courier New', Courier, monospace;
}

.editor-body {
    padding: 24px 0;
    overflow-x: auto;
}

.editor-pre {
    margin: 0;
    padding: 0 28px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.85;
    white-space: pre;
    color: rgba(255, 255, 255, 0.7);
}

/* YAML syntax highlight tokens */
.yc { color: #565f89; font-style: italic; }
.yk { color: #7dcfff; }
.yv { color: #ff9e64; }
.yb { color: #ff7a93; }
.ys { color: #9ece6a; }
.yl { color: #414868; font-size: 0.78rem; }

.config-notes {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-top: 4px;
}

.cnote {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.cnote-num {
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: var(--color-text-main);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 2px;
}

.cnote-body strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 4px;
}

.cnote-body p {
    font-size: 0.86rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 992px) {
    .config-wrap {
        grid-template-columns: 1fr;
    }

    .config-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
