/* ===== 官方网站核验平台 - 用户端样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1e3a8a;
    --primary-2: #1d4ed8;
    --primary-light: #eff4ff;
    --success: #15803d;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --text: #1f2937;
    --text-sub: #6b7280;
    --border: #e5e7eb;
    --radius: 14px;
    --shadow: 0 18px 50px rgba(30, 58, 138, 0.10);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #f4f7fd;
    -webkit-font-smoothing: antialiased;
}

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

/* ---------- 背景装饰 ---------- */
.bg-decor { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.halo { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .55; }
.halo-1 {
    width: 460px; height: 460px; left: -140px; top: -160px;
    background: radial-gradient(circle, rgba(59,130,246,.20), rgba(59,130,246,0) 70%);
    animation: float 14s ease-in-out infinite;
}
.halo-2 {
    width: 380px; height: 380px; right: -120px; bottom: -120px;
    background: radial-gradient(circle, rgba(30,58,138,.18), rgba(30,58,138,0) 70%);
    animation: float 18s ease-in-out infinite reverse;
}
.halo-3 {
    width: 200px; height: 200px; right: 18%; top: 12%;
    background: radial-gradient(circle, rgba(96,165,250,.22), rgba(96,165,250,0) 70%);
    animation: float 11s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(24px, 30px) scale(1.08); }
}
.grid-mask {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(30,58,138,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30,58,138,.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}

/* ---------- 顶部 ---------- */
.site-header {
    position: relative; z-index: 2;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1080px; margin: 0 auto;
    height: 62px; padding: 0 24px;
    display: flex; align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { font-size: 18px; font-weight: 700; color: var(--primary); letter-spacing: 1px; }

/* ---------- 核验主体 ---------- */
.check-page { display: flex; flex-direction: column; min-height: 100vh; }
.check-main {
    position: relative; z-index: 1;
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 30px 20px 20px;
}
.check-card {
    width: 100%; max-width: 720px;
    background: #fff;
    border: 1px solid rgba(30,58,138,.08);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 44px 48px 38px;
}
.check-head { text-align: center; margin-bottom: 28px; }
.check-badge {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    box-shadow: 0 10px 22px rgba(29,78,216,.32);
}
.check-head h1 { font-size: 27px; color: var(--primary); letter-spacing: 2px; font-weight: 700; }
.check-head p { margin-top: 8px; color: var(--text-sub); font-size: 14px; }

/* ---------- 输入区 ---------- */
.check-form { margin-top: 4px; }
.input-wrap {
    display: flex; align-items: center;
    border: 2px solid #dbe4f5;
    border-radius: 12px;
    background: #fbfdff;
    padding: 6px 6px 6px 16px;
    transition: border-color .2s, box-shadow .2s;
}
.input-wrap:focus-within {
    border-color: var(--primary-2);
    box-shadow: 0 0 0 4px rgba(29,78,216,.10);
    background: #fff;
}
.input-icon { color: #94a3b8; flex-shrink: 0; }
.input-wrap input {
    flex: 1; border: none; outline: none; background: transparent;
    height: 46px; font-size: 15px; padding: 0 12px; color: var(--text);
}
.input-wrap input::placeholder { color: #9aa6b8; }

.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; cursor: pointer;
    height: 46px; padding: 0 26px;
    border-radius: 9px;
    font-size: 15px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    box-shadow: 0 8px 18px rgba(29,78,216,.28);
    transition: transform .12s, box-shadow .12s, opacity .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(29,78,216,.34); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.btn-inline { display: inline-flex; text-decoration: none; }
.input-tip { margin-top: 10px; text-align: center; font-size: 12.5px; color: #9aa6b8; }

/* ---------- 结果区 ---------- */
.result-box { margin-top: 26px; animation: fadeUp .35s ease; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.result-valid, .result-invalid {
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex; gap: 16px; align-items: flex-start;
}
.result-valid {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}
.result-invalid {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
}
.result-icon {
    width: 44px; height: 44px; border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.result-valid .result-icon { background: var(--success); box-shadow: 0 6px 14px rgba(21,128,61,.3); }
.result-invalid .result-icon { background: var(--danger); box-shadow: 0 6px 14px rgba(185,28,28,.3); }
.result-main { flex: 1; min-width: 0; }
.result-main h2 { font-size: 17px; margin-bottom: 6px; }
.result-valid h2 { color: var(--success); }
.result-invalid h2 { color: var(--danger); }
.result-main p { font-size: 13.5px; color: var(--text-sub); line-height: 1.7; }
.result-meta {
    margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 18px;
    font-size: 13px; color: var(--text);
}
.result-meta b { color: var(--text-sub); font-weight: 400; margin-right: 4px; }
.result-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-cert {
    height: 38px; padding: 0 18px;
    border-radius: 8px; font-size: 13.5px; font-weight: 600;
    background: var(--success); color: #fff;
    display: inline-flex; align-items: center;
    box-shadow: 0 6px 14px rgba(21,128,61,.25);
}
.btn-cert:hover { opacity: .92; }
.btn-recheck {
    height: 38px; padding: 0 18px;
    border-radius: 8px; font-size: 13.5px;
    border: 1px solid #cbd5e1; color: var(--text); background: #fff;
    display: inline-flex; align-items: center;
}
.btn-recheck:hover { border-color: var(--primary-2); color: var(--primary-2); }

.site-footer {
    margin-top: 22px;
    font-size: 12.5px; color: #9aa6b8;
    text-align: center;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed; top: 26px; left: 50%; transform: translateX(-50%);
    z-index: 99;
    background: #fff;
    color: var(--text);
    border-left: 4px solid #eab308;
    border-radius: 8px;
    padding: 11px 20px;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    animation: toastIn .25s ease;
}
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===================== 证书页 ===================== */
.cert-page { background: #eef2f9; }
.cert-toolbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.toolbar-inner {
    max-width: 980px; margin: 0 auto;
    height: 60px; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.btn-ghost {
    display: inline-flex; align-items: center; gap: 4px;
    height: 38px; padding: 0 16px;
    border: 1px solid #cbd5e1; border-radius: 8px;
    color: var(--text); font-size: 14px; background: #fff;
}
.btn-ghost:hover { border-color: var(--primary-2); color: var(--primary-2); }
.btn-download { height: 40px; padding: 0 20px; }

.cert-main {
    max-width: 980px; margin: 0 auto;
    padding: 34px 20px 46px;
}
.cert-paper {
    position: relative;
    background: #fff;
    border: 8px solid var(--primary);
    outline: 1px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
    padding: 54px 64px 40px;
    box-shadow: 0 24px 60px rgba(30,58,138,.18);
}
.corner {
    position: absolute; width: 26px; height: 26px;
    border-color: var(--primary-2); border-style: solid;
}
.corner-lt { top: 14px; left: 14px; border-width: 2px 0 0 2px; }
.corner-rt { top: 14px; right: 14px; border-width: 2px 2px 0 0; }
.corner-lb { bottom: 14px; left: 14px; border-width: 0 0 2px 2px; }
.corner-rb { bottom: 14px; right: 14px; border-width: 0 2px 2px 0; }

.cert-header { text-align: center; }
.cert-org { font-size: 15px; color: var(--text-sub); letter-spacing: 3px; }
.cert-title {
    margin-top: 10px;
    font-size: 38px; font-weight: 800;
    color: var(--primary);
    letter-spacing: 8px;
}
.cert-subtitle {
    margin-top: 6px;
    font-size: 12px; color: #94a3b8; letter-spacing: 3px;
}
.cert-title-line {
    margin: 18px auto 0;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 60%;
}
.cert-title-line i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #c7d5ee, transparent); }
.cert-diamond { color: var(--primary-2); font-size: 10px; }

.cert-statement {
    margin: 26px auto 0;
    max-width: 760px;
    text-align: center;
    font-size: 14.5px; line-height: 1.9; color: #374151;
    text-indent: 2em;
}

.cert-body { margin-top: 26px; }
.cert-logo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.cert-logo {
    width: 64px; height: 64px;
    border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cert-logo img { max-width: 100%; max-height: 100%; }
.cert-logo span {
    font-size: 26px; font-weight: 700; color: var(--primary);
}
.cert-org-name { font-size: 22px; font-weight: 700; color: var(--text); }

.cert-info { width: 100%; border-collapse: collapse; }
.cert-info th, .cert-info td {
    border: 1px solid #d7e0ee;
    padding: 11px 14px;
    font-size: 14px; line-height: 1.5;
    text-align: left;
    word-break: break-all;
}
.cert-info th {
    width: 110px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}
.cert-info td:nth-of-type(2) { width: 34%; }
.cert-url { color: var(--primary-2); font-weight: 700; font-size: 15px; }
.cert-no { font-family: Consolas, Monaco, monospace; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.cert-slash { color: #cbd5e1; margin: 0 8px; }
.cert-pass-tag {
    display: inline-block;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 13px; font-weight: 600;
}

.cert-footer-block {
    margin-top: 30px;
    display: flex; justify-content: flex-end;
}
.cert-seal-wrap {
    position: relative;
    width: 230px; height: 170px;
    display: flex; align-items: flex-end; justify-content: center;
}
.cert-seal {
    position: absolute; right: 18px; top: -6px;
    transform: rotate(0deg);
    opacity: .92;
}
.cert-sign { text-align: center; padding-bottom: 6px; }
.cert-sign-org { font-size: 15px; font-weight: 700; color: #374151; letter-spacing: 2px; }
.cert-sign-date { margin-top: 4px; font-size: 13.5px; color: #6b7280; }

.cert-remark {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed #d7e0ee;
    font-size: 12.5px; color: #94a3b8; line-height: 1.8;
    text-align: center;
}
.cert-tip { text-align: center; margin-top: 18px; font-size: 12.5px; color: #94a3b8; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
    .check-card { padding: 32px 22px; }
    .check-head h1 { font-size: 22px; letter-spacing: 1px; }
    .input-wrap { flex-wrap: wrap; padding: 10px; }
    .input-wrap input { width: 100%; height: 40px; }
    .input-wrap .btn-primary { width: 100%; height: 42px; margin-top: 6px; }
    .cert-paper { padding: 36px 22px 28px; border-width: 5px; }
    .cert-title { font-size: 27px; letter-spacing: 3px; }
    .cert-info th { width: 86px; }
    .cert-footer-block { justify-content: center; }
}

/* ---------- 核验成功：证书弹窗 ---------- */
.cert-modal-mask {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center;
    padding: 30px 22px;
    animation: cmFade .2s ease;
}
.cert-modal {
    background: #f5f8fd;
    width: 100%; max-width: 1020px; height: 100%;
    border-radius: 12px; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .4);
    animation: cmPop .22s ease;
}
.cert-modal-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 13px 20px;
    background: #fff; border-bottom: 1px solid #e6ecf5;
}
.cert-modal-title { font-size: 15px; font-weight: 700; color: #1e3a8a; white-space: nowrap; }
.cert-modal-ops { display: flex; align-items: center; gap: 10px; }
.cm-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 34px; padding: 0 16px; border: none; border-radius: 7px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
}
.cm-btn:disabled { opacity: .6; cursor: default; }
.cm-btn-primary { background: var(--primary); color: #fff; }
.cm-btn-primary:hover { background: #1c3f94; }
.cm-btn-ghost { background: #eef2f9; color: #3b5578; }
.cm-btn-ghost:hover { background: #e2e9f5; }
.cm-close { width: 34px; padding: 0; background: transparent; color: #8492ab; }
.cm-close:hover { background: #f1f4f9; color: #4b5b78; }
.cert-modal-body { flex: 1; overflow: auto; padding: 28px 26px; }
.cert-modal-body .cert-paper { margin: 0 auto; }
@keyframes cmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
    .cert-modal-mask { padding: 0; }
    .cert-modal { border-radius: 0; max-width: none; }
    .cert-modal-title { display: none; }
    .cert-modal-body { padding: 18px 12px; }
    .cm-btn { padding: 0 12px; }
}
