Files

297 lines
14 KiB
CSS

/* ═══════════════════════════════════════════════════════════
天赋测评报告 · Apple 风格(独立样式,变量与 style.css 一致)
屏幕版:卡片流 / 打印版:A4 分页
═══════════════════════════════════════════════════════════ */
:root {
--bg: #f5f5f7;
--surface: #ffffff;
--surface-2: #fbfbfd;
--text: #1d1d1f;
--text-2: #86868b;
--hairline: rgba(0, 0, 0, .09);
--blue: #0071e3;
--blue-hover: #0077ed;
--green: #34c759;
--red: #ff3b30;
--orange: #ff9500;
--orange-red: #ff5e3b;
--radius-lg: 18px;
--radius-md: 14px;
--radius-pill: 980px;
--shadow-card: 0 2px 8px rgba(0, 0, 0, .03), 0 10px 26px rgba(0, 0, 0, .04);
--font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
"PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
font-size: 14px;
line-height: 1.45;
-webkit-font-smoothing: antialiased;
}
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }
[hidden] { display: none !important; } /* 防止 .report{display:flex} 覆盖 hidden 属性 */
/* ── 按钮(苹果胶囊,与 style.css 同款) ───────────────── */
.btn {
display: inline-flex; align-items: center; justify-content: center;
padding: 8px 16px; border-radius: var(--radius-pill);
font-size: 13.5px; font-weight: 500; letter-spacing: .01em;
transition: background .18s ease, transform .12s ease, opacity .18s ease;
user-select: none; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-hover); }
.btn-secondary {
background: var(--surface); color: var(--text);
border: 1px solid var(--hairline); box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.btn-secondary:hover:not(:disabled) { background: #f2f2f4; }
.btn-ghost { color: var(--blue); padding: 6px 12px; }
.btn-ghost:hover { opacity: .75; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.logo-dot {
width: 12px; height: 12px; border-radius: 50%;
background: conic-gradient(from 210deg, #0071e3, #8e8e93 40%, #1d1d1f 70%, #0071e3);
display: inline-block; margin-right: 8px; flex: none;
}
/* ── 顶部毛玻璃导航 + 工具条(仅屏幕显示) ─────────────── */
.nav {
position: sticky; top: 0; z-index: 50;
background: rgba(255, 255, 255, .72);
-webkit-backdrop-filter: saturate(180%) blur(20px);
backdrop-filter: saturate(180%) blur(20px);
border-bottom: 1px solid var(--hairline);
}
.nav-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; height: 46px; display: flex; align-items: center; gap: 18px; }
.brand { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--text); text-decoration: none; display: flex; align-items: center; }
.nav-status { flex: 1; font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.nav-status:not(:empty)::before {
content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none;
background: var(--green); box-shadow: 0 0 0 3px rgba(52,199,89,.18);
}
.nav-right { display: flex; align-items: center; gap: 8px; }
/* ═══════════════ 报告卡片流 ═══════════════ */
.report {
max-width: 980px; margin: 0 auto; padding: 26px 16px 64px;
display: flex; flex-direction: column; gap: 22px;
animation: rise .5s cubic-bezier(.28,.8,.3,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; } }
.card {
background: var(--surface); border: 1px solid var(--hairline);
border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
padding: 34px 38px 30px;
}
/* 苹果大字标题 */
.sec-kicker {
font-size: 12px; font-weight: 600; color: var(--blue);
text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px;
}
.sec-title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.sec-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
/* ── 胶囊徽章(分级:超强蓝 / 优势绿 / 常值灰 / 弱势橙红) ── */
.badge {
display: inline-flex; align-items: center; flex: none;
padding: 4px 12px; border-radius: var(--radius-pill);
font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.badge-super { color: var(--blue); background: rgba(0, 113, 227, .1); }
.badge-adv { color: #248a3d; background: rgba(52, 199, 89, .13); }
.badge-mid { color: #6e6e73; background: rgba(120, 120, 128, .12); }
.badge-weak { color: #d70015; background: rgba(255, 94, 59, .12); }
/* ── 1. 封面 ── */
.cover {
display: flex; flex-direction: column; align-items: center; justify-content: center;
text-align: center; min-height: 560px; gap: 6px; padding: 48px 38px;
}
.cover .logo-dot { width: 26px; height: 26px; margin: 0 0 18px; }
.cover h1 { font-size: 46px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.cover-sub { color: var(--text-2); font-size: 17px; margin-top: 6px; }
.cover-meta { display: flex; gap: 46px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }
.cover-meta div { display: flex; flex-direction: column; gap: 5px; }
.cover-meta small { color: var(--text-2); font-size: 12px; }
.cover-meta b { font-size: 16px; font-weight: 600; }
/* ── 2. 个人信息 ── */
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.info-item {
background: var(--surface-2); border: 1px solid var(--hairline);
border-radius: var(--radius-md); padding: 14px 16px;
}
.info-item small { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.info-item b { font-size: 16px; font-weight: 600; word-break: break-all; }
/* ── 3. 脑潜量 TRC ── */
.trc-hero { display: flex; align-items: center; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.trc-num { font-size: 64px; font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.trc-unit { font-size: 15px; color: var(--text-2); font-weight: 500; }
.scale { margin: 34px 6px 0; }
.scale-track {
position: relative; height: 8px; border-radius: 4px;
background: linear-gradient(90deg, #e8e8ed, #98989d 38%, var(--green) 68%, var(--blue));
}
.scale-ptr {
position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px;
background: var(--text); border-radius: 1px; transition: left .4s cubic-bezier(.28,.8,.3,1);
}
.scale-ptr em {
position: absolute; top: -27px; left: 50%; transform: translateX(-50%);
font-style: normal; font-size: 12.5px; font-weight: 700; color: #fff;
background: var(--text); padding: 2px 9px; border-radius: var(--radius-pill);
white-space: nowrap;
}
.scale-ticks { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.advice-text { font-size: 14px; line-height: 1.75; color: #424245; margin-top: 18px; }
/* ── 4. 五大功能脑区 ── */
.brain-bars { display: grid; gap: 13px; margin-top: 20px; }
.rbar { display: grid; grid-template-columns: 120px 1fr 48px; align-items: center; gap: 12px; }
.rbar-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.rbar-name small { display: block; color: var(--text-2); font-size: 11px; font-weight: 400; margin-top: 1px; }
.rbar-track { height: 9px; border-radius: 4.5px; background: rgba(120, 120, 128, .15); overflow: hidden; }
.rbar-track i {
display: block; height: 100%; width: 0; border-radius: 4.5px; background: var(--blue);
transition: width .5s cubic-bezier(.28,.8,.3,1);
}
.rbar b { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
/* ── 5. 十大天赋潜能总表 ── */
.table-wrap { margin-top: 16px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
font-size: 11.5px; font-weight: 600; color: var(--text-2); text-transform: uppercase;
letter-spacing: .04em; text-align: left; padding: 8px 10px;
border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
td { padding: 10px; font-size: 13.5px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.05); font-size: 12.5px; font-weight: 600; }
td small.sub { display: block; color: var(--text-2); font-size: 11px; margin-top: 1px; }
/* ── 6. 逐项详解 ── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.detail-card {
background: var(--surface-2); border: 1px solid var(--hairline);
border-radius: var(--radius-md); padding: 18px;
display: flex; flex-direction: column; gap: 10px;
}
.detail-head { display: flex; align-items: center; gap: 10px; }
.detail-head h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; flex: 1; min-width: 0; }
.detail-code {
font-size: 11px; font-weight: 600; color: var(--blue);
background: rgba(0, 113, 227, .08); border: 1px solid rgba(0, 113, 227, .18);
padding: 2px 8px; border-radius: var(--radius-pill); flex: none;
}
.detail-meta { font-size: 12.5px; color: var(--text-2); }
.detail-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.detail-strength { display: flex; align-items: baseline; gap: 6px; }
.detail-strength b { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.detail-strength span { font-size: 12.5px; color: var(--text-2); }
.detail-advice { list-style: none; display: grid; gap: 6px; }
.detail-advice li {
position: relative; padding-left: 16px; font-size: 12.5px; line-height: 1.65; color: #424245;
}
.detail-advice li::before {
content: ""; position: absolute; left: 2px; top: 8px;
width: 5px; height: 5px; border-radius: 50%; background: var(--blue);
}
/* ── 7. 学习风格结论 ── */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.trio-card {
background: var(--surface-2); border: 1px solid var(--hairline);
border-radius: var(--radius-md); padding: 22px 20px;
display: flex; flex-direction: column; gap: 8px;
}
.trio-card small { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.trio-card b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--blue); }
.trio-card p { font-size: 13px; line-height: 1.7; color: #424245; }
/* ── 8. 10Q 雷达图 ── */
#radar { display: block; width: min(480px, 100%); height: auto; margin: 8px auto 16px; }
.radar-grid { fill: none; stroke: rgba(0, 0, 0, .08); }
.radar-grid.outer { stroke: rgba(0, 0, 0, .16); }
.radar-axis { stroke: rgba(0, 0, 0, .07); }
.radar-data { fill: rgba(0, 113, 227, .16); stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; }
.radar-dot { fill: var(--blue); }
.radar-label { font-size: 12px; fill: #6e6e73; font-weight: 500; }
.radar-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.lg-item { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 4px 2px; border-bottom: 1px solid var(--hairline); }
.lg-item:last-child { border-bottom: none; }
.lg-code {
flex: none; min-width: 34px; text-align: center; font-size: 11px; font-weight: 600;
color: var(--blue); background: rgba(0, 113, 227, .08);
padding: 2px 7px; border-radius: var(--radius-pill); font-variant-numeric: tabular-nums;
}
.lg-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-item b { font-variant-numeric: tabular-nums; color: var(--text); }
/* ── 9. 学习建议 ── */
.pill-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; margin-top: 18px; }
.pill-group h3 { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.pill-group h3 em { font-style: normal; font-size: 11px; color: var(--text-2); font-weight: 500; margin-left: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
padding: 5px 14px; border-radius: var(--radius-pill);
font-size: 13px; font-weight: 500; white-space: nowrap;
}
.pill.strong { background: rgba(52, 199, 89, .12); color: #248a3d; }
.pill.weak { background: rgba(255, 94, 59, .1); color: #d70015; }
.pill.none { background: rgba(120, 120, 128, .1); color: var(--text-2); }
/* ── 加载 / 失败态 ── */
.state-card { text-align: center; padding: 90px 30px; }
.state-card .sec-title { margin-bottom: 8px; }
.state-card p { color: var(--text-2); margin-bottom: 20px; }
/* ── 窄屏 ── */
@media (max-width: 760px) {
.card { padding: 24px 20px; }
.cover h1 { font-size: 34px; }
.info-grid { grid-template-columns: 1fr 1fr; }
.detail-grid, .trio, .radar-legend, .pill-groups { grid-template-columns: 1fr; }
.trc-num { font-size: 52px; }
}
/* 滚动条 */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.16); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.26); }
::-webkit-scrollbar-track { background: transparent; }
/* ═══════════════ 打印版:A4 分页,每章一页 ═══════════════ */
@media print {
@page { size: A4; margin: 12mm; }
html, body { background: #fff; }
.no-print { display: none !important; }
* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.report { max-width: none; padding: 0; gap: 0; }
.card {
box-shadow: none; border: none; border-radius: 0;
padding: 6mm 4mm;
page-break-after: always; break-after: page;
}
.card:last-child { page-break-after: auto; break-after: auto; }
.cover { min-height: 245mm; padding: 0; }
.cover h1 { font-size: 40px; }
.trc-num { font-size: 56px; }
.rbar-track i, .pbar-track i, .scale-ptr { transition: none; }
}