/* ============================================================
   源码企业站 全新科技风格
   ============================================================ */
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f6f8fb;
    --color-bg-deep: #0b1220;
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light: #3b82f6;
    --color-accent: #06b6d4;
    --color-text: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-tertiary: #9ca3af;
    --color-border: #e5e7eb;
    --color-white: #ffffff;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* ============ 顶部导航 ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.brand-mark--sm {
    width: 34px;
    height: 34px;
    font-size: 13px;
    border-radius: 8px;
}

.brand-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.brand-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-tertiary);
    background: var(--color-bg-alt);
    padding: 2px 8px;
    border-radius: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--color-text-secondary);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.08);
}

.header-cta {
    padding: 9px 20px;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.header-cta:hover {
    background: var(--color-primary-dark);
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
}

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

.btn-ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ============ Hero ============ */
.hero {
    background: radial-gradient(1200px 600px at 20% -10%, rgba(37, 99, 235, 0.25), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(6, 182, 212, 0.18), transparent 55%),
        var(--color-bg-deep);
    color: #fff;
    padding: 88px 0 96px;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    color: #c7d2fe;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 46px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
}

.hero-subtitle {
    font-size: 17px;
    color: #cbd5e1;
    max-width: 520px;
    margin-bottom: 32px;
}

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

.hero-actions .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-actions .btn-ghost:hover {
    border-color: #fff;
    color: #fff;
}

/* 代码窗口 */
.code-window {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.code-window__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.dot--red { background: #f87171; }
.dot--yellow { background: #fbbf24; }
.dot--green { background: #34d399; }

.code-window__file {
    margin-left: 8px;
    font-size: 12px;
    color: #64748b;
    font-family: "SF Mono", Consolas, monospace;
}

.code-window__body {
    padding: 20px;
    font-size: 13px;
    line-height: 1.8;
    color: #e2e8f0;
    font-family: "SF Mono", Consolas, "Courier New", monospace;
    overflow-x: auto;
}

.c-k { color: #c084fc; }
.c-c { color: #60a5fa; }
.c-v { color: #fbbf24; }
.c-f { color: #34d399; }
.c-s { color: #f87171; }

/* ============ 通用区块 ============ */
.section {
    padding: 72px 0;
}

.section--alt {
    background: var(--color-bg-alt);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
}

.section-more {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
}

.section-more:hover {
    text-decoration: underline;
}

/* ============ 源码卡片网格 ============ */
.source-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.source-card {
    display: block;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.25s;
}

.source-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.source-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.source-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.source-card__arrow {
    flex-shrink: 0;
    color: var(--color-text-tertiary);
    font-size: 18px;
    transition: all 0.2s;
}

.source-card:hover .source-card__arrow {
    color: var(--color-primary);
    transform: translateX(3px);
}

.source-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.source-card__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.source-card__label {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--color-text-tertiary);
    padding-top: 3px;
    min-width: 56px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.6;
}

.tag--blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.tag--amber {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.source-card__menu {
    font-size: 13px;
    color: var(--color-text-secondary);
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============ 优势区 ============ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.25s;
}

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

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* ============ 页头（列表/详情） ============ */
.page-hero {
    background: linear-gradient(135deg, #0b1220 0%, #16233f 100%);
    color: #fff;
    padding: 56px 0;
}

.page-hero__title {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-hero__subtitle {
    font-size: 16px;
    color: #cbd5e1;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb__sep {
    color: #475569;
}

.breadcrumb__current {
    color: #cbd5e1;
}

/* 详情页操作按钮 */
.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.page-hero--detail .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.page-hero--detail .btn-ghost:hover {
    border-color: #fff;
    color: #fff;
}

/* ============ 搜索 ============ */
.search-box {
    display: flex;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto 40px;
}

.search-input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-btn {
    padding: 12px 28px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 0;
    color: var(--color-text-tertiary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 24px 0;
    color: var(--color-text-tertiary);
    font-size: 14px;
}

/* ============ 详情页 ============ */
.detail-layout {
    max-width: 900px;
}

.spec-table {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 8px 28px;
    margin-bottom: 40px;
}

.spec-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border);
}

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

.spec-row dt {
    flex-shrink: 0;
    width: 90px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding-top: 4px;
}

.spec-row dd {
    flex: 1;
    font-size: 14px;
    color: var(--color-text);
}

.spec-row--top {
    align-items: flex-start;
}

.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.mini-tags--green .mini-tag {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.mini-tags--blue .mini-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.mini-tags--amber .mini-tag {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.detail-menu {
    line-height: 1.9;
    white-space: pre-line;
}

/* 第三方服务 */
.third-service {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.service-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--color-bg-alt);
    border-radius: 8px;
}

.service-name {
    font-size: 13px;
    color: var(--color-text);
}

.service-pay {
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 4px;
}

.service-pay--yes {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.service-pay--no {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.service-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 8px;
}

.notice-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.notice-text {
    font-size: 13px;
    color: #92400e;
}

/* 产品描述 */
.product-description {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
}

.description-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.description-content {
    font-size: 15px;
    line-height: 1.9;
    color: var(--color-text);
    word-break: break-word;
}

.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4 {
    margin: 20px 0 12px;
    line-height: 1.4;
}

.description-content h1 { font-size: 24px; }
.description-content h2 { font-size: 21px; }
.description-content h3 { font-size: 18px; }
.description-content h4 { font-size: 16px; }

.description-content p {
    margin: 10px 0;
}

.description-content img {
    border-radius: 8px;
    margin: 12px 0;
}

.description-content ul,
.description-content ol {
    padding-left: 24px;
    margin: 10px 0;
}

.description-content li {
    margin: 4px 0;
}

.description-content pre {
    background: var(--color-bg-deep);
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.description-content code {
    font-family: "SF Mono", Consolas, monospace;
}

.description-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 8px 16px;
    background: var(--color-bg-alt);
    margin: 12px 0;
    color: var(--color-text-secondary);
}

.description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.description-content th,
.description-content td {
    border: 1px solid var(--color-border);
    padding: 8px 12px;
    text-align: left;
}

.description-content th {
    background: var(--color-bg-alt);
    font-weight: 600;
}

/* ============ 微信弹窗 ============ */
.wx-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wx-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.wx-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 26px;
    line-height: 1;
    color: var(--color-text-tertiary);
    cursor: pointer;
    background: none;
    border: none;
}

.wx-close:hover {
    color: var(--color-text);
}

.wx-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.wx-qrcode {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.wx-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wx-tip {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* ============ 底部 ============ */
.site-footer {
    background: var(--color-bg-deep);
    color: #94a3b8;
    padding: 48px 0;
}

.footer-inner {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.footer-desc {
    font-size: 14px;
    max-width: 480px;
    margin: 0 auto 20px;
}

.footer-copy {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.icp-info {
    font-size: 13px;
}

.icp-info a {
    color: #64748b;
    transition: color 0.2s;
}

.icp-info a:hover {
    color: #cbd5e1;
}

/* ============ 服务中心 ============ */
#contact {
    scroll-margin-top: 80px;
}

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

.process-step {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    transition: all 0.25s;
}

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

.process-num {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.process-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.process-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.contact-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: linear-gradient(135deg, #0b1220 0%, #16233f 100%);
    border-radius: var(--radius);
    padding: 48px;
    color: #fff;
}

.contact-info {
    flex: 1;
}

.contact-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.contact-desc {
    font-size: 15px;
    color: #cbd5e1;
    max-width: 520px;
    line-height: 1.8;
}

.contact-qrcode {
    flex-shrink: 0;
    text-align: center;
}

.contact-qrcode img {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    margin-bottom: 10px;
}

.contact-tip {
    font-size: 13px;
    color: #94a3b8;
}

/* ============ 响应式 ============ */
@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 36px;
    }

    .source-grid,
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .section {
        padding: 48px 0;
    }

    .hero {
        padding: 56px 0 64px;
    }

    .hero-title {
        font-size: 30px;
    }

    .source-grid,
    .feature-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        gap: 2px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 14px;
    }

    .header-cta {
        display: none;
    }

    .contact-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 32px 24px;
        gap: 24px;
    }

    .contact-desc {
        margin: 0 auto;
    }

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

    .spec-row dt {
        width: auto;
    }
}
