/* ==========================================================
   云赶集 SEO 综合查询 —— 报告页样式（与首页查询结果同版式）
   ========================================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: #eef2ff;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;

    --bg: #f6f7fb;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --panel: #ffffff;
    --text-1: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --line: #eef0f4;
    --line-2: #e5e7eb;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --radius: 14px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow: 0 1px 2px rgba(17, 24, 39, .04);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --primary-bg: #312e81;
    --success: #34d399;
    --success-bg: #064e3b;
    --warning: #fbbf24;
    --warning-bg: #451a03;
    --danger: #f87171;
    --danger-bg: #450a0a;
    --info: #60a5fa;
    --info-bg: #1e3a5f;

    --bg: #0b1120;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --panel: #151e31;
    --text-1: #f1f5f9;
    --text-2: #cbd5e1;
    --text-3: #64748b;
    --line: #223047;
    --line-2: #223047;
    --border-color: #334155;
    --border-light: #1e293b;
    --shadow: none;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
    backdrop-filter: blur(14px);
}
.site-header .wrap {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-1);
    white-space: nowrap;
}
.site-logo .mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
}
.site-nav { display: flex; align-items: center; gap: 4px; font-size: 13.5px; }
.site-nav a { color: var(--text-secondary); padding: 7px 13px; border-radius: 9px; font-weight: 500; transition: background .18s, color .18s; }
.site-nav a:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.site-nav a.active { background: var(--primary-bg); color: var(--primary-dark); font-weight: 600; }
[data-theme="dark"] .site-nav a.active { color: var(--primary-light); }

.breadcrumb { font-size: 12.5px; color: var(--text-tertiary); padding: 16px 0 0; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span.sep { margin: 0 7px; color: var(--line-2); }

/* ---------- 记录列表页复用 ---------- */
.hero {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    border-radius: var(--radius-xl);
    background: linear-gradient(120deg, #4f46e5, #7c6cf6 55%, #8b5cf6);
    color: #fff;
    padding: 30px 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}
.hero::after {
    content: '';
    position: absolute;
    right: -90px;
    top: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    pointer-events: none;
}
.hero h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1.4;
    position: relative;
}
.hero .hero-sub { font-size: 13.5px; opacity: .85; margin-top: 6px; position: relative; }
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    position: relative;
}
.hero-stats span {
    font-size: 12.5px;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    font-variant-numeric: tabular-nums;
}
.hero-stats b { font-weight: 700; }
.hero-stats span.good { background: rgba(16, 185, 129, .28); border-color: rgba(255, 255, 255, .3); }
.hero-stats span.warn { background: rgba(245, 158, 11, .3); border-color: rgba(255, 255, 255, .3); }
.hero-stats span.bad { background: rgba(239, 68, 68, .34); border-color: rgba(255, 255, 255, .3); }
.hero-score { text-align: center; position: relative; padding-right: 8px; }
.hero-score .num {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
}
.hero-score .grade {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
}

.panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-top: 18px;
    overflow: hidden;
}
.panel-head {
    padding: 18px 24px 12px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.panel-head h2 { font-size: 16px; font-weight: 700; }
.panel-head .more { font-size: 12.5px; color: var(--text-tertiary); }
.panel-body { padding: 4px 24px 20px; }

.record-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 10px; padding: 4px 24px 20px; }
.record-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 11px 14px;
    color: var(--text-primary);
    transition: border-color .18s, transform .18s;
}
.record-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.record-score {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--score-color, var(--primary));
    background: color-mix(in srgb, var(--score-color, var(--primary)) 10%, transparent);
    font-variant-numeric: tabular-nums;
}
.record-main { flex: 1 1 auto; min-width: 0; display: block; }
.record-domain {
    display: block;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.record-meta { display: block; font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }
.record-arrow { color: var(--text-tertiary); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a, .chips span {
    font-size: 12.5px;
    padding: 4px 12px;
    border-radius: 99px;
    border: 1px solid var(--line-2);
    color: var(--text-secondary);
    background: var(--bg-secondary);
}
.chips a:hover { border-color: var(--primary); color: var(--primary); }

.pager { display: flex; justify-content: center; gap: 8px; margin: 20px 0 6px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 36px;
    text-align: center;
    padding: 6px 12px;
    border-radius: 99px;
    border: 1px solid var(--line-2);
    font-size: 13.5px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}
.pager .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-tertiary); font-size: 13.5px; }
.empty strong { color: var(--text-secondary); display: block; font-size: 15px; margin-bottom: 6px; }
.empty .chips { justify-content: center; margin-top: 14px; }

.note-text { color: var(--text-secondary); font-size: 13.5px; }

.cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(120deg, #4f46e5, #7c6cf6 60%, #8b5cf6);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 20px 26px;
    margin-top: 18px;
}
.cta h2 { font-size: 15.5px; font-weight: 700; }
.cta p { font-size: 12.5px; opacity: .85; margin-top: 2px; }
.cta .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cta a.btn {
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 13.5px;
    padding: 9px 18px;
    border-radius: 99px;
}
.cta a.btn.ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .45);
}
.cta a.btn:hover { opacity: .92; }

/* ---------- 页脚 ---------- */
.site-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 44px;
    padding: 26px 0 34px;
    font-size: 12.5px;
    color: var(--text-tertiary);
}
.site-footer .fnav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.site-footer a { color: var(--text-secondary); }
.site-footer p { margin-top: 4px; }

/* ---------- 响应式（公共部分） ---------- */
@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; padding: 24px 22px; }
    .hero-score { text-align: left; padding-right: 0; }
    .site-nav { gap: 12px; font-size: 12.5px; }
    .record-grid { padding: 4px 16px 16px; }
    .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; }
}


/* ==========================================================
   以下为首页查询结果区同款样式（提取自 index.php）
   ========================================================== */

.results-section {
    display: none;
    margin-top: 32px;
}
.results-section.active {
    display: block;
}

/* Score Overview */
.score-overview {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.score-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.score-circle-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 16px;
}

.score-circle {
    width: 100%;
    height: 100%;
}

.score-circle-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 12;
}

.score-circle-progress {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 1.5s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.score-grade {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

.grade-excellent { background: var(--success-bg); color: var(--success); }
.grade-good { background: var(--info-bg); color: var(--info); }
.grade-fair { background: var(--warning-bg); color: var(--warning); }
.grade-poor { background: var(--danger-bg); color: var(--danger); }
.grade-critical { background: var(--danger-bg); color: var(--danger); }

.score-info {
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.score-info-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}
.score-info-item .label { color: var(--text-tertiary); }
.score-info-item .value { color: var(--text-primary); font-weight: 500; }

/* Summary Stats */
.summary-stats {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
}

.summary-url {
    font-size: 13px;
    color: var(--text-tertiary);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-permalink {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}
.summary-permalink:hover { text-decoration: underline; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-number.success { color: var(--success); }
.stat-number.warning { color: var(--warning); }
.stat-number.danger { color: var(--danger); }
.stat-number.info { color: var(--info); }

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.chart-container {
    position: relative;
    height: 200px;
}

/* Critical Issues */
.critical-issues {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    border-left: 4px solid var(--danger);
}

.critical-issues h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
}

.issue-list {
    list-style: none;
}

.issue-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.issue-item iconify-icon {
    color: var(--danger);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============ Section Tabs with scroll arrows ============ */
.tabs-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.tabs-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
    opacity: 0;
    pointer-events: none;
}
.tabs-scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}
.tabs-scroll-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.tabs-scroll-btn.left { left: -8px; }
.tabs-scroll-btn.right { right: -8px; }

.section-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    border: 1px solid var(--border-light);
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.section-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.tab-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-score {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    font-weight: 600;
}
.tab-btn.active .tab-score {
    background: rgba(255,255,255,0.2);
}


.section-content {
    display: none;
}
.section-content.active {
    display: block;
}

.section-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.section-card-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-card-title iconify-icon {
    color: var(--primary);
    font-size: 20px;
}

.section-score-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* Analysis Items */
.analysis-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.analysis-item:last-child {
    border-bottom: none;
}

.analysis-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.analysis-item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.analysis-item-value {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 50%;
    text-align: right;
    word-break: break-all;
}

.analysis-item-score-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.score-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s ease;
}

.score-bar-score {
    font-size: 12px;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.detail-list {
    margin-top: 10px;
    padding-left: 0;
    list-style: none;
}

.detail-item {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
    align-items: flex-start;
}

.detail-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-top: 1px;
}
.detail-icon.success { background: var(--success-bg); color: var(--success); }
.detail-icon.warning { background: var(--warning-bg); color: var(--warning); }
.detail-icon.danger { background: var(--danger-bg); color: var(--danger); }
.detail-icon.info { background: var(--info-bg); color: var(--info); }

/* Keywords */
.keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.keyword-tag {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    background: var(--primary-bg);
    color: var(--primary-dark);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

[data-theme="dark"] .keyword-tag {
    background: var(--primary-bg);
    color: var(--primary-light);
}

.keyword-tag .freq {
    font-size: 11px;
    opacity: 0.7;
}

/* Recommendations */
.recommendations-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.recommendations-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rec-list {
    list-style: none;
}

.rec-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.rec-item:last-child { border-bottom: none; }

.rec-priority {
    flex-shrink: 0;
    width: 6px;
    border-radius: 999px;
    margin: 4px 0;
}
.rec-priority.high { background: var(--danger); }
.rec-priority.medium { background: var(--warning); }
.rec-priority.low { background: var(--info); }

.rec-content {
    flex: 1;
}

.rec-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.rec-category {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* Subtle animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* Heading structure tree */
.heading-tree {
    margin-top: 12px;
    padding-left: 0;
    list-style: none;
}

.heading-tree-item {
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.heading-level-badge {
    flex-shrink: 0;
    width: 24px;
    height: 20px;
    border-radius: 4px;
    background: var(--primary-bg);
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .heading-level-badge {
    color: var(--primary-light);
}

/* Link tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
}

.data-table tr:hover td {
    background: var(--bg-tertiary);
}

.link-href {
    color: var(--primary);
    text-decoration: none;
    max-width: 300px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.link-href:hover {
    text-decoration: underline;
}

.nofollow-badge {
    display: inline-block;
    padding: 1px 6px;
    background: var(--warning-bg);
    color: var(--warning);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* ---------- 响应式（结果区） ---------- */
@media (max-width: 768px) {
    .score-overview { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .section-tabs {
        margin: 0 -16px 20px;
        padding: 4px 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .section-card { margin: 0 0 16px; }
}

/* ---------- PDF 下载卡片 + 支付弹窗（提取自 index.php） ---------- */

.pdf-download-card {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.pdf-download-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.pdf-download-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.pdf-download-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.pdf-download-info p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 0;
}

.pdf-features {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.85;
}
.pdf-features span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pdf-download-btn {
    flex-shrink: 0;
    padding: 14px 28px;
    background: white;
    color: var(--primary-dark);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: inherit;
}
.pdf-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.pdf-price {
    color: var(--danger);
    font-size: 18px;
    font-weight: 800;
}

/* ============ Pay Modal ============ */
.pay-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}
.pay-modal-overlay.active {
    display: flex;
}

.pay-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 360px;
    margin: 0 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.pay-modal-header {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pay-modal-header .title { font-size: 16px; font-weight: 700; }
.pay-modal-header .subtitle { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.pay-modal-header .price { font-size: 24px; font-weight: 800; }

.pay-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.pay-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.pay-tab:hover { color: var(--text-primary); }
.pay-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.pay-modal-body {
    padding: 24px;
}

.qrcode-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    min-height: 220px;
}
.qrcode-container img,
.qrcode-container canvas {
    border-radius: 8px;
}

.pay-status {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-secondary);
}
.pay-status .tip { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

.countdown {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.pay-expired {
    text-align: center;
    margin-top: 14px;
    display: none;
}
.pay-expired.active { display: block; }
.pay-expired .expired-text {
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 8px;
}
.pay-expired button {
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.pay-error {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--danger);
    display: none;
}
.pay-error.active { display: block; }

.pay-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pay-modal-footer .secure-text {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.pay-modal-footer .close-btn {
    font-size: 13px;
    color: var(--text-tertiary);
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}
.pay-modal-footer .close-btn:hover { color: var(--text-primary); }

/* Alipay redirect style */
.alipay-redirect {
    text-align: center;
    padding: 20px 0;
}
.alipay-redirect .alipay-icon {
    font-size: 48px;
    color: #1677ff;
    margin-bottom: 12px;
}
.alipay-redirect p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.alipay-redirect a {
    display: inline-block;
    padding: 10px 24px;
    background: #1677ff;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.alipay-redirect .note {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================
   响应式增强（全页面自适应：平板 → 手机）
   ========================================================== */
@media (max-width: 900px) {
    .wrap { padding: 0 16px; }
    .record-grid { padding: 4px 16px 16px; }
    .panel-head { padding-left: 16px; padding-right: 16px; }
    .panel-body { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 760px) {
    /* 防止栅格子元素被固定宽度内容（如雷达图 canvas）撑破导致整页横向溢出 */
    .score-overview > *, .hero > * { min-width: 0; }
    .score-overview { grid-template-columns: minmax(0, 1fr); }

    /* 顶部导航：允许换行，导航条可横滑 */
    .site-header .wrap {
        height: auto;
        min-height: 52px;
        flex-wrap: wrap;
        padding-top: 8px;
        padding-bottom: 8px;
        row-gap: 2px;
    }
    .site-logo { font-size: 14px; }
    .site-logo .mark { width: 26px; height: 26px; border-radius: 8px; font-size: 12.5px; }
    .site-nav {
        width: 100%;
        gap: 2px;
        font-size: 13px;
        margin-top: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }
    .site-nav::-webkit-scrollbar { display: none; }
    .site-nav a { white-space: nowrap; flex-shrink: 0; padding: 7px 11px; }

    /* 横幅与记录卡片 */
    .hero { padding: 22px 18px; gap: 14px; }
    .hero h1 { font-size: 20px; }
    .hero-score .num { font-size: 46px; letter-spacing: -1px; }
    .breadcrumb { padding-top: 12px; }
    .record-grid { gap: 8px; }
    .record-card { padding: 10px 12px; }
    .cta { gap: 12px; }

    /* 得分概览 + 分析概览 */
    .score-card { padding: 20px; }
    .score-circle-wrapper { width: 148px; height: 148px; }
    .score-number { font-size: 38px; }
    .summary-header { flex-wrap: wrap; }
    .summary-url { max-width: 100%; white-space: normal; word-break: break-all; }
    .stats-grid { gap: 8px; }
    .stat-item { padding: 12px 8px; }
    .stat-number { font-size: 24px; }
    .chart-container { max-width: 100%; overflow: hidden; }
    .chart-container canvas { max-width: 100% !important; }

    /* 严重问题 / 优化建议 */
    .issue-item { flex-wrap: wrap; }
    .recommendations-section { padding: 16px; }

    /* 维度明细选项卡与明细内容 */
    .tabs-wrapper {
        margin: 0 -16px 16px;
        padding: 4px 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    /* 滚动箭头收进容器内，避免探出产生整页横向滚动 */
    .tabs-scroll-btn.left { left: 0; }
    .tabs-scroll-btn.right { right: 0; }
    .section-card { padding: 14px; }
    .section-card-header { flex-wrap: wrap; gap: 6px; }
    .analysis-item-value { max-width: 55%; }
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table th, .data-table td { padding: 6px 8px; font-size: 12px; white-space: nowrap; }

    /* PDF 下载卡片 */
    .pdf-download-card { flex-direction: column; align-items: stretch; padding: 20px; gap: 14px; }
    .pdf-download-info h3 { font-size: 17px; }
    .pdf-features { flex-wrap: wrap; gap: 10px; }
    .pdf-download-btn { width: 100%; justify-content: center; }

    /* 支付弹窗 */
    .pay-modal { max-width: 340px; }
    .pay-modal-header { padding: 16px 18px; }
    .pay-modal-body { padding: 16px; }

    /* 页脚 */
    .site-footer { font-size: 12px; }
    .site-footer .fnav { gap: 12px; }
}

@media (max-width: 400px) {
    .hero-score .num { font-size: 40px; }
    .score-circle-wrapper { width: 132px; height: 132px; }
    .score-number { font-size: 34px; }
    .pay-modal { margin: 0 10px; }
    .hero { padding: 18px 14px; }
}
