lineage.wxss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. /* ════════════════════════════════
  2. 全局
  3. ════════════════════════════════ */
  4. .page {
  5. min-height: 100vh;
  6. background: #0d1b2a;
  7. padding-bottom: 40rpx;
  8. }
  9. /* ════════════════════════════════
  10. 搜索栏
  11. ════════════════════════════════ */
  12. .search-bar {
  13. display: flex;
  14. align-items: center;
  15. padding: 24rpx 24rpx 16rpx;
  16. gap: 16rpx;
  17. background: #0d1b2a;
  18. position: sticky;
  19. top: 0;
  20. z-index: 100;
  21. }
  22. .search-input-wrap {
  23. flex: 1;
  24. display: flex;
  25. align-items: center;
  26. background: #1a2e42;
  27. border-radius: 48rpx;
  28. padding: 0 24rpx;
  29. height: 76rpx;
  30. border: 1rpx solid #2d4a63;
  31. }
  32. .search-icon {
  33. font-size: 30rpx;
  34. margin-right: 12rpx;
  35. }
  36. .search-input {
  37. flex: 1;
  38. font-size: 28rpx;
  39. color: #e8f0fe;
  40. }
  41. .search-input::placeholder {
  42. color: #4a6580;
  43. }
  44. .clear-btn {
  45. font-size: 26rpx;
  46. color: #4a6580;
  47. padding: 8rpx;
  48. }
  49. .search-btn {
  50. background: #c8960c;
  51. color: #fff;
  52. font-size: 28rpx;
  53. font-weight: bold;
  54. border-radius: 48rpx;
  55. padding: 0 32rpx;
  56. height: 76rpx;
  57. line-height: 76rpx;
  58. border: none;
  59. flex-shrink: 0;
  60. }
  61. .search-btn::after {
  62. border: none;
  63. }
  64. /* ════════════════════════════════
  65. 搜索下拉
  66. ════════════════════════════════ */
  67. .search-dropdown {
  68. margin: 0 24rpx 8rpx;
  69. background: #1a2e42;
  70. border-radius: 16rpx;
  71. border: 1rpx solid #2d4a63;
  72. overflow: hidden;
  73. z-index: 99;
  74. position: relative;
  75. }
  76. .search-item {
  77. display: flex;
  78. justify-content: space-between;
  79. align-items: center;
  80. padding: 24rpx 32rpx;
  81. border-bottom: 1rpx solid #243a50;
  82. }
  83. .search-item:last-child {
  84. border-bottom: none;
  85. }
  86. .si-name {
  87. font-size: 30rpx;
  88. color: #e8f0fe;
  89. font-weight: 500;
  90. }
  91. .si-gen {
  92. font-size: 24rpx;
  93. color: #6b8fa8;
  94. flex-shrink: 0;
  95. margin-left: 16rpx;
  96. }
  97. /* ════════════════════════════════
  98. 空状态 / 加载
  99. ════════════════════════════════ */
  100. .empty-state {
  101. display: flex;
  102. flex-direction: column;
  103. align-items: center;
  104. padding: 120rpx 48rpx;
  105. gap: 20rpx;
  106. }
  107. .empty-icon {
  108. font-size: 100rpx;
  109. }
  110. .empty-title {
  111. font-size: 36rpx;
  112. color: #e8f0fe;
  113. font-weight: bold;
  114. }
  115. .empty-desc {
  116. font-size: 26rpx;
  117. color: #4a6580;
  118. text-align: center;
  119. line-height: 1.6;
  120. }
  121. .loading-state {
  122. display: flex;
  123. flex-direction: column;
  124. align-items: center;
  125. padding: 80rpx;
  126. gap: 20rpx;
  127. color: #6b8fa8;
  128. font-size: 28rpx;
  129. }
  130. .debug-bar {
  131. background: #1a3a1a;
  132. padding: 12rpx 24rpx;
  133. margin: 0 24rpx 8rpx;
  134. border-radius: 8rpx;
  135. border: 1rpx solid #2a5a2a;
  136. }
  137. .debug-text {
  138. font-size: 22rpx;
  139. color: #6abf6a;
  140. }
  141. /* ════════════════════════════════
  142. 世系树主体
  143. ════════════════════════════════ */
  144. .tree-scroll {
  145. /* 搜索栏约140rpx + 调试栏约50rpx + 自定义tabBar约130rpx */
  146. height: calc(100vh - 320rpx);
  147. }
  148. .tree-body {
  149. padding: 16rpx 0 120rpx;
  150. display: flex;
  151. flex-direction: column;
  152. align-items: center;
  153. }
  154. /* ── 每代行 ── */
  155. .gen-row {
  156. width: 100%;
  157. display: flex;
  158. flex-direction: column;
  159. align-items: center;
  160. padding: 0 16rpx;
  161. box-sizing: border-box;
  162. }
  163. .gen-label {
  164. padding: 4rpx 0 12rpx 0;
  165. text-align: center;
  166. }
  167. .gen-label-text {
  168. font-size: 22rpx;
  169. color: #4a6580;
  170. letter-spacing: 1rpx;
  171. }
  172. .gen-label-center .gen-label-text {
  173. color: #c8960c;
  174. font-weight: bold;
  175. font-size: 24rpx;
  176. }
  177. .children-label {
  178. padding: 4rpx 0 12rpx 0;
  179. width: 100%;
  180. text-align: center;
  181. }
  182. .children-label-text {
  183. font-size: 22rpx;
  184. color: #4a6580;
  185. letter-spacing: 1rpx;
  186. }
  187. /* ── 卡片行(主节点 + 兄弟) ── */
  188. .row-cards {
  189. width: 100%;
  190. display: flex;
  191. align-items: flex-start;
  192. gap: 16rpx;
  193. overflow-x: auto;
  194. padding: 0 24rpx;
  195. box-sizing: border-box;
  196. }
  197. .center-row {
  198. align-items: stretch;
  199. }
  200. /* ── 通用卡片 ── */
  201. .card {
  202. border-radius: 16rpx;
  203. padding: 16rpx 20rpx;
  204. display: flex;
  205. flex-direction: column;
  206. gap: 6rpx;
  207. flex-shrink: 0;
  208. width: 200rpx;
  209. min-width: 200rpx;
  210. max-width: 200rpx;
  211. overflow: hidden;
  212. box-sizing: border-box;
  213. }
  214. .card-name-wrap {
  215. display: flex;
  216. align-items: baseline;
  217. gap: 6rpx;
  218. flex-wrap: nowrap;
  219. overflow: hidden;
  220. }
  221. .card-name {
  222. font-size: 30rpx;
  223. font-weight: bold;
  224. color: #fff;
  225. overflow: hidden;
  226. text-overflow: ellipsis;
  227. white-space: nowrap;
  228. flex-shrink: 1;
  229. min-width: 0;
  230. }
  231. .card-name-sm {
  232. font-size: 28rpx;
  233. }
  234. .card-simplified {
  235. font-size: 20rpx;
  236. color: rgba(255,255,255,0.65);
  237. overflow: hidden;
  238. text-overflow: ellipsis;
  239. white-space: nowrap;
  240. flex-shrink: 1;
  241. min-width: 0;
  242. }
  243. .card-gen {
  244. font-size: 20rpx;
  245. color: rgba(255,255,255,0.55);
  246. line-height: 1.4;
  247. overflow: hidden;
  248. text-overflow: ellipsis;
  249. white-space: nowrap;
  250. }
  251. /* ── 祖先卡 ── */
  252. .ancestor-card {
  253. background: linear-gradient(135deg, #1e3a5f 0%, #2a5298 100%);
  254. box-shadow: 0 4rpx 16rpx rgba(42, 82, 152, 0.4);
  255. border: 1rpx solid #2d5ea8;
  256. }
  257. /* ── 祖先行横向滚动(主卡 + 兄弟同行,scroll-into-view 使祖先居中) ── */
  258. .gen-peer-scroll {
  259. width: 100%;
  260. white-space: nowrap;
  261. }
  262. .gen-peer-list {
  263. display: flex;
  264. align-items: flex-start;
  265. gap: 16rpx;
  266. /* 两端留出约半屏宽度,让 scroll-into-view 能把目标卡片滚到屏幕中央 */
  267. padding: 0 275rpx;
  268. }
  269. /* ── 兄弟卡(旧 sibling-scroll 保留兼容) ── */
  270. .sibling-scroll {
  271. flex: 1;
  272. white-space: nowrap;
  273. }
  274. .sibling-list {
  275. display: flex;
  276. gap: 12rpx;
  277. padding-right: 8rpx;
  278. }
  279. /* ── 统一排行徽标 ── */
  280. .order-badge {
  281. background: rgba(255,255,255,0.18);
  282. border-radius: 8rpx;
  283. padding: 3rpx 12rpx;
  284. align-self: flex-start;
  285. margin-bottom: 6rpx;
  286. }
  287. .order-badge-text {
  288. font-size: 20rpx;
  289. color: rgba(255,255,255,0.92);
  290. font-weight: bold;
  291. }
  292. /* ── 查询人物同辈横排(含center居中) ── */
  293. .peer-scroll {
  294. width: 100%;
  295. white-space: nowrap;
  296. }
  297. .peer-list {
  298. display: flex;
  299. align-items: flex-start;
  300. gap: 16rpx;
  301. padding: 0 275rpx;
  302. }
  303. .peer-order-badge {
  304. background: rgba(255,255,255,0.15);
  305. border-radius: 8rpx;
  306. padding: 4rpx 12rpx;
  307. align-self: flex-start;
  308. margin-bottom: 6rpx;
  309. }
  310. .order-badge-center {
  311. background: rgba(255,255,255,0.25);
  312. }
  313. .peer-order-text {
  314. font-size: 20rpx;
  315. color: rgba(255,255,255,0.9);
  316. font-weight: bold;
  317. }
  318. .center-badge {
  319. font-size: 20rpx;
  320. color: rgba(255,255,255,0.9);
  321. background: rgba(0,0,0,0.2);
  322. border-radius: 20rpx;
  323. padding: 4rpx 16rpx;
  324. margin-top: 8rpx;
  325. align-self: center;
  326. }
  327. .sibling-card {
  328. background: #1a3a5c;
  329. border: 1rpx solid #2d5280;
  330. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.2);
  331. }
  332. .sibling-card .card-name {
  333. color: #a8c8f0;
  334. }
  335. .sibling-card .card-gen {
  336. color: #4a6a8a;
  337. }
  338. /* ── 查询人物卡(比普通卡略宽突出显示) ── */
  339. .center-card {
  340. background: linear-gradient(135deg, #b07d10 0%, #d4a017 100%);
  341. width: 220rpx;
  342. min-width: 220rpx;
  343. max-width: 220rpx;
  344. box-shadow: 0 4rpx 24rpx rgba(212, 160, 23, 0.5);
  345. border: 2rpx solid #e0b030;
  346. }
  347. .center-name {
  348. font-size: 32rpx;
  349. color: #fff;
  350. overflow: hidden;
  351. text-overflow: ellipsis;
  352. white-space: nowrap;
  353. flex-shrink: 1;
  354. min-width: 0;
  355. }
  356. .center-simplified {
  357. font-size: 20rpx;
  358. color: rgba(255,255,255,0.8);
  359. overflow: hidden;
  360. text-overflow: ellipsis;
  361. white-space: nowrap;
  362. flex-shrink: 1;
  363. min-width: 0;
  364. }
  365. .center-gen {
  366. font-size: 20rpx;
  367. color: rgba(255,255,255,0.75);
  368. overflow: hidden;
  369. text-overflow: ellipsis;
  370. white-space: nowrap;
  371. }
  372. /* ── 子女区域 ── */
  373. .children-section {
  374. width: 100%;
  375. padding: 0 16rpx;
  376. box-sizing: border-box;
  377. }
  378. .children-scroll {
  379. white-space: nowrap;
  380. width: 100%;
  381. }
  382. .children-list {
  383. display: flex;
  384. gap: 16rpx;
  385. padding: 0 275rpx 8rpx;
  386. }
  387. .child-card {
  388. background: linear-gradient(135deg, #1a3a2a 0%, #1e5c35 100%);
  389. border: 1rpx solid #2a7a45;
  390. box-shadow: 0 2rpx 10rpx rgba(30, 92, 53, 0.4);
  391. }
  392. .child-order-badge {
  393. background: rgba(255,255,255,0.15);
  394. border-radius: 8rpx;
  395. padding: 4rpx 12rpx;
  396. align-self: flex-start;
  397. margin-bottom: 4rpx;
  398. }
  399. .child-order-text {
  400. font-size: 20rpx;
  401. color: rgba(255,255,255,0.9);
  402. font-weight: bold;
  403. }
  404. .has-children-dot {
  405. font-size: 18rpx;
  406. color: rgba(255,255,255,0.4);
  407. align-self: center;
  408. margin-top: 4rpx;
  409. }
  410. /* ── 连接线(始终对齐屏幕中心) ── */
  411. .connector {
  412. display: flex;
  413. justify-content: center;
  414. width: 100%;
  415. height: 48rpx;
  416. align-items: center;
  417. }
  418. .connector-line {
  419. width: 3rpx;
  420. height: 48rpx;
  421. background: linear-gradient(to bottom, #2a5298, #4a6580);
  422. border-radius: 2rpx;
  423. }
  424. /* ════════════════════════════════
  425. 详情弹窗
  426. ════════════════════════════════ */
  427. .modal-mask {
  428. position: fixed;
  429. top: 0; left: 0; right: 0; bottom: 0;
  430. background: rgba(0, 0, 0, 0.7);
  431. display: flex;
  432. align-items: flex-end;
  433. z-index: 200;
  434. }
  435. .modal-box {
  436. width: 100%;
  437. background: #1a2e42;
  438. border-radius: 32rpx 32rpx 0 0;
  439. padding: 32rpx 32rpx 48rpx;
  440. max-height: 80vh;
  441. overflow-y: auto;
  442. }
  443. .modal-header {
  444. display: flex;
  445. justify-content: space-between;
  446. align-items: center;
  447. margin-bottom: 32rpx;
  448. }
  449. .modal-title {
  450. font-size: 34rpx;
  451. font-weight: bold;
  452. color: #e8f0fe;
  453. }
  454. .modal-close {
  455. font-size: 28rpx;
  456. color: #4a6580;
  457. padding: 8rpx 16rpx;
  458. }
  459. .modal-body {
  460. margin-bottom: 32rpx;
  461. }
  462. .detail-row {
  463. display: flex;
  464. padding: 18rpx 0;
  465. border-bottom: 1rpx solid #243a50;
  466. }
  467. .detail-row:last-child {
  468. border-bottom: none;
  469. }
  470. .dl {
  471. font-size: 26rpx;
  472. color: #4a6580;
  473. width: 140rpx;
  474. flex-shrink: 0;
  475. }
  476. .dv {
  477. font-size: 26rpx;
  478. color: #c8daf0;
  479. flex: 1;
  480. }
  481. .modal-footer {
  482. display: flex;
  483. gap: 20rpx;
  484. }
  485. .modal-btn {
  486. flex: 1;
  487. height: 88rpx;
  488. line-height: 88rpx;
  489. border-radius: 44rpx;
  490. font-size: 28rpx;
  491. font-weight: bold;
  492. border: none;
  493. }
  494. .modal-btn::after {
  495. border: none;
  496. }
  497. .btn-switch {
  498. background: linear-gradient(135deg, #b07d10, #d4a017);
  499. color: #fff;
  500. }
  501. .btn-close {
  502. background: #243a50;
  503. color: #a8c8f0;
  504. }