/* ==========================================================================
   CodeShield · 首页（着陆页）样式 —— 1:1 复刻 React 版 Home
   区块顺序：悬浮胶囊导航 → Hero → 代码对比窗 → Intro → 免费加密上传 →
            支持版本 → 特性网格 → 工作流程 → 友情链接 → FAQ → CTA → 页脚
   ========================================================================== */

/* ---------------- 顶部悬浮导航 ---------------- */
.cs-top {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 12px 16px;
    transition: padding .3s;
}
.cs-nav {
    width: min(calc(100% - 32px), 896px);
    margin-inline: auto;
    height: 48px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: background .3s, border-color .3s, box-shadow .3s;
}
.cs-top.is-scrolled .cs-nav {
    border-color: var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
}
.cs-brand {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -.03em;
    text-decoration: none;
    color: var(--fg);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cs-brand-mark {
    width: 26px; height: 26px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    background: var(--fg);
    color: var(--bg);
    flex: 0 0 auto;
}
.cs-brand-mark svg { width: 14px; height: 14px; }
.cs-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    min-width: 0;
}
.cs-nav-links a {
    color: var(--muted);
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 999px;
    white-space: nowrap;
    transition: color .18s, background .18s;
}
.cs-nav-links a:hover { color: var(--fg); background: var(--soft); }
.cs-nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    font-size: 13px;
    white-space: nowrap;
}
.cs-nav-actions a { text-decoration: none; }
.cs-nav .cs-pill { height: 34px; padding: 7px 13px; font-size: 13px; }
.cs-login-link {
    padding: 7px 8px !important;
    color: var(--muted) !important;
    border-radius: 999px;
}
.cs-login-link:hover { color: var(--fg) !important; background: var(--soft); }

/* 移动端菜单按钮 */
.cs-nav-toggle { display: none; }
.cs-mobile-menu { display: none; }

/* ---------------- Hero ---------------- */
.cs-hero {
    text-align: center;
    padding-top: 160px;
    padding-bottom: 0;
}
.cs-hero > * {
    width: min(100%, 768px);
    margin-left: auto;
    margin-right: auto;
}
.cs-hero h1 {
    font-size: 72px;
    line-height: 1;
    letter-spacing: -.03em;
    font-weight: 700;
    margin: 0 0 24px;
}
.cs-hero h1 .cs-grad {
    font-family: var(--mono);
    font-size: 72px;
    line-height: 1;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, #2ed6ae 5%, #78e8d1 50%, #20bed5 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.cs-hero .cs-lead {
    max-width: 576px;
    font-size: 18px;
    line-height: 28px;
    color: var(--muted);
    margin: 0 auto;
}
.cs-hero .cs-fine {
    max-width: 672px;
    font-size: 14px;
    line-height: 22px;
    color: #9a9a9a;
    margin: 16px auto 0;
}
.cs-hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    height: 40px;
}
.cs-hero-cta .cs-pill { height: 40px; padding: 8px 14px; }
.cs-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 40px;
    height: 28px;
    font: 12px var(--mono);
    color: var(--muted);
}
.cs-stats b { font-weight: 700; color: var(--fg); font-size: 14px; }
.cs-stats i { font-style: normal; color: #c5c5c5; }
.cs-partners { margin-top: 40px; color: #9a9a9a; font: 12px var(--mono); height: 16px; }

/* ---------------- 代码对比窗 ---------------- */
.cs-code-showcase {
    width: min(calc(100% - 48px), 1024px);
    margin: 80px auto 96px;
}
.cs-code-window {
    overflow: hidden;
    border: 1px solid #2d2d2d;
    border-radius: 10px;
    background: #0c0c0c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    position: relative;
}
.cs-code-bar {
    height: 36px;
    background: #191919;
    color: #888;
    display: flex;
    align-items: center;
    padding: 0 16px;
    font: 12px var(--mono);
}
.cs-code-bar .cs-dots { display: flex; gap: 6px; margin-right: 14px; }
.cs-code-bar .cs-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3c3c3c; }
.cs-code-bar .cs-bar-muted { margin-left: auto; font-family: var(--mono); }
.cs-code-cols { display: grid; grid-template-columns: 1fr 1fr; }
.cs-code-card { min-width: 0; }
.cs-code-card + .cs-code-card { border-left: 1px solid #272727; }
.cs-code-title {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    color: #c5c5c5;
    font: 13px var(--mono);
    border-bottom: 1px solid #242424;
}
.cs-code-title svg { width: 14px; height: 14px; }
.cs-code-card .cs-code-title .cs-ic-locked { color: #f06b6b; }
.cs-code-card:last-child .cs-code-title .cs-ic-unlocked { color: #3bd59e; }
.cs-code-tag {
    margin-left: auto;
    padding: 2px 8px;
    min-height: 20px;
    border-radius: 999px;
    font: 10px var(--mono);
    display: inline-flex;
    align-items: center;
}
.cs-code-tag.red { color: #ff7777; background: #35151b; }
.cs-code-tag.green { color: #45dca9; background: #13372c; }
.cs-code-scroll { height: 280px; overflow-y: auto; scrollbar-gutter: stable; }
.cs-code-pre {
    margin: 0;
    padding: 16px 0 !important;
    font: 13px/1.625 var(--mono);
    color: #d4d4d4;
    white-space: pre;
}
.cs-code-card:last-child .cs-code-pre { color: #cfd8d5; }
.cs-code-line { display: flex; min-height: 21px; padding: 0 16px; }
.cs-code-line:hover { background: rgba(255, 255, 255, .03); }
.cs-line-no {
    display: inline-block;
    width: 32px;
    flex: 0 0 32px;
    margin-right: 16px;
    color: #737373;
    text-align: right;
    user-select: none;
}
.cp-comment { color: #737373; }
.cp-string { color: #00d294; }
.cp-variable { color: #00d2ef; }
.cp-number, .cp-keyword { color: #a685ff; }
.cp-builtin { color: #fcbb00; }
.cs-code-status {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #171717;
    color: #8c8c8c;
    font: 12px var(--mono);
    border-top: 1px solid #252525;
}
.cs-code-status span:first-child { display: flex; align-items: center; gap: 8px; color: #9a9a9a; }
.cs-code-status i {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #18c28b;
    box-shadow: 0 0 9px #18c28b;
    display: inline-block;
}

/* ---------------- Intro ---------------- */
.cs-intro { max-width: 1024px; padding: 96px 0; }
.cs-intro-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: min(100%, 976px);
    margin-inline: auto;
}
.cs-intro-top h2 { font-size: 20px; line-height: 28px; letter-spacing: -.02em; margin: 0; }
.cs-intro-top p { font-size: 14px; line-height: 22.75px; color: var(--muted); margin: 12px 0 0; }
.cs-intro-bottom {
    display: grid;
    grid-template-columns: 1.22fr 1fr;
    gap: 32px;
    width: min(100%, 976px);
    margin: 130px auto 0;
}
.cs-intro-copy h2 { font-size: 24px; line-height: 32px; letter-spacing: -.025em; margin: 0; }
.cs-intro-copy p { font-size: 14px; line-height: 22.75px; color: var(--muted); margin: 16px 0 0; }
.cs-intro-side { display: flex; flex-direction: column; gap: 16px; }
.cs-intro-side h3 { font-size: 16px; line-height: 24px; margin: 0; }
.cs-intro-side p { font-size: 14px; line-height: 22.75px; color: var(--muted); margin: 8px 0 0; }

/* ---------------- 免费加密（上传区） ---------------- */
.cs-try {
    width: 100%;
    padding: 96px 0;
    background: #fafafa;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.cs-try > * { width: min(calc(100% - 48px), 896px); margin-left: auto !important; margin-right: auto !important; text-align: center; }
.cs-try h2 { font-size: 30px; line-height: 36px; letter-spacing: -.025em; margin: 0; }
.cs-try > p {
    font-size: 16px;
    line-height: 24px;
    max-width: 512px;
    color: var(--muted);
    margin: 12px auto 40px;
}
.cs-try .cs-upload {
    max-width: 848px;
    min-height: 256px;
    height: 256px;
    border-width: 2px;
    border-radius: 8px;
    margin-top: 0;
}
.cs-try .cs-upload-icon {
    width: 56px; height: 56px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--soft);
    margin-bottom: 5px;
}
.cs-try .cs-upload.selected .cs-upload-icon { background: #dff8f1; color: #159f7c; }
.cs-try .cs-upload strong { font-size: 16px; }
.cs-try .cs-upload small { font-size: 12px; }
.cs-try-file-name {
    max-width: 848px;
    margin-top: 12px !important;
    font: 12px var(--mono);
    color: var(--accent-ink);
    min-height: 19px;
}
.cs-try .cs-upload-note {
    max-width: 848px;
    font-size: 12px !important;
    line-height: 19.5px;
    color: var(--muted);
    margin: 14px auto 0 !important;
}
.cs-try .cs-notice {
    max-width: 848px;
    font-size: 12px !important;
    line-height: 19.5px;
    color: #999;
    margin: 12px auto 0 !important;
}

/* ---------------- 支持版本 ---------------- */
.cs-versions { width: 100%; padding: 96px 0; border-top: 1px solid var(--border); }
.cs-versions > * { width: min(calc(100% - 48px), 1024px); margin-left: auto !important; margin-right: auto !important; text-align: center; }
.cs-versions h2 { font-size: 30px; line-height: 36px; letter-spacing: -.025em; margin: 0; }
.cs-versions > p { font-size: 16px; line-height: 24px; max-width: 700px; color: var(--muted); margin: 12px auto 0; }
.cs-version-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    margin-top: 48px;
    max-width: 1024px;
}
.cs-version-group h3 {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 0 0 16px;
    color: #666;
    text-align: left;
}
.cs-version-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cs-version-buttons.single { grid-template-columns: 1fr; }
.cs-version-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    height: 40px;
    border: 1px solid #dedede;
    border-radius: 8px;
    color: var(--fg);
    text-decoration: none;
    font-size: 14px;
    background: var(--bg);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.cs-version-button:hover {
    border-color: #bcbcbc;
    box-shadow: 0 7px 18px rgba(0, 0, 0, .04);
    transform: translateY(-1px);
}

/* ---------------- 特性网格 ---------------- */
.cs-features {
    width: min(calc(100% - 48px), 1024px);
    margin-inline: auto;
    padding: 96px 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 32px;
}
.cs-feature { min-width: 0; }
.cs-feature-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.cs-feature-icon svg { width: 19px; height: 19px; }
.cs-feature h3 { font-size: 16px; line-height: 24px; margin: 0 0 6px; letter-spacing: -.01em; }
.cs-feature p { font-size: 14px; line-height: 22.75px; margin: 0; max-width: 380px; color: var(--muted); }
.cs-feature-0 .cs-feature-icon { background: #f2eaff; color: #985cff; border-color: #e1ceff; }
.cs-feature-1 .cs-feature-icon { background: #e5f5ff; color: #20a4e8; border-color: #c8eaff; }
.cs-feature-2 .cs-feature-icon { background: #eff9df; color: #72c800; border-color: #dff0ba; }
.cs-feature-3 .cs-feature-icon { background: #e6faf4; color: #00b987; border-color: #c8f2e5; }
.cs-feature-4 .cs-feature-icon { background: #fff6e6; color: #f2a100; border-color: #ffe8be; }
.cs-feature-5 .cs-feature-icon { background: #e7f8ff; color: #00acd5; border-color: #c3effb; }

/* ---------------- 工作流程 ---------------- */
.cs-how {
    width: 100%;
    padding: 96px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}
.cs-how > * { width: min(calc(100% - 48px), 1024px); margin-left: auto !important; margin-right: auto !important; text-align: center; }
.cs-how h2 { font-size: 30px; line-height: 36px; letter-spacing: -.025em; margin: 0; }
.cs-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
    max-width: 1024px;
}
.cs-steps:before {
    content: '';
    position: absolute;
    left: 16.6667%; right: 16.6667%; top: 24px;
    border-top: 1px solid #dcdcdc;
}
.cs-step-card {
    position: relative;
    z-index: 1;
    min-height: 170px;
    padding: 32px 24px 24px;
    text-align: center;
    border: 1px solid #dedede;
    border-radius: 12px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cs-step-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: max-content;
    padding: 4px 12px;
    border: 1px solid #dedede;
    border-radius: 999px;
    background: var(--bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .04);
    color: #008f73;
    font-size: 12px;
}
.cs-step-badge b { font: 700 12px var(--mono); }
.cs-step-badge svg { width: 14px; height: 14px; color: #777; }
.cs-step-card h3 { font-size: 16px; line-height: 24px; margin: 0 0 6px; }
.cs-step-card p { color: var(--muted); font-size: 14px; line-height: 22px; max-width: 300px; margin: 0; }

/* ---------------- 友情链接 ---------------- */
.cs-links-section { width: 100%; padding: 96px 0; border-top: 1px solid var(--border); }
.cs-links-section > * { width: min(calc(100% - 48px), 1024px); margin-left: auto !important; margin-right: auto !important; text-align: center; }
.cs-links-section h2 { font-size: 30px; line-height: 36px; letter-spacing: -.025em; margin: 0 0 40px; }
.cs-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    text-align: left;
}
.cs-links-grid .cs-product-item { min-width: 0; }
.cs-links-grid .cs-product-item a { text-decoration: none; color: inherit; display: block; }

/* ---------------- FAQ ---------------- */
.cs-faq { width: 100%; padding: 96px 0; background: #fafafa; border-top: 1px solid var(--border); }
.cs-faq > * { width: min(calc(100% - 48px), 672px); margin-left: auto !important; margin-right: auto !important; }
.cs-faq h2 { font-size: 30px; line-height: 36px; letter-spacing: -.025em; margin: 0 0 40px; text-align: center; }
.cs-faq-item { border-top: 1px solid var(--border); }
.cs-faq-item:last-child { border-bottom: 1px solid var(--border); }
.cs-faq-item button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border: 0;
    background: none;
    color: var(--fg);
    font: 14px var(--sans);
    text-align: left;
    cursor: pointer;
}
.cs-faq-item button svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--muted); }
.cs-faq-item .cs-faq-answer {
    color: var(--muted);
    font-size: 14px;
    line-height: 22px;
    margin: -5px 32px 16px 0;
    display: none;
}
.cs-faq-item.open .cs-faq-answer { display: block; }

/* ---------------- 最终 CTA ---------------- */
.cs-final { width: 100%; padding: 96px 0; border-top: 1px solid var(--border); text-align: center; }
.cs-final > * { width: min(calc(100% - 48px), 672px); margin-left: auto; margin-right: auto; }
.cs-final h2 { font-size: 30px; line-height: 36px; letter-spacing: -.025em; margin: 0 0 16px; }
.cs-final p { font-size: 16px; line-height: 24px; color: var(--muted); margin: 0 0 27px; }
.cs-final > div { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------------- 页脚 ---------------- */
.cs-footer {
    width: min(calc(100% - 48px), 1120px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
    gap: 50px;
    padding: 64px 0 35px;
    border-top: 1px solid var(--border);
    text-align: left;
}
.cs-foot-brand p { color: var(--muted); font-size: 14px; max-width: 230px; margin: 14px 0 16px; }
.cs-foot-qr { display: flex; align-items: flex-start; gap: 12px; margin-top: 6px; }
.cs-foot-qr img { width: 86px; height: 86px; border-radius: 8px; border: 1px solid var(--border); }
.cs-foot-qr span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.cs-footer h4 { font-size: 13px; margin: 0 0 14px; }
.cs-footer > div > a:not(.cs-brand):not(.cs-text-link) {
    display: block;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    margin: 9px 0;
}
.cs-footer > div > a:hover { color: var(--fg); }
.cs-copyright {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 30px;
    margin-top: 25px;
    border-top: 1px solid var(--border);
    color: #999;
    font: 12px var(--mono);
}
.cs-copyright div { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cs-copyright a { color: inherit; text-decoration: none; }
.cs-copyright a:hover { color: var(--fg); }
.cs-copyright .cs-beian { display: inline-flex; align-items: center; gap: 6px; }
.cs-copyright .cs-beian img { height: 14px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
    .cs-nav { width: calc(100% - 16px); }
    .cs-hero h1, .cs-hero h1 .cs-grad { font-size: clamp(48px, 8vw, 72px); }
    .cs-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
    .cs-version-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .cs-code-showcase { width: min(calc(100% - 32px), 1024px); }
    .cs-intro-top { grid-template-columns: 1fr; gap: 24px; }
    .cs-intro-bottom { grid-template-columns: 1fr; margin-top: 48px; }
    .cs-intro-side { gap: 24px; }
    .cs-links-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
    html, body { overflow-x: hidden; }
    .cs-top { padding: 8px; }
    .cs-nav { height: 46px; padding: 0 12px; grid-template-columns: auto minmax(0, 1fr) auto; overflow: visible; }
    .cs-nav-links { display: none; }
    .cs-nav-actions .cs-login-link { display: none; }
    .cs-nav-actions .cs-pill { padding: 7px 12px; }
    .cs-nav-toggle {
        display: grid;
        place-items: center;
        width: 30px; height: 30px;
        border: 1px solid var(--border);
        border-radius: 50%;
        background: var(--bg);
        color: var(--fg);
        cursor: pointer;
    }
    .cs-mobile-menu {
        position: absolute;
        top: 54px;
        left: 8px; right: 8px;
        z-index: 200;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3px;
        padding: 7px;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--bg);
        box-shadow: 0 14px 32px rgba(0, 0, 0, .09);
    }
    .cs-mobile-menu a {
        padding: 9px 10px;
        border-radius: 7px;
        color: var(--fg);
        font-size: 12px;
        text-decoration: none;
        text-align: center;
    }
    .cs-mobile-menu a:hover { background: var(--soft); }
    .cs-mobile-menu.cs-hidden { display: none !important; }

    .cs-shell { width: min(calc(100% - 32px), var(--content)); }
    .cs-hero { padding-top: 120px; }
    .cs-hero h1, .cs-hero h1 .cs-grad { font-size: clamp(36px, 10.8vw, 46px); letter-spacing: -.045em; }
    .cs-hero .cs-lead { font-size: 16px; line-height: 24px; }
    .cs-hero .cs-fine { font-size: 12px; line-height: 18px; }
    .cs-stats { gap: 8px; margin-top: 28px; flex-wrap: wrap; height: auto; }
    .cs-stats i { display: none; }
    .cs-partners { margin-top: 28px; height: auto; white-space: normal; line-height: 1.8; }
    .cs-code-showcase { width: calc(100% - 32px); margin-top: 56px; margin-bottom: 72px; }
    .cs-code-bar { height: 34px; }
    .cs-code-title { height: 36px; }
    .cs-code-scroll { height: 280px; }
    .cs-code-cols { grid-template-columns: 1fr; }
    .cs-code-card + .cs-code-card { border-left: 0; border-top: 1px solid #272727; }
    .cs-intro, .cs-try, .cs-versions, .cs-how, .cs-links-section, .cs-faq, .cs-final { padding-top: 72px; padding-bottom: 72px; }
    .cs-try > *, .cs-versions > *, .cs-how > *, .cs-links-section > *, .cs-faq > *, .cs-final > * { width: calc(100% - 32px); }
    .cs-try .cs-upload { height: 220px; min-height: 220px; }
    .cs-try h2, .cs-versions h2, .cs-how h2, .cs-faq h2, .cs-links-section h2 { font-size: 30px; line-height: 36px; }
    .cs-version-grid { grid-template-columns: 1fr; gap: 28px; margin-top: 42px; }
    .cs-version-buttons { gap: 9px; }
    .cs-version-button { height: 40px; font-size: 14px; }
    .cs-features { width: calc(100% - 32px); grid-template-columns: 1fr; padding-top: 72px; padding-bottom: 72px; gap: 32px; }
    .cs-steps { grid-template-columns: 1fr; gap: 18px; margin-top: 55px; }
    .cs-steps:before { display: none; }
    .cs-step-card { min-height: 170px; padding: 50px 20px 22px; }
    .cs-links-grid { grid-template-columns: 1fr; }
    .cs-footer { width: calc(100% - 32px); grid-template-columns: 1fr; gap: 28px; padding-top: 52px; }
    .cs-copyright { display: block; line-height: 2; }
    .cs-copyright div { margin-top: 8px; }
}

/* ==========================================================================
   首页细节修复补丁（追加）
   ========================================================================== */

/* Hero 强制居中 */
.cs-hero { text-align: center; }
.cs-hero h1 { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }
.cs-hero .cs-lead,
.cs-hero .cs-fine { margin-left: auto !important; margin-right: auto !important; text-align: center; }
.cs-hero-cta { justify-content: center; }

/* 隐藏 layui upload 注入的原生文件选择框（含脱离容器的 form） */
#csGotoUpload input[type="file"],
.cs-upload input[type="file"],
body > form.layui-upload-form { display: none !important; }

/* 友情链接 product-card 卡片化（后端 $product 注入的结构） */
.cs-links-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; text-align: left; }
.cs-links-grid .layui-col-md4,
.cs-links-grid .layui-col-sm6 { width: 100%; padding: 0; float: none; }
.cs-links-grid .product-card {
    display: block;
    height: 100%;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cs-links-grid .product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0,0,0,.07); border-color: #c9c9c9; }
.cs-links-grid .product-body { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.cs-links-grid .product-title { font-size: 15px; font-weight: 600; color: var(--fg); text-decoration: none; }
.cs-links-grid .product-title:hover { color: #0b9e79; }
.cs-links-grid .product-desc { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; flex: 1; }
.cs-links-grid .product-body a[target="_blank"] { margin-top: 8px; align-self: flex-start; text-decoration: none; }
.cs-links-grid .product-body .layui-badge-rim,
.cs-links-grid .product-body a[target="_blank"] span {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1px solid #bfead9;
    border-radius: 999px;
    background: #f1fcf8;
    color: #0b9e79;
    font-size: 12px;
    font-weight: 600;
}
@media (max-width:900px) { .cs-links-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width:650px) { .cs-links-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   细节修复（第二轮）：final 居中 + 原生文件框彻底隐藏
   ========================================================================== */

/* 准备开始(final) 强力居中 */
.cs-final, .cs-final * { text-align: center; }
.cs-final h2, .cs-final p { margin-left: auto !important; margin-right: auto !important; text-align: center !important; }
.cs-final > div { display: flex !important; justify-content: center !important; align-items: center !important; gap: 12px; flex-wrap: wrap; }

/* 彻底隐藏 layui upload 注入的原生文件框（插在上传容器外的那份） */
.layui-upload-form { display: none !important; }
#csGotoUpload input[type="file"],
.cs-upload input[type="file"] { display: none !important; }
/* 上传框提示：强调支持 PHP / ZIP */

/* 彻底隐藏 layui upload 运行时注入的原生控件（form/iframe/input） */
.layui-upload-form,
.layui-upload-iframe,
#csGotoUpload form,
#csGotoUpload input[type="file"],
.cs-upload form,
.cs-upload input[type="file"] { display: none !important; }
