/* ============================================================
   我的报告页 —— 仅作用于 report.html
   视觉语言与首页 css/home.css 保持一致
   ============================================================ */

:root {
    --paper: #f4f3ef;
    --ink: #101114;
    --ink-soft: #3c3f46;
    --muted: #6c7078;
    --line: #e5e3dd;
    --card: #ffffff;
    --radius-lg: 32px;
    --radius-md: 22px;
    --shadow-sm: 0 1px 2px rgba(16, 17, 20, 0.04), 0 10px 26px -18px rgba(16, 17, 20, 0.25);
    --shadow-lg: 0 40px 80px -40px rgba(16, 17, 20, 0.45);
    --font-sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    scroll-behavior: smooth;
}

.report-page,
.report-page *,
.report-page *::before,
.report-page *::after {
    box-sizing: border-box;
}

body.report-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.report-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(620px 420px at 10% -6%, rgba(47, 107, 255, 0.10), transparent 62%),
        radial-gradient(700px 480px at 94% 6%, rgba(255, 92, 138, 0.10), transparent 64%),
        radial-gradient(620px 460px at 50% 112%, rgba(124, 92, 255, 0.09), transparent 62%);
    pointer-events: none;
    z-index: 0;
}

.shell {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.report-header,
.report-main,
.report-footer {
    position: relative;
    z-index: 1;
}

/* ---------------- 顶部导航 ---------------- */

.report-header {
    padding: 22px 0 4px;
}

.report-header .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 22px -12px rgba(16, 17, 20, 0.8);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-sub {
    font-size: 9.5px;
    letter-spacing: 0.24em;
    color: var(--muted);
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.back-home:hover {
    background: #fff;
    border-color: #c9c6bd;
}

.back-home svg {
    width: 14px;
    height: 14px;
}

/* ---------------- 页面标题 ---------------- */

.report-main {
    padding-top: 34px;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #a6a29a;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: #c6c2b8;
}

.page-title {
    margin: 10px 0 0;
    font-size: clamp(27px, 3.4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.015em;
}

.page-desc {
    margin: 10px 0 0;
    max-width: 560px;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--muted);
}

.head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-print,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-print {
    border: none;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 12px 24px -18px rgba(16, 17, 20, 0.8);
}

.btn-print:hover {
    background: #2a2d35;
    transform: translateY(-1px);
}

.btn-print[disabled] {
    opacity: 0.55;
    cursor: progress;
    transform: none;
}

.btn-outline {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.btn-outline:hover {
    background: #fbfaf7;
    transform: translateY(-1px);
}

.btn-print svg,
.btn-outline svg {
    width: 15px;
    height: 15px;
}

/* ---------------- 概览 ---------------- */

.overview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.overview[hidden] {
    display: none;
}

.stat {
    flex: 1 1 140px;
    padding: 16px 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.stat b {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.stat span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 0.14em;
    color: #a6a29a;
}

/* ---------------- 报告列表 ---------------- */

.report-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-card {
    --a: #2f6bff;
    --b: #5fd3ff;
    --tint: #eaf0ff;
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.28s;
}

.report-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--a), var(--b));
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -30px rgba(16, 17, 20, 0.45), 0 2px 4px rgba(16, 17, 20, 0.04);
}

.report-card[data-cat="亲密关系"] {
    --a: #ff5c8a;
    --b: #ffa06b;
    --tint: #ffeef3;
}

.report-card[data-cat="性格人格"] {
    --a: #7c5cff;
    --b: #c58bff;
    --tint: #f1ecff;
}

.report-card[data-cat="欲望趣味"] {
    --a: #ff8a3d;
    --b: #ffb347;
    --tint: #fff3e6;
}

.rc-icon {
    width: 44px;
    height: 44px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--tint);
    color: var(--a);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.rc-body {
    flex: 1;
    min-width: 0;
}

.rc-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.5;
}

.rc-summary {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-soft);
}

.rc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 11.5px;
    color: #9c998f;
}

.rc-tag {
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fbfbf9;
    font-size: 10.5px;
    color: var(--muted);
}

.rc-actions {
    display: flex;
    flex: none;
    gap: 8px;
}

.rc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 17px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.rc-link:hover {
    background: linear-gradient(120deg, var(--a), var(--b));
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -12px var(--a);
}

.rc-link svg {
    width: 13px;
    height: 13px;
}

/* ---------------- 空状态 ---------------- */

.empty {
    padding: 66px 28px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-mark {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #f4f3ee;
    color: #a6a29a;
}

.empty-mark svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
}

.empty p {
    margin: 0 auto 24px;
    max-width: 380px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--muted);
}

.empty .btn-print {
    height: 44px;
    padding: 0 24px;
}

/* ---------------- 页脚 ---------------- */

.report-footer {
    margin-top: 56px;
    padding: 22px 0 38px;
    border-top: 1px solid var(--line);
}

.report-footer .shell {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: #9c998f;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 640px) {
    .shell {
        padding: 0 18px;
    }

    .report-header {
        padding-top: 18px;
    }

    .report-card {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 18px;
        gap: 14px;
    }

    .rc-icon {
        width: 40px;
        height: 40px;
    }

    .rc-actions {
        width: 100%;
    }

    .rc-link {
        flex: 1;
        justify-content: center;
    }

    .head-actions {
        width: 100%;
    }

    .btn-print,
    .btn-outline {
        flex: 1 1 46%;
        white-space: nowrap;
    }

    .stat {
        flex: 1 1 28%;
        padding: 14px;
    }

    .stat b {
        font-size: 18px;
    }

    .stat span {
        font-size: 10px;
        letter-spacing: 0.08em;
    }
}

/* ---------------- 打印 / 导出 PDF ---------------- */

@media print {
    @page {
        margin: 14mm;
    }

    body.report-page {
        background: #fff !important;
        color: #000;
    }

    body.report-page::before {
        display: none;
    }

    .report-header,
    .head-actions,
    .report-footer,
    .rc-actions,
    .overview {
        display: none !important;
    }

    .report-main {
        padding-top: 0;
    }

    .page-head {
        margin-bottom: 14px;
    }

    .report-card {
        break-inside: avoid;
        box-shadow: none;
        border-color: #ddd;
        padding: 14px 16px;
        margin-bottom: 10px;
    }

    .report-card::before {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .rc-tag {
        border-color: #ddd;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
