/*
 * Copyright (c) 2016-2026 山东魔豆网络科技有限公司
 * 本代码归属山东魔豆网络科技有限公司，未经书面许可禁止复制、分发、商用
 */

:root {
    --brand: #2f6fed;
    --brand-soft: #2f6fed14;
    --brand-line: #2f6fed33;
    --ink: #16213a;
    --ink-2: #46536b;
    --muted: #8a94a6;
    --line: #e6eaf2;
    --bg: #f5f7fb;
    --card: #ffffff;
    --success: #0f9d6c;
    --danger: #d92d20;
    --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "ModouSourceHan", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

.ico { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }
.ico-sm { width: 15px; height: 15px; vertical-align: -2px; }

.pub-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶栏 ---------- */
.pub-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.pub-header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.pub-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.pub-brand:hover { color: var(--ink); }
.brand-orb {
    width: 40px; height: 40px; flex: 0 0 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #7aa2ff);
    color: #fff; font-weight: 800; font-size: 19px;
    display: grid; place-items: center;
    box-shadow: 0 8px 20px var(--brand-line);
    overflow: hidden;
}
.brand-orb img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { line-height: 1.25; }
.brand-title { font-size: 15px; font-weight: 700; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.pub-header-spacer { flex: 1; }
.pub-nav { display: flex; align-items: center; gap: 6px; }
.pub-nav a {
    font-size: 13px; color: var(--ink-2);
    padding: 7px 12px; border-radius: 9px;
}
.pub-nav a:hover { background: var(--brand-soft); color: var(--brand); }
.pub-nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* ---------- 通用按钮 ---------- */
.pub-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 42px; padding: 0 20px; border-radius: 10px;
    border: 1px solid transparent; background: #eef1f6; color: var(--ink-2);
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: filter .15s, background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.pub-btn:hover { filter: brightness(.97); }
.pub-btn.primary {
    background: var(--brand); color: #fff;
    box-shadow: 0 10px 24px var(--brand-line);
}
.pub-btn.primary:hover { filter: brightness(.94); }
.pub-btn.ghost {
    background: #fff; border-color: var(--line); color: var(--ink-2);
}
.pub-btn.ghost:hover { border-color: var(--brand-line); color: var(--brand); }

/* ---------- 主区域 ---------- */
.pub-main { min-height: 60vh; }

/* ---------- 首页 Hero ---------- */
.hero {
    padding: 62px 0 46px;
    background:
        radial-gradient(900px 460px at 12% -18%, var(--brand-soft), transparent 72%),
        radial-gradient(700px 380px at 100% 4%, #ffffff, transparent 65%),
        linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--line);
}
.hero-card { max-width: 880px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11.5px; letter-spacing: .16em; font-weight: 700;
    color: var(--brand); background: var(--brand-soft);
    border: 1px solid var(--brand-line);
    padding: 6px 14px; border-radius: 999px;
}
.hero h1 {
    font-size: 40px; line-height: 1.18; letter-spacing: -.02em;
    margin: 20px 0 12px; font-weight: 800;
}
.hero-sub { color: var(--ink-2); font-size: 15px; margin: 0 auto; max-width: 640px; }

.verify-form { margin: 30px auto 0; text-align: left; }
.vf-row {
    display: flex; gap: 12px; align-items: flex-end;
    background: #fff; border: 1px solid var(--line);
    border-radius: 16px; padding: 16px;
    box-shadow: 0 18px 44px rgba(22, 33, 58, .08);
}
.vf-field { flex: 1; min-width: 0; }
.vf-field label {
    display: block; font-size: 12px; font-weight: 600; color: var(--ink-2);
    margin-bottom: 6px; padding-left: 2px;
}
.vf-field label span { color: var(--muted); font-weight: 400; margin-left: 5px; font-size: 11px; }
.pub-input {
    width: 100%; height: 44px; padding: 0 14px;
    border: 1px solid #dfe4ee; border-radius: 10px;
    background: #fbfcfe; color: var(--ink);
    font-family: inherit; font-size: 14px; outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.pub-input:focus {
    border-color: var(--brand); background: #fff;
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.vf-row .pub-btn { flex: 0 0 auto; height: 44px; }
.verify-tip {
    margin-top: 16px; font-size: 12.5px; color: var(--muted);
    display: flex; align-items: center; gap: 6px; justify-content: center;
}

.pub-alert {
    display: flex; align-items: center; gap: 9px;
    margin: 24px auto 0; max-width: 720px; text-align: left;
    padding: 12px 16px; border-radius: 12px; font-size: 13.5px;
}
.pub-alert.error { background: #fef2f2; border: 1px solid #fecaca; color: #b42318; }
.pub-alert.success { background: #ecfdf5; border: 1px solid #bbf0d8; color: #057a55; }

/* ---------- 数据条 ---------- */
.stat-row {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px; margin: -28px auto 0; position: relative; z-index: 5;
    max-width: 880px;
}
.stat-item {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 18px 20px; box-shadow: 0 10px 26px rgba(22, 33, 58, .05);
    text-align: center;
}
.stat-num { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat-text { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- 使用步骤 ---------- */
.section { padding: 54px 0; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: 23px; margin: 0 0 8px; letter-spacing: -.01em; }
.section-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 24px 22px; position: relative;
}
.step-no {
    width: 30px; height: 30px; border-radius: 9px;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-weight: 800; font-size: 14px;
    margin-bottom: 12px;
}
.step h3 { font-size: 15px; margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* ---------- 面包屑 ---------- */
.crumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; color: var(--muted);
    padding: 22px 0 0;
}
.crumb a { color: var(--ink-2); }
.crumb a:hover { color: var(--brand); }
.crumb span.sep { color: #c6ccda; }

/* ---------- 验真结果 ---------- */
.cert-page { padding: 0 0 60px; }
.verify-banner {
    display: flex; align-items: flex-start; gap: 14px;
    margin: 18px 0 22px; padding: 18px 22px;
    border-radius: 16px; border: 1px solid;
}
.verify-banner .vb-icon {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px;
    display: grid; place-items: center;
}
.verify-banner.good { background: #f0fbf6; border-color: #bbf0d8; }
.verify-banner.good .vb-icon { background: #d9f7e9; color: var(--success); }
.verify-banner.good .vb-icon svg { width: 22px; height: 22px; }
.verify-banner.bad { background: #fff5f5; border-color: #fecaca; }
.verify-banner.bad .vb-icon { background: #ffe4e4; color: var(--danger); }
.verify-banner .vb-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.verify-banner.good .vb-title { color: #057a55; }
.verify-banner.bad .vb-title { color: #b42318; }
.verify-banner .vb-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

.cert-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 22px;
    align-items: start;
}
.cert-main { min-width: 0; }
.cert-frame {
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 14px; box-shadow: 0 14px 34px rgba(22, 33, 58, .06);
    overflow: hidden;
}
.cert-host { position: relative; overflow: hidden; border-radius: 10px; background: #fbfcfe; }
.cert-host .cert-stage { box-shadow: none; }

.cert-actions {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.cert-actions .pub-btn { height: 40px; }

.side-card {
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 20px; margin-bottom: 16px;
    box-shadow: 0 10px 26px rgba(22, 33, 58, .04);
}
.side-card h3 {
    font-size: 14px; margin: 0 0 14px; padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 7px;
}
.info-row {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 8px 0; border-bottom: 1px dashed #edf0f6;
    font-size: 13px;
}
.info-row:last-child { border-bottom: 0; }
.info-row .label { color: var(--muted); flex: 0 0 auto; }
.info-row .value { color: var(--ink); font-weight: 600; text-align: right; word-break: break-all; }
.info-row .value.valid { color: var(--success); }
.info-row .value.revoked { color: var(--danger); }
.info-row .value img {
    max-width: 84px; max-height: 60px; border-radius: 6px;
    border: 1px solid var(--line); display: block; margin-left: auto;
}

.qr-card { text-align: center; }
.qr-card img {
    width: 168px; height: 168px; border-radius: 10px;
    border: 1px solid var(--line); padding: 6px; background: #fff;
}
.qr-card .qr-tip { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.code-line {
    display: flex; gap: 8px; margin-top: 14px; text-align: left;
}
.code-line .pub-input { height: 38px; font-size: 12.5px; }
.code-line .pub-btn { height: 38px; padding: 0 12px; font-size: 12.5px; }

/* ---------- 页脚 ---------- */
.pub-footer {
    border-top: 1px solid var(--line);
    background: #fff;
    padding: 28px 0 34px;
}
.pub-footer-inner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    font-size: 12.5px; color: var(--muted);
}
.pub-footer-inner .sep { color: #d8dde7; }
.pub-footer-inner .grow { flex: 1; min-width: 12px; }
.pub-footer a { color: var(--ink-2); }
.pub-footer a:hover { color: var(--brand); }

/* ---------- Toast ---------- */
.toast-wrap {
    position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}
.toast {
    background: rgba(22, 33, 58, .93); color: #fff;
    padding: 10px 18px; border-radius: 10px; font-size: 13px;
    box-shadow: 0 12px 30px rgba(22, 33, 58, .22);
    animation: toastIn .22s ease both;
}
.toast.error { background: rgba(185, 28, 28, .95); }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(6px); } }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .cert-layout { grid-template-columns: minmax(0, 1fr); }
    .hero h1 { font-size: 32px; }
    .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .pub-container { padding: 0 16px; }
    .pub-nav { display: none; }
    .hero { padding: 40px 0 34px; }
    .hero h1 { font-size: 27px; }
    .hero-sub { font-size: 13.5px; }
    .vf-row { flex-direction: column; align-items: stretch; padding: 14px; }
    .vf-row .pub-btn { width: 100%; }
    .stat-row { grid-template-columns: 1fr; margin-top: 18px; gap: 10px; }
    .stat-item { display: flex; align-items: baseline; justify-content: space-between; text-align: left; padding: 14px 16px; }
    .stat-num { font-size: 19px; }
    .steps { grid-template-columns: 1fr; }
    .section { padding: 38px 0; }
    .verify-banner { padding: 15px 16px; }
    .verify-banner .vb-title { font-size: 16px; }
    .cert-frame { padding: 8px; }
}
