style.css 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. /* ============================================
  2. BCJD 导航 - 公共样式
  3. ============================================ */
  4. :root {
  5. --bg: #0b1020;
  6. --panel: rgba(255,255,255,.06);
  7. --panel-2: rgba(255,255,255,.10);
  8. --text: rgba(255,255,255,.92);
  9. --muted: rgba(255,255,255,.65);
  10. --border: rgba(255,255,255,.12);
  11. --shadow: 0 10px 30px rgba(0,0,0,.35);
  12. --accent: #6ea8ff;
  13. --accent2: #7cf7d4;
  14. --danger: #ff6b6b;
  15. --ok: #3ddc97;
  16. --max: 1120px;
  17. --radius: 18px;
  18. --radius-sm: 12px;
  19. --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  20. --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", Arial, sans-serif;
  21. }
  22. html[data-theme="light"] {
  23. --bg: #f6f7fb;
  24. --panel: rgba(0,0,0,.04);
  25. --panel-2: rgba(0,0,0,.06);
  26. --text: rgba(0,0,0,.88);
  27. --muted: rgba(0,0,0,.58);
  28. --border: rgba(0,0,0,.10);
  29. --shadow: 0 10px 30px rgba(0,0,0,.12);
  30. --accent: #245bdb;
  31. --accent2: #0aa37f;
  32. --danger: #d64545;
  33. --ok: #0a7f5f;
  34. }
  35. @media (prefers-color-scheme: light) {
  36. html:not([data-theme="dark"]) {
  37. --bg: #f6f7fb;
  38. --panel: rgba(0,0,0,.04);
  39. --panel-2: rgba(0,0,0,.06);
  40. --text: rgba(0,0,0,.88);
  41. --muted: rgba(0,0,0,.58);
  42. --border: rgba(0,0,0,.10);
  43. --shadow: 0 10px 30px rgba(0,0,0,.12);
  44. --accent: #245bdb;
  45. --accent2: #0aa37f;
  46. --danger: #d64545;
  47. --ok: #0a7f5f;
  48. }
  49. }
  50. * { box-sizing: border-box; }
  51. html { scroll-behavior: smooth; }
  52. body {
  53. margin: 0;
  54. min-height: 100vh;
  55. font-family: var(--sans);
  56. color: var(--text);
  57. background: var(--bg);
  58. }
  59. a { color: var(--accent); text-decoration: none; }
  60. a:hover { text-decoration: underline; }
  61. .wrap {
  62. max-width: var(--max);
  63. margin: 0 auto;
  64. padding: 30px 18px 44px;
  65. }
  66. /* ===== 按钮通用样式 ===== */
  67. button, .btn {
  68. height: 40px;
  69. display: inline-flex;
  70. align-items: center;
  71. justify-content: center;
  72. padding: 0 16px;
  73. border-radius: 999px;
  74. border: 1px solid var(--border);
  75. background: var(--panel);
  76. box-shadow: var(--shadow);
  77. color: var(--text);
  78. cursor: pointer;
  79. font-family: var(--sans);
  80. font-size: 13px;
  81. font-weight: 600;
  82. transition: background .15s;
  83. white-space: nowrap;
  84. }
  85. button:hover, .btn:hover {
  86. background: var(--panel-2);
  87. border-color: rgba(110,168,255,.28);
  88. }
  89. button:active { transform: translateY(1px); }
  90. .btn-primary {
  91. background: var(--accent);
  92. border-color: var(--accent);
  93. color: #fff;
  94. }
  95. .btn-primary:hover {
  96. opacity: .88;
  97. border-color: var(--accent);
  98. background: var(--accent);
  99. }
  100. .btn-danger {
  101. background: rgba(255,107,107,.15);
  102. border-color: rgba(255,107,107,.35);
  103. color: var(--danger);
  104. }
  105. .btn-danger:hover { background: rgba(255,107,107,.25); }
  106. .btn-sm {
  107. height: 34px;
  108. padding: 0 12px;
  109. font-size: 12px;
  110. }
  111. /* ===== 模态框通用 ===== */
  112. .modal-overlay {
  113. display: none;
  114. position: fixed;
  115. inset: 0;
  116. background: rgba(0,0,0,.55);
  117. backdrop-filter: blur(4px);
  118. z-index: 1000;
  119. align-items: center;
  120. justify-content: center;
  121. }
  122. .modal-overlay.active { display: flex; }
  123. .modal-box {
  124. max-width: 92vw;
  125. max-height: 90vh;
  126. overflow-y: auto;
  127. padding: 28px;
  128. border-radius: var(--radius);
  129. border: 1px solid var(--border);
  130. background: var(--bg);
  131. box-shadow: 0 20px 60px rgba(0,0,0,.5);
  132. }
  133. .modal-box h2 {
  134. margin: 0 0 6px;
  135. font-size: 20px;
  136. font-weight: 800;
  137. }
  138. .modal-box .btn-row {
  139. display: flex;
  140. gap: 10px;
  141. margin-top: 20px;
  142. }
  143. .modal-box .btn-row button {
  144. flex: 1;
  145. height: 44px;
  146. font-size: 14px;
  147. font-weight: 600;
  148. }
  149. .modal-box .modal-error {
  150. display: none;
  151. margin-top: 12px;
  152. padding: 10px 14px;
  153. border-radius: var(--radius-sm);
  154. background: rgba(255,107,107,.12);
  155. border: 1px solid rgba(255,107,107,.3);
  156. color: var(--danger);
  157. font-size: 13px;
  158. }
  159. /* ===== Toast 通知 ===== */
  160. .toast {
  161. display: none;
  162. position: fixed;
  163. bottom: 30px;
  164. left: 50%;
  165. transform: translateX(-50%);
  166. padding: 12px 24px;
  167. border-radius: 999px;
  168. background: var(--panel-2);
  169. border: 1px solid var(--border);
  170. backdrop-filter: blur(10px);
  171. box-shadow: var(--shadow);
  172. font-size: 14px;
  173. z-index: 999;
  174. }
  175. .toast.show { display: block; }
  176. .toast.success { border-color: rgba(61,220,151,.35); color: var(--ok); }
  177. .toast.error { border-color: rgba(255,107,107,.35); color: var(--danger); }
  178. /* ===== 表单通用 ===== */
  179. .form-group { margin-bottom: 16px; }
  180. .form-group label {
  181. display: block;
  182. font-size: 13px;
  183. font-weight: 600;
  184. margin-bottom: 6px;
  185. color: var(--muted);
  186. }
  187. .form-group input,
  188. .form-group select,
  189. .form-group textarea {
  190. width: 100%;
  191. height: 42px;
  192. padding: 0 14px;
  193. border-radius: 999px;
  194. border: 1px solid var(--border);
  195. background: var(--panel);
  196. color: var(--text);
  197. font-size: 14px;
  198. font-family: var(--sans);
  199. outline: none;
  200. transition: border-color .15s;
  201. }
  202. .form-group textarea {
  203. height: auto;
  204. min-height: 60px;
  205. padding: 10px 14px;
  206. border-radius: var(--radius-sm);
  207. resize: vertical;
  208. font-family: var(--mono);
  209. font-size: 13px;
  210. }
  211. .form-group input:focus,
  212. .form-group select:focus,
  213. .form-group textarea:focus { border-color: var(--accent); }
  214. .form-group select option { background: var(--bg); color: var(--text); }
  215. .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  216. .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
  217. .checkbox-row {
  218. display: flex;
  219. align-items: center;
  220. gap: 10px;
  221. margin-bottom: 16px;
  222. }
  223. .checkbox-row input[type="checkbox"] {
  224. width: 18px;
  225. height: 18px;
  226. accent-color: var(--accent);
  227. }
  228. /* ===== 前台首页专用样式 ===== */
  229. body.index-page {
  230. background:
  231. radial-gradient(1000px 520px at 12% 12%, rgba(110,168,255,.18), transparent 55%),
  232. radial-gradient(900px 460px at 88% 20%, rgba(124,247,212,.14), transparent 55%),
  233. radial-gradient(860px 520px at 35% 100%, rgba(255,107,107,.08), transparent 55%),
  234. var(--bg);
  235. }
  236. .index-page a { color: inherit; text-decoration: none; }
  237. .index-page header {
  238. display: flex;
  239. justify-content: space-between;
  240. align-items: flex-start;
  241. gap: 18px;
  242. margin-bottom: 18px;
  243. }
  244. .index-page .brand {
  245. display: flex;
  246. flex-direction: column;
  247. gap: 6px;
  248. }
  249. .index-page .brand h1 {
  250. margin: 0;
  251. font-size: 24px;
  252. font-weight: 800;
  253. letter-spacing: .2px;
  254. }
  255. .index-page .brand .sub {
  256. font-size: 13px;
  257. color: var(--muted);
  258. line-height: 1.45;
  259. }
  260. .index-page .toolbar {
  261. display: flex;
  262. align-items: center;
  263. justify-content: flex-end;
  264. gap: 10px;
  265. flex-wrap: wrap;
  266. }
  267. .index-page .pill {
  268. height: 42px;
  269. display: inline-flex;
  270. align-items: center;
  271. justify-content: center;
  272. padding: 0 14px;
  273. border-radius: 999px;
  274. border: 1px solid var(--border);
  275. background: var(--panel);
  276. box-shadow: var(--shadow);
  277. backdrop-filter: blur(10px);
  278. color: var(--text);
  279. font-family: var(--mono);
  280. white-space: nowrap;
  281. }
  282. .index-page .search {
  283. display: flex;
  284. align-items: center;
  285. gap: 10px;
  286. min-width: min(560px, 100%);
  287. margin-bottom: 22px;
  288. padding: 13px 14px;
  289. border-radius: 999px;
  290. border: 1px solid var(--border);
  291. background: var(--panel);
  292. backdrop-filter: blur(10px);
  293. box-shadow: var(--shadow);
  294. }
  295. .index-page .search input {
  296. width: 100%;
  297. border: 0;
  298. outline: none;
  299. background: transparent;
  300. color: var(--text);
  301. font-size: 14px;
  302. font-family: var(--sans);
  303. }
  304. .index-page .search input::placeholder { color: var(--muted); }
  305. .index-page .search kbd {
  306. padding: 3px 8px;
  307. border-radius: 8px;
  308. border: 1px solid var(--border);
  309. background: var(--panel-2);
  310. color: var(--muted);
  311. font-size: 12px;
  312. font-family: var(--mono);
  313. }
  314. .index-page .board {
  315. display: flex;
  316. flex-direction: column;
  317. gap: 22px;
  318. }
  319. .index-page .section-block {
  320. display: flex;
  321. flex-direction: column;
  322. gap: 12px;
  323. }
  324. .index-page .section {
  325. display: flex;
  326. align-items: flex-end;
  327. justify-content: space-between;
  328. gap: 10px;
  329. padding: 0 2px;
  330. }
  331. .index-page .section h2 {
  332. margin: 0;
  333. font-size: 13px;
  334. font-weight: 800;
  335. letter-spacing: .9px;
  336. text-transform: uppercase;
  337. color: var(--muted);
  338. }
  339. .index-page .section .hint {
  340. font-size: 12px;
  341. color: var(--muted);
  342. }
  343. .index-page .grid {
  344. display: grid;
  345. grid-template-columns: repeat(12, 1fr);
  346. gap: 14px;
  347. }
  348. .index-page .card {
  349. grid-column: span 4;
  350. min-height: 138px;
  351. padding: 14px 14px 12px;
  352. border-radius: var(--radius);
  353. border: 1px solid var(--border);
  354. background:
  355. linear-gradient(180deg, rgba(255,255,255,.06), transparent 26%),
  356. linear-gradient(180deg, var(--panel), transparent 120%);
  357. box-shadow: var(--shadow);
  358. backdrop-filter: blur(10px);
  359. display: flex;
  360. flex-direction: column;
  361. gap: 10px;
  362. position: relative;
  363. overflow: hidden;
  364. transition: transform .10s ease, border-color .15s ease, background .15s ease;
  365. }
  366. .index-page .card::before {
  367. content: "";
  368. position: absolute;
  369. top: 0; left: 0; right: 0;
  370. height: 1px;
  371. background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
  372. opacity: .75;
  373. pointer-events: none;
  374. }
  375. .index-page .card:hover {
  376. transform: translateY(-2px);
  377. border-color: rgba(110,168,255,.35);
  378. background:
  379. linear-gradient(180deg, rgba(255,255,255,.08), transparent 26%),
  380. linear-gradient(180deg, var(--panel-2), transparent 130%);
  381. }
  382. .index-page .card.private { border-left: 3px solid var(--danger); }
  383. .index-page .card .top {
  384. display: flex;
  385. align-items: flex-start;
  386. justify-content: space-between;
  387. gap: 10px;
  388. }
  389. .index-page .card .title {
  390. display: flex;
  391. align-items: center;
  392. gap: 10px;
  393. min-width: 0;
  394. }
  395. .index-page .card .icon {
  396. width: 40px;
  397. height: 40px;
  398. flex: 0 0 auto;
  399. display: grid;
  400. place-items: center;
  401. border-radius: 13px;
  402. border: 1px solid var(--border);
  403. background:
  404. radial-gradient(18px 18px at 30% 30%, rgba(124,247,212,.35), transparent 60%),
  405. radial-gradient(18px 18px at 70% 70%, rgba(110,168,255,.32), transparent 60%),
  406. rgba(255,255,255,.06);
  407. }
  408. .index-page .card .icon svg {
  409. width: 20px;
  410. height: 20px;
  411. opacity: .92;
  412. }
  413. .index-page .card .name {
  414. font-size: 15px;
  415. font-weight: 780;
  416. white-space: nowrap;
  417. overflow: hidden;
  418. text-overflow: ellipsis;
  419. }
  420. .index-page .card .meta {
  421. margin-top: 2px;
  422. color: var(--muted);
  423. font-size: 11px;
  424. font-family: var(--mono);
  425. white-space: nowrap;
  426. overflow: hidden;
  427. text-overflow: ellipsis;
  428. }
  429. .index-page .card .tags {
  430. display: flex;
  431. flex-wrap: wrap;
  432. gap: 8px;
  433. }
  434. .index-page .card .tag {
  435. padding: 4px 8px;
  436. border-radius: 999px;
  437. border: 1px solid var(--border);
  438. background: var(--panel-2);
  439. color: var(--muted);
  440. font-size: 11px;
  441. line-height: 1;
  442. }
  443. .index-page .card .tag.ok {
  444. color: var(--ok);
  445. border-color: rgba(61,220,151,.35);
  446. background: rgba(61,220,151,.10);
  447. }
  448. .index-page .card .tag.warn {
  449. color: var(--danger);
  450. border-color: rgba(255,107,107,.35);
  451. background: rgba(255,107,107,.08);
  452. }
  453. .index-page .card .desc {
  454. color: var(--muted);
  455. font-size: 13px;
  456. line-height: 1.4;
  457. display: -webkit-box;
  458. -webkit-line-clamp: 2;
  459. line-clamp: 2;
  460. -webkit-box-orient: vertical;
  461. overflow: hidden;
  462. min-height: 36px;
  463. }
  464. .index-page .card .actions {
  465. margin-top: auto;
  466. display: flex;
  467. align-items: center;
  468. justify-content: space-between;
  469. gap: 8px;
  470. }
  471. .index-page .card .go {
  472. display: inline-flex;
  473. align-items: center;
  474. gap: 8px;
  475. padding: 9px 12px;
  476. border-radius: var(--radius-sm);
  477. border: 1px solid rgba(110,168,255,.35);
  478. background: rgba(110,168,255,.14);
  479. font-size: 13px;
  480. font-weight: 730;
  481. }
  482. .index-page .card .go:hover { background: rgba(110,168,255,.20); }
  483. .index-page .card .small {
  484. max-width: 48%;
  485. white-space: nowrap;
  486. overflow: hidden;
  487. text-overflow: ellipsis;
  488. text-align: right;
  489. color: var(--muted);
  490. font-size: 12px;
  491. font-family: var(--mono);
  492. }
  493. .index-page .empty {
  494. display: none;
  495. padding: 18px 16px;
  496. border-radius: 16px;
  497. border: 1px dashed var(--border);
  498. background: var(--panel);
  499. color: var(--muted);
  500. text-align: center;
  501. }
  502. .index-page footer {
  503. margin-top: 24px;
  504. padding-top: 14px;
  505. border-top: 1px solid var(--border);
  506. display: flex;
  507. justify-content: space-between;
  508. gap: 12px;
  509. flex-wrap: wrap;
  510. color: var(--muted);
  511. font-size: 12px;
  512. }
  513. .mono { font-family: var(--mono); }
  514. @media (max-width: 980px) {
  515. .index-page .card { grid-column: span 6; }
  516. .index-page .search { min-width: 100%; }
  517. }
  518. @media (max-width: 640px) {
  519. .index-page header { flex-direction: column; align-items: stretch; }
  520. .index-page .toolbar { justify-content: flex-start; }
  521. .index-page .card { grid-column: span 12; }
  522. .index-page .card .small { display: none; }
  523. }
  524. /* ===== 管理面板专用样式 ===== */
  525. .admin-page header {
  526. display: flex;
  527. justify-content: space-between;
  528. align-items: center;
  529. gap: 18px;
  530. margin-bottom: 24px;
  531. }
  532. .admin-page header h1 {
  533. margin: 0;
  534. font-size: 22px;
  535. font-weight: 800;
  536. }
  537. .admin-page .header-actions {
  538. display: flex;
  539. gap: 10px;
  540. align-items: center;
  541. }
  542. .admin-page .tabs {
  543. display: flex;
  544. gap: 4px;
  545. margin-bottom: 24px;
  546. border-bottom: 1px solid var(--border);
  547. padding-bottom: 0;
  548. }
  549. .admin-page .tab {
  550. padding: 10px 18px;
  551. border-radius: 12px 12px 0 0;
  552. cursor: pointer;
  553. font-size: 14px;
  554. font-weight: 600;
  555. color: var(--muted);
  556. border: 1px solid transparent;
  557. border-bottom: none;
  558. transition: all .12s;
  559. background: transparent;
  560. }
  561. .admin-page .tab:hover { color: var(--text); background: var(--panel); }
  562. .admin-page .tab.active {
  563. color: var(--accent);
  564. border-color: var(--border);
  565. background: var(--panel);
  566. }
  567. .admin-page .tab-content { display: none; }
  568. .admin-page .tab-content.active { display: block; }
  569. .admin-page .link-item {
  570. display: flex;
  571. align-items: center;
  572. gap: 12px;
  573. padding: 12px 14px;
  574. border-radius: var(--radius-sm);
  575. border: 1px solid var(--border);
  576. background: var(--panel);
  577. margin-bottom: 8px;
  578. transition: background .12s;
  579. }
  580. .admin-page .link-item:hover { background: var(--panel-2); }
  581. .admin-page .link-item .info { flex: 1; min-width: 0; }
  582. .admin-page .link-item .info .title { font-weight: 700; font-size: 14px; }
  583. .admin-page .link-item .info .url {
  584. font-size: 12px;
  585. color: var(--muted);
  586. font-family: var(--mono);
  587. white-space: nowrap;
  588. overflow: hidden;
  589. text-overflow: ellipsis;
  590. }
  591. .admin-page .link-item .badge {
  592. font-size: 11px;
  593. padding: 3px 8px;
  594. border-radius: 999px;
  595. border: 1px solid var(--border);
  596. background: var(--panel-2);
  597. color: var(--muted);
  598. white-space: nowrap;
  599. }
  600. .admin-page .link-item .badge.private {
  601. border-color: rgba(255,107,107,.35);
  602. background: rgba(255,107,107,.08);
  603. color: var(--danger);
  604. }
  605. .admin-page .link-item .item-actions {
  606. display: flex;
  607. gap: 6px;
  608. flex-shrink: 0;
  609. }
  610. .admin-page .modal-box { width: 520px; }
  611. .admin-page .modal-box .btn-row { justify-content: flex-end; }
  612. @media (max-width: 720px) {
  613. .admin-page .form-row,
  614. .admin-page .form-row-3 { grid-template-columns: 1fr; }
  615. .admin-page .link-item { flex-wrap: wrap; }
  616. .admin-page .link-item .item-actions { width: 100%; justify-content: flex-end; }
  617. }
  618. /* ===== 登录模态框(前台首页) ===== */
  619. .index-page .modal-box {
  620. width: 380px;
  621. padding: 32px 28px 28px;
  622. }
  623. .index-page .modal-box p {
  624. margin: 0 0 20px;
  625. color: var(--muted);
  626. font-size: 14px;
  627. }
  628. .index-page .modal-box label {
  629. display: block;
  630. font-size: 13px;
  631. font-weight: 600;
  632. margin-bottom: 6px;
  633. color: var(--muted);
  634. }
  635. .index-page .modal-box input[type="password"] {
  636. width: 100%;
  637. height: 44px;
  638. padding: 0 14px;
  639. border-radius: 999px;
  640. border: 1px solid var(--border);
  641. background: var(--panel);
  642. color: var(--text);
  643. font-size: 15px;
  644. font-family: var(--sans);
  645. outline: none;
  646. transition: border-color .15s;
  647. }
  648. .index-page .modal-box input[type="password"]:focus { border-color: var(--accent); }