:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 4px 14px rgba(99, 102, 241, 0.4);
    --transition-base: 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* ===== 导航 ===== */
header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    gap: 1rem;
}

.logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: color var(--transition-base), background-color var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background-color: #f0f0ff;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #24292e;
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color var(--transition-base);
    white-space: nowrap;
    flex-shrink: 0;
}

.github-btn:hover {
    background-color: #1a1e22;
}

/* ===== Hero ===== */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 4rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1.2rem;
    color: #111827;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 780px;
    margin: 0 auto 2.5rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    padding: 0.85rem 2.2rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: var(--shadow-glow);
    transition: transform var(--transition-base), background-color var(--transition-base), box-shadow var(--transition-base);
    margin-bottom: 3.5rem;
}

.cta-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.banner-placeholder {
    width: 100%;
    max-width: 850px;
    height: auto;
    aspect-ratio: 850 / 440;
    background: linear-gradient(135deg, #f5f3ff, #e0e7ff);
    margin: 0 auto 2.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.banner-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-container {
    max-width: 850px;
    margin: 0 auto 3rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

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

/* ===== 通用 Section ===== */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-alt {
    background-color: var(--bg-light);
    max-width: 100%;
}

.bg-alt .section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    margin-bottom: 1rem;
    color: #111827;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto 3rem;
}

/* ===== 功能卡片 ===== */
.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.icon-box {
    width: 48px;
    height: 48px;
    background-color: #e0e7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: #111827;
}

.card p {
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.card code {
    background: #f3f4f6;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #e11d48;
    font-weight: 500;
}

/* ===== 规则流程（创意版块） ===== */
.rule-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
}

.flow-step {
    flex: 1 1 200px;
    min-width: 200px;
    max-width: 240px;
    text-align: center;
}

.flow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

.flow-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.flow-card:hover {
    box-shadow: var(--shadow-md);
}

.flow-card h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.flow-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.flow-arrow {
    display: flex;
    align-items: flex-start;
    padding-top: 2.4rem;
    flex-shrink: 0;
    color: var(--primary-color);
}

/* ===== 平台矩阵（创意版块） ===== */
.platform-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.platform-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.platform-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.platform-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.platform-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #111827;
}

.platform-client {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== 优势列表 ===== */
.grid-advantages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.adv-item {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.adv-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.adv-content h3 {
    font-size: 1.2rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.adv-content p {
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== 场景列表 ===== */
.scenarios-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.scenario-block {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: box-shadow var(--transition-base);
}

.scenario-block:hover {
    box-shadow: var(--shadow-md);
}

.scenario-badge {
    background: #ffedd5;
    color: #ea580c;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.scenario-text h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.scenario-text p {
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.scenario-text code {
    background: #f3f4f6;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #e11d48;
    font-weight: 500;
}

/* ===== Footer ===== */
footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 4rem 2rem 2rem;
    font-size: 0.93rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    border-bottom: 1px solid #374151;
    padding-bottom: 2rem;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.55rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }

    .nav-right {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        align-items: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        margin: 0;
        padding: 0.35rem 0.65rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .banner-placeholder {
        aspect-ratio: 16 / 10;
        max-height: 260px;
    }

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

    .flow-arrow {
        transform: rotate(90deg);
        padding-top: 0;
    }

    .flow-step {
        max-width: 100%;
    }

    .adv-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .scenario-block {
        flex-direction: column;
        gap: 0.8rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    section {
        padding: 3rem 1.2rem;
    }

    .card {
        padding: 1.8rem 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1rem 2rem;
    }

    .cta-btn {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }

    .platform-matrix {
        grid-template-columns: 1fr;
    }

    .grid-advantages {
        grid-template-columns: 1fr;
    }

    .grid-features {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}