/* 站点详情页样式 —— 1:1 复刻自卡券网 detail.css，变量同源 */
:root {
    --primary: #1f5eff;
    --primary-hover: #1747c2;
    --primary-light: #e9efff;
    --primary-soft: #d6e2ff;
    --accent: #c2410c;
    --bg-page: #f6f8fc;
    --bg-card: #ffffff;
    --text-primary: #243247;
    --text-secondary: #59677b;
    --text-muted: #6a778d;
    --border: #e1e7f0;
    --border-light: #edf1f7;
    --danger: #c8322a;
    --success: #3478e5;
    --warning: #a86a08;
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 2px rgba(16, 32, 29, .05);
    --shadow-md: 0 6px 20px rgba(16, 32, 29, .07);
}

.wrap.site-detail-wrap { padding: 16px 28px 14px; }
.site-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 13px;
}
.site-breadcrumb a { color: var(--text-secondary); }
.site-breadcrumb a:hover { color: var(--primary); }
.site-detail { display: flex; align-items: flex-start; gap: 24px; }
.site-detail-main { flex: 1; }
.site-detail-side { width: 300px; flex-shrink: 0; }
.site-detail-card {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}
.site-hero-card { overflow: hidden; }
.site-detail-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background:
        linear-gradient(135deg, rgba(31, 94, 255, .06), rgba(23, 71, 194, .02)),
        #fff;
    border-bottom: 1px solid var(--border-light);
}
.site-detail-header::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(31, 94, 255, .06);
    pointer-events: none;
}
.site-detail-header::before {
    content: "";
    position: absolute;
    right: 46px;
    bottom: -64px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1.5px solid rgba(31, 94, 255, .13);
    background: transparent;
    pointer-events: none;
}
.site-detail-logo {
    position: relative;
    z-index: 1;
    width: 78px; height: 78px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(31, 94, 255, .16);
    padding: 8px;
    flex-shrink: 0;
    box-shadow: 0 12px 28px rgba(31, 94, 255, .10);
}
.site-detail-info-area { position: relative; z-index: 1; flex: 1; min-width: 0; }
.site-detail-h1 {
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0;
    letter-spacing: 0;
}
.site-action-bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-left: auto;
}
.site-click-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 13px;
    border: 1px solid #e4ecf6;
    border-radius: 7px;
    background: rgba(255,255,255,.72);
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}
.site-click-count strong {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 800;
}
.site-go-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px;
    padding: 0 24px;
    background: var(--primary);
    color: #fff; border-radius: 7px;
    font-size: 14px; font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(18, 76, 148, .2);
    transition: background .2s, transform .2s, box-shadow .2s;
}
.site-go-btn:hover { color:#fff; background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(21, 88, 171, .35); }
.site-section-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 34px 30px 0;
    margin-bottom: 14px;
    border-top: 1px solid var(--border-light);
}
.site-section-title h2 {
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0;
}
.site-section-title span {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}
.site-detail-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.9;
    padding-top: 2px;
    word-break: break-word;
}
.site-desc-panel {
    margin: 0 30px 30px;
    padding: 24px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #fff;
}
.rich-html-content > *:first-child { margin-top: 0; }
.rich-html-content > *:last-child { margin-bottom: 0; }
.rich-html-content h1,
.rich-html-content h2,
.rich-html-content h3,
.rich-html-content h4 {
    color: var(--text-primary);
    line-height: 1.45;
    font-weight: 800;
    margin: 22px 0 10px;
    letter-spacing: 0;
}
.rich-html-content h1 { font-size: 24px; }
.rich-html-content h2 { font-size: 20px; }
.rich-html-content h3 { font-size: 18px; }
.rich-html-content h4 { font-size: 16px; }
.rich-html-content p { margin: 10px 0; }
.rich-html-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.rich-html-content ul,
.rich-html-content ol { margin: 10px 0 14px 24px; }
.rich-html-content li { margin: 6px 0; }
.rich-html-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px 0;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}
.rich-html-content blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid var(--primary);
    background: #fafbfd;
    color: var(--text-secondary);
}
.rich-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.rich-html-content th,
.rich-html-content td {
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    text-align: left;
}
.rich-html-content th { background: #f8fafc; color: var(--text-primary); }
.rich-html-content .site-desc-auto {
    padding: 16px;
    border-radius: 8px;
    background: #fafbfd;
    border: 1px solid var(--border-light);
}
.rich-html-content .ai-site-desc {
    display: grid;
    gap: 18px;
}
.rich-html-content .ai-desc-lead {
    margin: 0;
    padding: 16px 18px;
    border-radius: 8px;
    color: #25364a;
    background: #fafbfd;
    border: 1px solid #eaeff6;
    font-size: 16px;
    line-height: 1.85;
}
.rich-html-content .ai-desc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.rich-html-content .ai-desc-card {
    padding: 18px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(24, 67, 120, .04);
}
.rich-html-content .ai-desc-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
}
.rich-html-content .ai-desc-card ul {
    margin: 0;
    padding-left: 20px;
}
.rich-html-content .ai-desc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rich-html-content .ai-desc-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 13px;
    font-weight: 700;
}
.rich-html-content .ai-desc-note {
    margin: 0;
    padding: 12px 14px;
    border-left: 4px solid var(--primary);
    background: #fafbfd;
    color: var(--text-secondary);
}

.side-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 28px rgba(15, 27, 42, .05);
}
.site-detail-side { position: sticky; top: 84px; }
.side-card h3 { font-size: 16px; font-weight: 800; margin: 0; }
.side-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.side-card-title-row a {
    flex-shrink: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}
.side-card > h3 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.side-info-list { display: grid; gap: 10px; }
.side-info-list div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #f0f2f5;
    border-radius: 8px;
    background: #fcfdfe;
}
.side-info-list span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 3px;
}
.side-info-list strong,
.side-info-list a {
    display: block;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.side-info-list a { color: var(--primary); }
.side-article-list { display: grid; gap: 2px; }
.side-article-item {
    display: block;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
}
.side-article-item:hover { border-color: #e4ecf5; background: #fafbfd; }
.side-article-item strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.side-article-item span {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}
.side-article-item:hover strong { color: var(--primary); }
.side-empty-text {
    color: var(--text-muted);
    font-size: 13px;
    padding: 14px;
    border: 1px dashed #dbe4e3;
    border-radius: 8px;
    background: #fcfdfe;
}
.side-site-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.side-site-item:hover { border-color: #e4ecf5; background: #fafbfd; }
.side-site-item:hover .side-site-name { color: var(--primary); }
.side-site-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: var(--bg-page); }
.side-site-name {
    font-size: 15px; color: var(--text-primary);
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-site-clicks { font-size: 12px; color: var(--text-muted); }

@media (max-width: 768px) {
    .wrap.site-detail-wrap { padding: 16px 12px 14px; }
    .site-detail {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .site-detail-main { width: 100%; }
    .site-detail-side { width: 100%; position: static; }
    .site-detail-card { padding: 0; }

    .site-detail-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px;
        align-items: center;
    }
    .site-detail-header::after { display: none; }
    .site-detail-logo { width: 52px; height: 52px; border-radius: 10px; }
    .site-detail-info-area { flex: 1; min-width: 0; }
    .site-detail-h1 { font-size: 20px; }

    /* 按钮行：独占一整行 */
    .site-action-bar {
        flex-basis: 100%;
        margin-left: 0;
        gap: 8px;
        justify-content: flex-start;
    }
    .site-click-count { flex: 0 0 auto; height: 38px; }
    .site-go-btn { flex: 1; height: 38px; }

    .site-section-title { padding: 20px 16px 0; }
    .site-desc-panel { margin: 0 16px 16px; padding: 16px; }
    .rich-html-content .ai-desc-grid { grid-template-columns: minmax(0, 1fr); }
    .site-detail-side .side-card:first-child { margin-top: 0; }
}

/* 更多副业专区 */
.sh-pick-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 6px 0 20px;
}
.sh-pick-divider::before,
.sh-pick-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e6eb;
}
.sh-pick-divider > span {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
}
.sh-pick-head {
    border-top: none;
    padding-top: 24px;
}
.sh-pick-more {
    margin-left: auto;
    font-size: 13px;
    color: var(--primary);
    white-space: nowrap;
}
.sh-pick-more:hover {
    color: var(--primary-hover);
}
.sh-pick-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2px 34px;
    padding: 0 30px 26px;
}
.sh-pick-item {
    display: flex;
    align-items: baseline;
    min-width: 0;
    gap: 12px;
    padding: 11px 0;
    color: inherit;
    border-bottom: 1px solid var(--border-light);
}
.sh-pick-item::before {
    content: '';
    flex-shrink: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4877b0;
    transform: translateY(-2px);
    transition: background .15s;
}
.sh-pick-item:hover::before {
    background: var(--primary);
}
.sh-pick-item > strong {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}
.sh-pick-item:hover > strong {
    color: var(--primary);
}
.sh-pick-item > small {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-muted);
}
@media (max-width: 768px) {
    .sh-pick-divider {
        gap: 10px;
        margin: 2px 0 16px;
        padding: 0 4px;
    }
    .sh-pick-divider > span {
        font-size: 11px;
        white-space: normal;
        text-align: center;
    }
    .sh-pick-head {
        padding: 20px 16px 0;
    }
    .sh-pick-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 0 16px 14px;
    }
    .sh-pick-item {
        padding: 12px 0;
    }
    .sh-pick-item > strong {
        font-size: 14px;
    }
}

/* 平台速览：卡券网的条目结构（规格表式，与卡片网格式的旧结构区分） */
.rich-html-content .kqw-brief { display: grid; gap: 22px; }
.rich-html-content .kqw-brief-lead {
    margin: 0;
    font-size: 16px;
    line-height: 1.95;
    color: var(--text-primary);
    padding-left: 16px;
    border-left: 3px solid var(--primary);
}
.rich-html-content .kqw-brief-facts { margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.rich-html-content .kqw-fact {
    display: flex;
    align-items: baseline;
    gap: 16px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 14px;
}
.rich-html-content .kqw-fact dt {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.9;
    color: var(--primary);
    letter-spacing: .4px;
    flex-shrink: 0;
}
.rich-html-content .kqw-fact dd {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--text-secondary);
}
.rich-html-content .kqw-fact dd a { color: var(--primary); text-decoration: none; font-weight: 500; }
.rich-html-content .kqw-fact dd a:hover { color: var(--primary-hover); }
.site-desc-disclaimer {
    margin-top: 18px;
    padding-top: 13px;
    border-top: 1px dashed var(--border);
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text-muted);
}
@media (max-width: 640px) {
    .rich-html-content .kqw-fact { flex-direction: column; gap: 2px; padding: 9px 12px; }
    .rich-html-content .kqw-brief-lead { font-size: 15.5px; padding-left: 13px; }
}

/* ---------- 侧栏：联系站长 ---------- */
.side-wechat { text-align: center; }
.side-wechat h3 { text-align: left; }
.side-wechat-qr {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
    margin: 14px auto 10px;
    padding: 7px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.side-wechat-tip {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.side-wechat-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    list-style: none;
    text-align: left;
}
.side-wechat-list li {
    position: relative;
    padding-left: 14px;
    font-size: 12.5px;
    line-height: 2;
    color: var(--text-secondary);
}
.side-wechat-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 11px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
}

/* 结构化字段排版补充 */
.kqw-brief-lead { font-size: 15px; line-height: 1.9; color: var(--text-primary); margin-bottom: 14px; }
.kqw-brief-facts { margin: 14px 0 0; }
.kqw-fact { display: flex; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--border-light); }
.kqw-fact dt { flex-shrink: 0; width: 76px; color: var(--text-muted); font-size: 13px; }
.kqw-fact dd { margin: 0; color: var(--text-primary); font-size: 13.5px; line-height: 1.8; }
.site-detail-logo-ph { display: grid; place-items: center; background: var(--primary-light); color: var(--primary); font-size: 34px; font-weight: 700; }
.side-note { font-size: 13px; line-height: 1.8; color: var(--text-secondary); }
.side-note a { color: var(--primary); }
.side-site-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--border-light); font-size: 13px; }
.side-site-item img { border-radius: 6px; object-fit: contain; background: #fff; }
.side-site-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-site-item small { color: var(--text-muted); }
