/* ===== 公开站点样式（响应式，与后台样式隔离） ===== */
:root {
    --p-bg: #f5f7fa;
    --p-card: #ffffff;
    --p-text: #1e293b;
    --p-muted: #64748b;
    --p-border: #e2e8f0;
    --p-primary: #2563eb;
    --p-primary-dark: #1d4ed8;
    --p-radius: 10px;
    --p-shadow: 0 1px 3px rgba(0,0,0,.06);
    --p-shadow-hover: 0 6px 20px rgba(0,0,0,.10);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--p-bg);
    color: var(--p-text);
    line-height: 1.6;
}
a { color: var(--p-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
mark.hl { background: #fef08a; color: inherit; padding: 0 2px; border-radius: 2px; }

.pub-container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.pub-main { padding: 24px 0 48px; min-height: calc(100vh - 260px); }

/* 头部 */
.pub-header { background: #fff; border-bottom: 1px solid var(--p-border); position: sticky; top: 0; z-index: 100; }
.pub-header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; flex-wrap: wrap; }
.pub-logo { font-size: 18px; font-weight: 700; color: var(--p-text); display: inline-flex; align-items: center; gap: 6px; }
.pub-logo:hover { text-decoration: none; }
.pub-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pub-nav a { color: var(--p-muted); padding: 6px 12px; border-radius: 6px; font-size: 14px; }
.pub-nav a:hover, .pub-nav a.active { color: var(--p-primary); background: #eff6ff; text-decoration: none; }

/* 首页 hero */
.hero { text-align: center; padding: 40px 0 28px; }
.hero h1 { font-size: 28px; margin: 0 0 8px; }
.hero p.sub { color: var(--p-muted); margin: 0 0 24px; font-size: 15px; }
.search-form { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 12px; flex-wrap: wrap; justify-content: center; }
.search-form input[type=text] {
    flex: 1; min-width: 240px;
    padding: 12px 18px; font-size: 15px;
    border: 2px solid var(--p-border); border-radius: 999px;
    transition: border-color .15s;
}
.search-form input[type=text]:focus { outline: none; border-color: var(--p-primary); }
.search-form button {
    padding: 12px 30px; font-size: 15px; color: #fff;
    background: var(--p-primary); border: none; border-radius: 999px; cursor: pointer;
}
.search-form button:hover { background: var(--p-primary-dark); }

/* 首页分类 */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--p-card); border-radius: var(--p-radius); box-shadow: var(--p-shadow);
    padding: 12px 16px; font-size: 14px; color: var(--p-text);
    border: 1px solid transparent;
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.cat-item:hover {
    box-shadow: var(--p-shadow-hover); transform: translateY(-2px);
    border-color: var(--p-primary); color: var(--p-text); text-decoration: none;
}
.cat-item .cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item .cat-count {
    flex-shrink: 0; font-size: 12px; font-weight: 600;
    color: var(--p-primary); background: #eff6ff;
    border-radius: 11px; padding: 1px 10px; min-width: 38px; text-align: center;
}

/* 区块标题 */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 14px; }
.section-title h2 { font-size: 19px; margin: 0; }
.section-title a { font-size: 13px; }

/* 卡片列表 */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.site-card {
    background: var(--p-card); border-radius: var(--p-radius);
    box-shadow: var(--p-shadow); padding: 16px 18px;
    transition: box-shadow .15s, transform .15s;
    display: flex; flex-direction: column; gap: 8px;
}
.site-card:hover { box-shadow: var(--p-shadow-hover); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-id { color: #94a3b8; font-size: 12px; font-family: Consolas, monospace; }
.card-host { font-size: 13px; color: var(--p-primary); word-break: break-all; }
.card-title { margin: 0; font-size: 16px; line-height: 1.45; }
.card-title a { color: var(--p-text); }
.card-title a:hover { color: var(--p-primary); text-decoration: none; }
.card-desc { margin: 0; color: var(--p-muted); font-size: 13px; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.pill {
    display: inline-flex; align-items: center; gap: 2px;
    height: 22px; padding: 0 9px; border-radius: 11px;
    font-size: 12px; font-weight: 600;
}
.pill-mobile { background: #eff6ff; color: #1d4ed8; }
.pill-tel    { background: #f0fdfa; color: #0f766e; }
.pill-mail   { background: #f0fdf4; color: #15803d; }
.pill-zero   { background: #f1f5f9; color: #94a3b8; font-weight: 400; }
.card-date { color: #94a3b8; font-size: 12px; }
.card-more { margin-left: auto; font-size: 13px; }

/* 列表页标题 */
.list-heading { font-size: 21px; margin: 18px 0 12px; }
.list-heading .kw { color: var(--p-primary); }

/* 列表筛选条 */
.list-filter {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    background: #fff; border-radius: var(--p-radius); box-shadow: var(--p-shadow);
    padding: 12px 16px; margin-bottom: 14px;
}
.list-filter input[type=text] {
    flex: 1; min-width: 220px; padding: 9px 14px; font-size: 14px;
    border: 1px solid var(--p-border); border-radius: 7px;
}
.list-filter input[type=text]:focus { outline: none; border-color: var(--p-primary); }
/* 列表页数据分类条目 */
.list-categories {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
    padding: 12px 16px; background: #fff; border-radius: var(--p-radius); box-shadow: var(--p-shadow);
}
.list-cat-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: 16px; font-size: 13px; color: var(--p-text);
    background: #f1f5f9; border: 1px solid transparent; text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.list-cat-item:hover { background: #e2e8f0; color: var(--p-primary); text-decoration: none; }
.list-cat-item.list-cat-active { background: var(--p-primary); color: #fff; }
.list-cat-item.list-cat-active .lc-count { background: rgba(255,255,255,.25); color: #fff; }
.list-cat-item .lc-count {
    font-size: 11px; font-weight: 600; background: #e2e8f0; color: var(--p-muted);
    border-radius: 10px; padding: 1px 8px; min-width: 28px; text-align: center;
}
.list-filter button { padding: 9px 22px; border: none; border-radius: 7px; background: var(--p-primary); color: #fff; font-size: 14px; cursor: pointer; }
.list-filter button:hover { background: var(--p-primary-dark); }
.list-filter .reset-btn { font-size: 13px; color: var(--p-muted); white-space: nowrap; }

/* 列表页统计条 */
.list-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: #fff; border-radius: var(--p-radius); box-shadow: var(--p-shadow);
    padding: 12px 18px; margin: 16px 0; font-size: 14px; color: var(--p-muted);
}
.list-bar strong { color: var(--p-text); }

/* 分页 */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 34px; height: 34px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--p-border); border-radius: 8px;
    font-size: 14px; color: var(--p-text);
}
.pagination a:hover { border-color: var(--p-primary); color: var(--p-primary); text-decoration: none; }
.pagination .current { background: var(--p-primary); border-color: var(--p-primary); color: #fff; }
.pagination .disabled { color: #cbd5e1; background: #f8fafc; }
.page-size-form, .page-jump { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--p-muted); }
.page-size-form select, .page-jump input[type=number] {
    padding: 6px 8px; border: 1px solid var(--p-border); border-radius: 6px; font-size: 13px;
}
.page-jump input[type=number] { width: 64px; text-align: center; }
.page-jump button { padding: 6px 14px; border: 1px solid var(--p-border); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; }
.page-jump button:hover { border-color: var(--p-primary); color: var(--p-primary); }

/* 空状态 */
.empty-tip { text-align: center; color: var(--p-muted); padding: 60px 0; }
.empty-tip .icon { font-size: 44px; margin-bottom: 10px; }

/* ===== 详情页 ===== */
.breadcrumb { font-size: 13px; color: var(--p-muted); margin: 14px 0; }
.breadcrumb a { color: var(--p-muted); }
.breadcrumb a:hover { color: var(--p-primary); }
.detail-card {
    background: var(--p-card); border-radius: var(--p-radius);
    box-shadow: var(--p-shadow); padding: 26px 28px; margin-bottom: 18px;
}
.detail-head .detail-id { color: #94a3b8; font-size: 13px; font-family: Consolas, monospace; }
.detail-head h1 { margin: 4px 0 10px; font-size: 24px; word-break: break-all; }
.detail-url-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-url { color: var(--p-primary); word-break: break-all; }
.detail-summary { color: var(--p-muted); font-size: 13px; margin: 10px 0 0; }
.detail-section { margin-top: 26px; }
.detail-section > h2 { font-size: 17px; margin: 0 0 12px; border-left: 4px solid var(--p-primary); padding-left: 10px; }
.tdk-list { margin: 0; background: #f8fafc; border: 1px solid var(--p-border); border-radius: 8px; padding: 14px 18px; }
.tdk-list dt { color: var(--p-muted); font-size: 12px; font-weight: 600; margin-top: 10px; }
.tdk-list dt:first-child { margin-top: 0; }
.tdk-list dd { margin: 2px 0 0; font-size: 14px; word-break: break-all; white-space: pre-wrap; }
.tdk-list dd.empty { color: #94a3b8; }

/* 联系方式 */
address.contact-block { font-style: normal; }
.contact-group { margin-bottom: 18px; }
.contact-group h3 { font-size: 14px; color: var(--p-muted); margin: 0 0 8px; font-weight: 600; }
.contact-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 20px; font-size: 14px;
    border: 1px solid transparent; transition: transform .12s, box-shadow .12s;
    word-break: break-all;
}
.contact-item:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.contact-item-mobile { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.contact-item-tel    { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.contact-item-mail   { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.contact-item .copy-btn {
    border: none; background: rgba(255,255,255,.7); color: inherit;
    width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.contact-item .copy-btn:hover { background: #fff; }
.contact-none { color: #94a3b8; font-size: 14px; }

/* 相关记录 */
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { padding: 8px 0; border-bottom: 1px dashed var(--p-border); }
.related-list li:last-child { border-bottom: none; }
.related-host { color: var(--p-muted); font-size: 12px; margin-left: 8px; }

/* API 提示条 */
.api-hint {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 10px 16px; font-size: 13px; color: #1e40af; margin-top: 18px; word-break: break-all;
}

/* 首页 API 区 */
.api-section { background: #0f172a; color: #e2e8f0; border-radius: var(--p-radius); padding: 22px 24px; margin-top: 30px; }
.api-section h2 { color: #fff; margin: 0 0 6px; font-size: 18px; }
.api-section p.note { color: #94a3b8; font-size: 13px; margin: 0 0 14px; }
.api-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed #1e293b; font-family: Consolas, monospace; font-size: 13px; }
.api-row:last-child { border-bottom: none; }
.api-row code.method { color: #4ade80; min-width: 40px; }
.api-row code.path { color: #7dd3fc; }
.api-row span.d { color: #94a3b8; font-family: inherit; }

/* 页脚 */
.pub-footer { background: #fff; border-top: 1px solid var(--p-border); padding: 20px 0 26px; color: var(--p-muted); font-size: 13px; }
.pub-footer p { margin: 4px 0; }
.pub-footer a { color: var(--p-muted); }
.pub-footer a:hover { color: var(--p-primary); }

/* 页脚友情链接 */
.footer-links {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
    padding-bottom: 12px; margin-bottom: 12px;
    border-bottom: 1px dashed var(--p-border);
    line-height: 1.9;
}
.footer-links-title { color: var(--p-text); font-weight: 600; white-space: nowrap; }
.footer-links a { font-size: 13px; }
.footer-links a:hover { text-decoration: underline; }

/* 页脚联系方式（site_dibu） */
.footer-contact {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
    padding-bottom: 12px; margin-bottom: 8px;
    border-bottom: 1px dashed var(--p-border);
    line-height: 1.9;
}
.footer-contact .fc-item { font-size: 13px; color: var(--p-muted); display: inline-flex; align-items: center; gap: 4px; }
.footer-contact .fc-item strong { color: var(--p-text); font-size: 14px; }
.footer-contact .fc-item a { color: var(--p-muted); }
.footer-contact .fc-item a:hover { color: var(--p-primary); }
.footer-contact .fc-wechat img { border-radius: 6px; border: 1px solid var(--p-border); }

/* 复制提示 */
.pub-toast {
    position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(16px);
    background: rgba(15,23,42,.92); color: #fff; padding: 9px 20px; border-radius: 20px;
    font-size: 13px; opacity: 0; visibility: hidden; transition: all .25s; z-index: 3000; pointer-events: none;
}
.pub-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ===== 联系我们 ===== */
.contact-layout { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
.contact-info h1 { font-size: 24px; margin: 8px 0 10px; }
.contact-lead { color: var(--p-muted); font-size: 14px; margin: 0 0 18px; }
.contact-points { list-style: none; margin: 0 0 18px; padding: 0; }
.contact-points li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--p-border); }
.contact-points li:last-child { border-bottom: none; }
.contact-points .ci-icon { font-size: 22px; line-height: 1.4; }
.contact-points strong { font-size: 14px; }
.contact-points p { margin: 2px 0 0; font-size: 12px; color: var(--p-muted); }
.contact-note { font-size: 12px; color: var(--p-muted); background: #f8fafc; border-radius: 8px; padding: 10px 12px; }
.contact-note em { color: #ef4444; font-style: normal; }

.contact-form-wrap {
    background: var(--p-card); border-radius: var(--p-radius);
    box-shadow: var(--p-shadow); padding: 24px 26px;
}
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.cf-row { display: flex; flex-direction: column; gap: 6px; position: relative; }
.cf-row label { font-size: 13px; font-weight: 600; color: var(--p-text); }
.cf-row label em { color: #ef4444; font-style: normal; }
.cf-row input[type=text], .cf-row select, .cf-row textarea {
    padding: 10px 14px; font-size: 14px; font-family: inherit;
    border: 1px solid var(--p-border); border-radius: 8px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.cf-row input:focus, .cf-row select:focus, .cf-row textarea:focus {
    outline: none; border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.cf-row textarea { resize: vertical; min-height: 120px; }
.cf-counter { position: absolute; right: 4px; bottom: 4px; font-size: 11px; color: #94a3b8; background: rgba(255,255,255,.85); padding: 0 4px; }

/* 验证码 */
.cf-captcha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cf-captcha input[type=text] { width: 150px; padding: 10px 14px; font-size: 15px; letter-spacing: 2px; text-transform: uppercase; }
.captcha-img {
    width: 120px; height: 42px; border: 1px solid var(--p-border); border-radius: 8px;
    cursor: pointer; background: #f2f6fa; user-select: none;
}
.captcha-img:hover { border-color: var(--p-primary); }
.captcha-tip { font-size: 12px; color: #94a3b8; }

/* 蜜罐字段：绝对定位移出视口且不占位 */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.btn-pub {
    display: inline-block; padding: 10px 26px; border-radius: 8px;
    background: var(--p-primary); color: #fff !important; font-size: 14px;
    border: 1px solid var(--p-primary); cursor: pointer; text-align: center;
    text-decoration: none !important; transition: background .15s;
}
.btn-pub:hover { background: var(--p-primary-dark); }
.btn-pub-line { background: #fff; color: var(--p-primary) !important; margin-left: 10px; }
.btn-pub-line:hover { background: #eff6ff; }
.btn-pub-block { width: 100%; padding: 12px; font-size: 15px; }

.contact-alert {
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-bottom: 18px;
}
.contact-alert ul { margin: 6px 0 0; padding-left: 18px; }

.contact-success { text-align: center; padding: 40px 20px; }
.contact-success .cs-icon { font-size: 52px; }
.contact-success h2 { margin: 10px 0 6px; font-size: 20px; }
.contact-success p { color: var(--p-muted); margin: 0 0 22px; }

@media (max-width: 768px) {
    .contact-layout { grid-template-columns: 1fr; }
    .contact-form-wrap { padding: 18px 16px; }
}

/* 404 */
.notfound { text-align: center; padding: 80px 0; }
.notfound .code { font-size: 60px; font-weight: 700; color: #cbd5e1; }

@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .card-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 22px; }
    .detail-card { padding: 18px 16px; }
    .pub-header-inner { height: auto; padding: 8px 0; }
}

@media (max-width: 420px) {
    .category-grid { grid-template-columns: 1fr; }
}
