﻿/* ============ FieldDoc 宣传站主题 ============ */
:root {
    --fd-primary: #2563eb;
    --fd-primary-dark: #1d4ed8;
    --fd-accent: #22d3ee;
    --fd-dark: #0b1220;
    --fd-dark-2: #111c33;
    --fd-text: #1e293b;
    --fd-muted: #64748b;
    --fd-bg: #f6f8fc;
    --fd-card-shadow: 0 10px 30px rgba(15, 40, 90, .08);
    --fd-card-shadow-hover: 0 16px 40px rgba(15, 40, 90, .16);
    --fd-radius: 16px;
}

html { scroll-behavior: smooth; }

body {
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
    color: var(--fd-text);
    background: var(--fd-bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: .2px; }
a { text-decoration: none; }

/* ---------- 导航 ---------- */
.fd-nav {
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 40, 90, .08);
}
.fd-nav .navbar-brand { font-weight: 800; color: var(--fd-dark); }
.fd-nav .navbar-brand .brand-dot { color: var(--fd-primary); }
.fd-nav .nav-link {
    color: var(--fd-text);
    font-weight: 600;
    margin: 0 .25rem;
    padding: .45rem .9rem !important;
    border-radius: 10px;
    transition: all .18s ease;
}
.fd-nav .nav-link:hover, .fd-nav .nav-link.active { color: var(--fd-primary); background: rgba(37, 99, 235, .08); }
.fd-nav .nav-user { font-weight: 600; color: var(--fd-text); }

/* ---------- 按钮 ---------- */
.btn-fd {
    background: linear-gradient(135deg, var(--fd-primary), #4f8bff);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: .65rem 1.4rem;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
    transition: all .2s ease;
}
.btn-fd:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 99, 235, .38); }
.btn-fd-lg { padding: .85rem 2rem; font-size: 1.05rem; border-radius: 14px; }
.btn-fd-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .55);
    border-radius: 12px;
    padding: .65rem 1.4rem;
    font-weight: 600;
    transition: all .2s ease;
}
.btn-fd-outline:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .1); transform: translateY(-2px); }
.btn-fd-ghost {
    background: transparent;
    color: var(--fd-primary);
    border: 1.5px solid rgba(37, 99, 235, .35);
    border-radius: 12px;
    padding: .65rem 1.4rem;
    font-weight: 600;
    transition: all .2s ease;
}
.btn-fd-ghost:hover { color: var(--fd-primary); border-color: var(--fd-primary); background: rgba(37, 99, 235, .05); }

/* ---------- Hero ---------- */
.fd-hero {
    position: relative;
    background: radial-gradient(1000px 500px at 80% -10%, rgba(34, 211, 238, .18), transparent 60%),
                radial-gradient(800px 420px at 10% 110%, rgba(37, 99, 235, .28), transparent 60%),
                linear-gradient(160deg, var(--fd-dark) 0%, var(--fd-dark-2) 55%, #0f1d3a 100%);
    color: #e8eefc;
    overflow: hidden;
    padding: 96px 0 80px;
}
.fd-hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(700px 420px at 50% 30%, #000 20%, transparent 75%);
}
.fd-hero .container { position: relative; z-index: 1; }
.fd-hero-badge {
    display: inline-flex; align-items: center; gap: .45rem;
    background: rgba(34, 211, 238, .12);
    border: 1px solid rgba(34, 211, 238, .35);
    color: #7de8f7;
    padding: .35rem 1rem; border-radius: 999px;
    font-size: .85rem; font-weight: 600;
}
.fd-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 800; line-height: 1.18; color: #fff; }
.fd-hero h1 .grad {
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fd-hero-lead { color: #9fb2d9; font-size: 1.08rem; max-width: 560px; line-height: 1.8; }

.fd-hero-mock {
    background: linear-gradient(165deg, #14213d, #0e1730);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
    padding: 18px;
}
.fd-mock-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.fd-mock-bar span { width: 11px; height: 11px; border-radius: 50%; }
.fd-mock-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.fd-mock-table th { color: #7d92bd; text-align: left; padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 600; }
.fd-mock-table td { color: #c6d4f0; padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.06); }
.fd-mock-table .pk { color: #fbbf24; font-weight: 700; }

/* ---------- 徽章（数据库） ---------- */
.fd-db-badges { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.fd-db-badge {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #c9d7f4;
    padding: .4rem 1.05rem; border-radius: 999px;
    font-size: .88rem; font-weight: 600;
}
.fd-db-badge .ico { color: var(--fd-accent); margin-right: .3rem; }

/* ---------- 区块 ---------- */
.fd-section { padding: 84px 0; }
.fd-section-alt { background: #fff; border-top: 1px solid rgba(15, 40, 90, .06); border-bottom: 1px solid rgba(15, 40, 90, .06); }
.fd-eyebrow {
    color: var(--fd-primary); font-weight: 700; font-size: .85rem;
    text-transform: uppercase; letter-spacing: 1.5px;
}
.fd-title { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; color: var(--fd-dark); }
.fd-sub { color: var(--fd-muted); font-size: 1.02rem; max-width: 620px; margin: 1rem auto 0; }

/* ---------- 特性卡片 ---------- */
.fd-card {
    background: #fff;
    border: 1px solid rgba(15, 40, 90, .07);
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-card-shadow);
    padding: 1.7rem 1.5rem;
    height: 100%;
    transition: all .22s ease;
}
.fd-card:hover { transform: translateY(-6px); box-shadow: var(--fd-card-shadow-hover); }
.fd-card-icon {
    width: 54px; height: 54px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(34,211,238,.14));
    color: var(--fd-primary); font-size: 1.5rem; font-weight: 800;
    margin-bottom: 1.1rem;
}
.fd-card h5 { font-weight: 700; color: var(--fd-dark); margin-bottom: .5rem; }
.fd-card p { color: var(--fd-muted); font-size: .94rem; line-height: 1.7; margin: 0; }

/* ---------- 步骤 ---------- */
.fd-step { position: relative; text-align: center; padding: 0 12px; }
.fd-step-num {
    width: 62px; height: 62px; margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fd-primary), var(--fd-accent));
    color: #fff; font-weight: 800; font-size: 1.35rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .32);
}
.fd-step h5 { font-weight: 700; color: var(--fd-dark); }
.fd-step p { color: var(--fd-muted); font-size: .92rem; line-height: 1.7; }

/* ---------- 价格卡 ---------- */
.fd-price {
    background: #fff;
    border: 1px solid rgba(15, 40, 90, .07);
    border-radius: 20px;
    box-shadow: var(--fd-card-shadow);
    padding: 2.2rem 1.8rem;
    height: 100%;
    position: relative;
    transition: all .22s ease;
    display: flex; flex-direction: column;
}
.fd-price:hover { transform: translateY(-6px); box-shadow: var(--fd-card-shadow-hover); }
.fd-price-featured {
    border: 2px solid var(--fd-primary);
    box-shadow: 0 18px 50px rgba(37, 99, 235, .22);
}
.fd-price-tag {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--fd-primary), var(--fd-accent));
    color: #fff; font-size: .78rem; font-weight: 700;
    padding: .28rem 1rem; border-radius: 999px;
    white-space: nowrap;
}
.fd-price h5 { color: var(--fd-muted); font-weight: 700; }
.fd-trial-tag {
    display: inline-block; margin: .55rem 0 .15rem;
    background: linear-gradient(135deg, var(--fd-primary), var(--fd-accent));
    color: #fff; font-size: .8rem; font-weight: 700;
    padding: .3rem .9rem; border-radius: 999px;
    white-space: nowrap;
}
.fd-price .amount { font-size: 2.4rem; font-weight: 800; color: var(--fd-dark); line-height: 1.1; }
.fd-price .amount small { font-size: 1rem; font-weight: 600; color: var(--fd-muted); }
.fd-price ul { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; flex: 1; }
.fd-price ul li {
    color: var(--fd-text); font-size: .92rem; padding: .42rem 0 .42rem 1.7rem;
    position: relative; line-height: 1.55;
}
.fd-price ul li::before {
    content: "✓";
    position: absolute; left: 0; top: .42rem;
    color: #16a34a; font-weight: 800;
}
.fd-price ul li.muted { color: #a5b0c1; }
.fd-price ul li.muted::before { content: "–"; color: #c3ccdb; }

/* ---------- CTA ---------- */
.fd-cta {
    background: linear-gradient(135deg, var(--fd-primary), #0ea5e9);
    border-radius: 24px;
    color: #fff;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}
.fd-cta::before {
    content: "";
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 34px 34px;
}
.fd-cta > * { position: relative; z-index: 1; }
.fd-cta h2 { font-weight: 800; }
.fd-cta p { opacity: .9; }

/* ---------- 下载页 ---------- */
.fd-download-card {
    background: #fff; border-radius: 20px;
    border: 1px solid rgba(15, 40, 90, .07);
    box-shadow: var(--fd-card-shadow);
    padding: 2.2rem;
}
.fd-download-icon {
    width: 84px; height: 84px; border-radius: 22px;
    background: linear-gradient(135deg, var(--fd-primary), var(--fd-accent));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .35);
}
.fd-spec-table { width: 100%; font-size: .94rem; }
.fd-spec-table td { padding: .75rem .5rem; border-bottom: 1px solid rgba(15,40,90,.07); }
.fd-spec-table td:first-child { color: var(--fd-muted); width: 130px; font-weight: 600; }

/* ---------- 购买页 ---------- */
.fd-service-card {
    background: #fff; border-radius: 18px;
    border: 1px solid rgba(15, 40, 90, .07);
    box-shadow: var(--fd-card-shadow);
    padding: 1.8rem; height: 100%;
    text-align: center;
}
.fd-service-icon {
    width: 66px; height: 66px; margin: 0 auto 1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(34,211,238,.14));
    color: var(--fd-primary); font-size: 1.7rem;
}
.fd-qr {
    width: 168px; height: 168px; margin: 1rem auto 0;
    border-radius: 12px; border: 1px solid rgba(37,99,235,.15);
    background: #fff; padding: 8px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.fd-qr img {
    width: 100%; height: 100%; object-fit: contain; border-radius: 6px; display: block;
}
.fd-steps-num {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--fd-primary), var(--fd-accent));
    color: #fff; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

/* ---------- 表单（注册/登录） ---------- */
.fd-auth-wrap { min-height: calc(100vh - 130px); display: flex; align-items: center; padding: 48px 0; }
.fd-auth-card {
    background: #fff; border-radius: 22px;
    border: 1px solid rgba(15, 40, 90, .07);
    box-shadow: var(--fd-card-shadow);
    padding: 2.4rem 2.2rem;
    width: 100%; max-width: 440px; margin: 0 auto;
}
.fd-auth-card .form-control {
    border-radius: 11px; padding: .68rem .95rem;
    border: 1.5px solid #dfe6f2;
}
.fd-auth-card .form-control:focus {
    border-color: var(--fd-primary);
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}
.fd-auth-card .text-danger { font-size: .85rem; }
.fd-auth-card label { font-weight: 600; font-size: .9rem; color: var(--fd-text); }

/* ---------- 页脚 ---------- */
.fd-footer { background: var(--fd-dark); color: #93a5c8; padding: 44px 0 26px; margin-top: 0; }
.fd-footer h6 { color: #e6edfb; font-weight: 700; margin-bottom: .9rem; }
.fd-footer a { color: #93a5c8; display: block; padding: .22rem 0; font-size: .92rem; transition: color .15s; }
.fd-footer a:hover { color: var(--fd-accent); }
.fd-footer .fd-footer-brand { font-weight: 800; color: #fff; font-size: 1.15rem; }
.fd-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; }

/* ---------- 通用工具 ---------- */
.fd-alert {
    border-radius: 12px; padding: .8rem 1rem; font-size: .9rem;
    border: 1px solid transparent;
}
.fd-alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.fd-alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

@media (max-width: 768px) {
    .fd-hero { padding: 56px 0 56px; }
    .fd-section { padding: 56px 0; }
    .fd-auth-wrap { min-height: auto; padding: 32px 0; }
}

/* ============ 产品中心（Hub） ============ */
.fd-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.5rem;
}
.fd-product-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 40, 90, .07);
    border-radius: 20px;
    box-shadow: var(--fd-card-shadow);
    padding: 1.8rem 1.6rem 1.5rem;
    transition: all .22s ease;
    display: flex;
    flex-direction: column;
}
.fd-product-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--p-accent, var(--fd-primary)), var(--p-accent2, var(--fd-accent)));
}
.fd-product-card:hover { transform: translateY(-6px); box-shadow: var(--fd-card-shadow-hover); }
.fd-product-card.coming { border-style: dashed; background: rgba(255,255,255,.6); }
.fd-product-card.coming::before { background: linear-gradient(90deg, #94a3b8, #c3ccdb); }
.fd-product-logo {
    width: 56px; height: 56px; border-radius: 16px; flex: 0 0 56px;
    color: #fff; font-weight: 800; font-size: 1.15rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--p-accent, var(--fd-primary)), var(--p-accent2, var(--fd-accent)));
    box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
}
.fd-product-version {
    display: inline-block; margin-top: 4px;
    font-size: .75rem; font-weight: 600; color: #7d92bd;
    background: rgba(37, 99, 235, .08); border-radius: 999px; padding: .12rem .6rem;
}
.fd-product-tagline { font-weight: 700; color: var(--fd-dark); font-size: 1.05rem; margin: .35rem 0 .45rem; }
.fd-product-desc { color: var(--fd-muted); font-size: .93rem; line-height: 1.75; }
.fd-chip {
    display: inline-block;
    background: rgba(15, 40, 90, .05);
    color: #475569; font-size: .8rem; font-weight: 600;
    padding: .22rem .7rem; border-radius: 999px;
    border: 1px solid rgba(15, 40, 90, .08);
}
.fd-dd-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .5rem; vertical-align: 1px; }
.fd-nav .dropdown-menu { border: 1px solid rgba(15, 40, 90, .08); border-radius: 14px; padding: .5rem; }
.fd-nav .dropdown-menu .dropdown-item { border-radius: 9px; font-weight: 600; padding: .5rem .8rem; }
.fd-nav .dropdown-menu .dropdown-item:hover { background: rgba(37, 99, 235, .07); color: var(--fd-primary); }
.fd-nav .dropdown-menu .dropdown-item.active { background: rgba(37, 99, 235, .08); color: var(--fd-primary); }

/* ---------- Hub 货架 mock ---------- */
.fd-hub-mock {
    background: linear-gradient(165deg, #14213d, #0e1730);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
    padding: 18px;
}
.fd-hub-mock-head {
    display: flex; justify-content: space-between; align-items: center;
    color: #7d92bd; font-size: .82rem; font-weight: 600; letter-spacing: .5px;
    padding: 2px 4px 12px;
}
.fd-hub-mock-live { color: #34d399; font-size: .72rem; }
.fd-hub-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: all .18s ease;
}
.fd-hub-item:hover { background: rgba(255, 255, 255, .1); transform: translateX(3px); border-color: var(--p-accent, rgba(255,255,255,.25)); }
.fd-hub-item-logo {
    width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px;
    color: #fff; font-weight: 800; font-size: .95rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--p-accent, #2563eb), var(--p-accent2, #0ea5e9));
}
.fd-hub-item-body { display: flex; flex-direction: column; flex: 1; }
.fd-hub-item-body strong { color: #e8eefc; font-size: .98rem; }
.fd-hub-item-body small { color: #7d92bd; font-size: .8rem; margin-top: 1px; }
.fd-hub-item-go { color: #22d3ee; font-weight: 800; }
.fd-hub-item-coming { opacity: .75; cursor: default; }
.fd-hub-item-coming .fd-hub-item-logo { background: linear-gradient(135deg, #64748b, #94a3b8); }

/* ---------- 产品子导航 ---------- */
.fd-subnav {
    background: #fff;
    border-bottom: 1px solid rgba(15, 40, 90, .07);
}
.fd-subnav .container { display: flex; align-items: center; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; gap: .2rem; }
.fd-subnav a {
    font-weight: 600; color: var(--fd-muted); font-size: .92rem;
    padding: .42rem .85rem; border-radius: 10px;
    transition: all .15s ease;
}
.fd-subnav a:hover { color: var(--fd-primary); background: rgba(37, 99, 235, .06); }
.fd-subnav a.active { color: var(--fd-primary); background: rgba(37, 99, 235, .09); }
.fd-subnav .fd-subnav-brand { font-weight: 800; font-size: 1.02rem; margin-right: .5rem; }
.fd-subnav .fd-subnav-brand:hover { background: transparent; }

/* ---------- SchemaDiff 比对 mock ---------- */
.fd-diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fd-diff-panel {
    background: #0e1730;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: .72rem;
}
.fd-diff-title { color: #7d92bd; font-weight: 600; margin-bottom: 6px; font-size: .75rem; }
.fd-diff-row { color: #c6d4f0; padding: 3px 6px; border-radius: 6px; margin: 1px 0; font-family: Consolas, Menlo, monospace; }
.fd-diff-row.add { background: rgba(34, 197, 94, .14); color: #86efac; }
.fd-diff-row.del { background: rgba(239, 68, 68, .14); color: #fca5a5; }
.fd-diff-row.mod { background: rgba(250, 204, 21, .14); color: #fde047; }
.fd-diff-arrow { text-align: center; color: #22d3ee; font-size: .75rem; font-weight: 600; margin: 8px 0 4px; }
.fd-sql-box {
    margin-top: 8px;
    background: #0a0f1e;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    padding: 9px 12px;
    font-family: Consolas, Menlo, monospace;
    font-size: .68rem;
    line-height: 1.7;
}
.fd-sql-box .s-add { color: #86efac; }
.fd-sql-box .s-del { color: #fca5a5; }
