.site-detail-wrap { padding: 28px 28px 42px; }
.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(22, 119, 255, .08), rgba(47, 201, 99, .06)),
        #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(22, 119, 255, .08);
    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(22, 119, 255, .14);
    padding: 8px;
    flex-shrink: 0;
    box-shadow: 0 12px 28px rgba(24, 62, 120, .08);
}
.site-detail-logo-placeholder {
    position: relative;
    z-index: 1;
    width: 78px; height: 78px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid #dbeaff;
    flex-shrink: 0;
    box-shadow: 0 12px 28px rgba(24, 62, 120, .08);
}
.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 #dbeaff;
    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(22, 119, 255, .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(75, 110, 245, .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: #f8fbff;
    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: #f6f9fe; color: var(--text-primary); }
.rich-html-content .site-desc-auto {
    padding: 16px;
    border-radius: 8px;
    background: #f8fbff;
    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: #25324a;
    background: #f8fbff;
    border: 1px solid #e4eefc;
    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, 62, 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: #f8fbff;
    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, 23, 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 #edf2f8;
    border-radius: 8px;
    background: #fbfdff;
}
.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: #dbeafe; background: #f8fbff; }
.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 #d7dee8;
    border-radius: 8px;
    background: #fbfdff;
}
.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: #dbeafe; background: #f8fbff; }
.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-logo-ph {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    color: var(--primary); background: var(--primary-soft);
}
.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) {
    .site-detail-wrap { padding: 14px 12px 28px; }
    .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,
    .site-detail-logo-placeholder { 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: 1fr; }
    .site-detail-side .side-card:first-child { margin-top: 0; }
}
