card.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. .cards-panel {
  2. margin-top: 32px;
  3. padding: 24px;
  4. background: #ffffff;
  5. border-radius: 20px;
  6. box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  7. display: flex;
  8. flex-direction: column;
  9. gap: 24px;
  10. }
  11. .cards-header {
  12. display: flex;
  13. justify-content: space-between;
  14. align-items: center;
  15. flex-wrap: wrap;
  16. gap: 12px;
  17. }
  18. .cards-title {
  19. font-size: 18px;
  20. font-weight: 600;
  21. color: #111827;
  22. }
  23. .cards-count {
  24. font-size: 14px;
  25. color: #6b7280;
  26. }
  27. .cards-grid {
  28. display: flex;
  29. flex-wrap: wrap;
  30. gap: 20px;
  31. }
  32. .sequence-card {
  33. flex: 1 1 calc(25% - 20px);
  34. min-width: 220px;
  35. max-width: 320px;
  36. background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  37. border-radius: 16px;
  38. border: 1px solid rgba(99, 102, 241, 0.15);
  39. box-shadow: 0 12px 30px rgba(99, 102, 241, 0.1);
  40. transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  41. cursor: pointer;
  42. display: flex;
  43. flex-direction: column;
  44. }
  45. .sequence-card:hover {
  46. transform: translateY(-6px);
  47. box-shadow: 0 18px 45px rgba(99, 102, 241, 0.18);
  48. border-color: rgba(99, 102, 241, 0.4);
  49. }
  50. .sequence-card.is-active {
  51. border-color: #6366f1;
  52. box-shadow: 0 22px 55px rgba(99, 102, 241, 0.3);
  53. }
  54. .card-content {
  55. display: flex;
  56. flex-direction: column;
  57. height: 100%;
  58. }
  59. .image-container {
  60. position: relative;
  61. width: 100%;
  62. padding: 12px;
  63. min-height: 180px;
  64. display: flex;
  65. align-items: center;
  66. justify-content: center;
  67. /* 棋盘格背景用于显示透明部分 */
  68. background-color: #fefefe;
  69. background-image:
  70. linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
  71. linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
  72. linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
  73. linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  74. background-size: 12px 12px;
  75. background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
  76. border-radius: 12px;
  77. }
  78. .card-image {
  79. max-width: 100%;
  80. max-height: 100%;
  81. object-fit: contain;
  82. image-rendering: pixelated;
  83. border-radius: 10px;
  84. }
  85. .card-footer {
  86. display: flex;
  87. align-items: center;
  88. justify-content: space-between;
  89. padding: 16px 18px;
  90. gap: 12px;
  91. }
  92. .card-label {
  93. font-size: 14px;
  94. font-weight: 600;
  95. color: #1f2937;
  96. text-transform: uppercase;
  97. letter-spacing: 0.04em;
  98. }
  99. .card-download-btn {
  100. width: 36px;
  101. height: 36px;
  102. border: none;
  103. border-radius: 999px;
  104. background: linear-gradient(135deg, #6366f1, #8b5cf6);
  105. color: #ffffff;
  106. display: flex;
  107. align-items: center;
  108. justify-content: center;
  109. cursor: pointer;
  110. transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  111. box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
  112. }
  113. .card-download-btn:hover {
  114. transform: scale(1.1);
  115. background: linear-gradient(135deg, #4f46e5, #7c3aed);
  116. }
  117. .card-download-btn:active {
  118. transform: scale(0.94);
  119. }
  120. .sequence-card .loading-spinner {
  121. position: absolute;
  122. top: 50%;
  123. left: 50%;
  124. width: 38px;
  125. height: 38px;
  126. border-radius: 50%;
  127. border: 3px solid #e0e7ff;
  128. border-top-color: #6366f1;
  129. animation: spin 0.8s linear infinite;
  130. transform: translate(-50%, -50%);
  131. }
  132. .sequence-card .image-error {
  133. position: absolute;
  134. top: 12px;
  135. right: 12px;
  136. padding: 6px 10px;
  137. font-size: 12px;
  138. border-radius: 6px;
  139. background: rgba(239, 68, 68, 0.9);
  140. color: #fff;
  141. }
  142. @keyframes spin {
  143. to {
  144. transform: translate(-50%, -50%) rotate(360deg);
  145. }
  146. }
  147. @media (max-width: 1200px) {
  148. .sequence-card {
  149. flex: 1 1 calc(33.333% - 20px);
  150. }
  151. }
  152. @media (max-width: 900px) {
  153. .sequence-card {
  154. flex: 1 1 calc(50% - 20px);
  155. }
  156. }
  157. @media (max-width: 600px) {
  158. .sequence-card {
  159. flex: 1 1 100%;
  160. }
  161. }
  162. /* ========================================
  163. 预览卡片 (主预览区域)
  164. ======================================== */
  165. .preview-card {
  166. width: 100%;
  167. height: 100%;
  168. display: flex;
  169. flex-direction: column;
  170. gap: 16px;
  171. }
  172. .preview-card-stage {
  173. width: 100%;
  174. flex: 1;
  175. border-radius: 16px;
  176. /* 棋盘格背景用于显示透明部分 */
  177. background-color: #f8f9fb;
  178. background-image:
  179. linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
  180. linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
  181. linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
  182. linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  183. background-size: 20px 20px;
  184. background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  185. min-height: 75vh;
  186. display: flex;
  187. align-items: center;
  188. justify-content: center;
  189. position: relative;
  190. overflow: hidden;
  191. border: 2px dashed #d1d5db;
  192. box-shadow: inset 0 0 0 1px #edf0f6;
  193. transition: all 0.3s ease;
  194. }
  195. .preview-card-stage.is-dragging {
  196. background: #f0f7ff;
  197. border: 3px dashed #3b82f6;
  198. box-shadow: inset 0 0 0 8px rgba(59, 130, 246, 0.1);
  199. }
  200. .preview-card-stage.is-dragging-invalid {
  201. background: #fef2f2;
  202. border: 3px dashed #ef4444;
  203. box-shadow: inset 0 0 0 8px rgba(239, 68, 68, 0.1);
  204. cursor: not-allowed;
  205. }
  206. .preview-card-stage.is-dragging-invalid::after {
  207. content: "🚫 不支持的内容";
  208. position: absolute;
  209. top: 50%;
  210. left: 50%;
  211. transform: translate(-50%, -50%);
  212. font-size: 20px;
  213. font-weight: 600;
  214. color: #dc2626;
  215. background: rgba(254, 242, 242, 0.95);
  216. padding: 16px 32px;
  217. border-radius: 12px;
  218. border: 2px solid #ef4444;
  219. pointer-events: none;
  220. z-index: 100;
  221. }
  222. .preview-card-stage.is-playing {
  223. border: none;
  224. background: #ffffff;
  225. box-shadow: none;
  226. }
  227. /* 顶部信息栏 */
  228. .preview-info-bar {
  229. position: absolute;
  230. top: 16px;
  231. left: 16px;
  232. right: 16px;
  233. display: flex;
  234. justify-content: space-between;
  235. align-items: center;
  236. z-index: 10;
  237. opacity: 0;
  238. transition: opacity 0.3s ease;
  239. }
  240. .preview-info-bar:not([hidden]) {
  241. opacity: 1;
  242. }
  243. .folder-info {
  244. display: flex;
  245. align-items: center;
  246. gap: 8px;
  247. padding: 8px 14px;
  248. background: rgba(255, 255, 255, 0.95);
  249. border-radius: 8px;
  250. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  251. backdrop-filter: blur(4px);
  252. }
  253. .folder-icon {
  254. color: #f59e0b;
  255. flex-shrink: 0;
  256. }
  257. .folder-name {
  258. font-size: 14px;
  259. font-weight: 600;
  260. color: #374151;
  261. max-width: 200px;
  262. overflow: hidden;
  263. text-overflow: ellipsis;
  264. white-space: nowrap;
  265. }
  266. /* 操作按钮组 */
  267. .preview-action-btns {
  268. display: flex;
  269. gap: 8px;
  270. }
  271. .btn-action {
  272. display: flex;
  273. align-items: center;
  274. justify-content: center;
  275. width: 40px;
  276. height: 40px;
  277. border: none;
  278. border-radius: 10px;
  279. color: white;
  280. cursor: pointer;
  281. backdrop-filter: blur(4px);
  282. transition: all 0.2s ease;
  283. }
  284. .btn-action.btn-ai {
  285. background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  286. box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
  287. }
  288. .btn-action.btn-ai:hover {
  289. background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  290. transform: translateY(-2px);
  291. box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  292. }
  293. .btn-action.btn-download {
  294. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  295. box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
  296. }
  297. .btn-action.btn-download:hover {
  298. background: linear-gradient(135deg, #7c8ef0 0%, #8a5fb8 100%);
  299. transform: translateY(-2px);
  300. box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  301. }
  302. .btn-action:active {
  303. transform: translateY(0);
  304. }
  305. .btn-action svg {
  306. width: 20px;
  307. height: 20px;
  308. }
  309. .btn-action .ai-icon {
  310. font-size: 14px;
  311. font-weight: 800;
  312. letter-spacing: -0.5px;
  313. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  314. }
  315. /* 旧的导出按钮样式(保留兼容性) */
  316. .btn-export {
  317. display: flex;
  318. align-items: center;
  319. justify-content: center;
  320. padding: 8px 16px;
  321. background: rgba(139, 92, 246, 0.95);
  322. border: none;
  323. border-radius: 8px;
  324. color: white;
  325. font-size: 13px;
  326. font-weight: 600;
  327. cursor: pointer;
  328. box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
  329. backdrop-filter: blur(4px);
  330. transition: all 0.2s ease;
  331. white-space: nowrap;
  332. }
  333. .btn-export:hover {
  334. background: rgba(124, 58, 237, 0.95);
  335. transform: translateY(-1px);
  336. box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  337. }
  338. .btn-export:active {
  339. transform: translateY(0);
  340. }
  341. .preview-card-stage .preview-image {
  342. max-width: 100%;
  343. max-height: 100%;
  344. object-fit: contain;
  345. image-rendering: pixelated;
  346. z-index: 1;
  347. }
  348. .preview-card-stage .preview-image:not([src]),
  349. .preview-card-stage .preview-image[src=""],
  350. .preview-card-stage .preview-image.is-hidden {
  351. opacity: 0;
  352. visibility: hidden;
  353. display: none;
  354. }
  355. .preview-card-stage .loading-overlay {
  356. position: absolute;
  357. inset: 0;
  358. display: flex;
  359. flex-direction: column;
  360. align-items: center;
  361. justify-content: center;
  362. gap: 20px;
  363. background: rgba(248, 249, 251, 0.92);
  364. backdrop-filter: blur(4px);
  365. z-index: 50;
  366. opacity: 0;
  367. visibility: hidden;
  368. transition: opacity 0.25s ease, visibility 0.25s ease;
  369. }
  370. .preview-card-stage .loading-overlay.is-visible {
  371. opacity: 1;
  372. visibility: visible;
  373. }
  374. .preview-card-stage .loading-spinner {
  375. width: 56px;
  376. height: 56px;
  377. border-radius: 50%;
  378. border: 4px solid rgba(59, 130, 246, 0.15);
  379. border-top-color: #3b82f6;
  380. animation: spin-preview 0.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  381. position: relative;
  382. }
  383. .preview-card-stage .loading-spinner::before {
  384. content: "";
  385. position: absolute;
  386. inset: -12px;
  387. border-radius: 50%;
  388. background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  389. animation: pulse-glow 1.5s ease-in-out infinite;
  390. }
  391. .preview-card-stage .loading-text {
  392. margin: 0;
  393. font-size: 14px;
  394. font-weight: 500;
  395. color: #6b7280;
  396. letter-spacing: 0.02em;
  397. animation: fade-pulse 1.5s ease-in-out infinite;
  398. }
  399. .preview-card-stage .image-error {
  400. position: absolute;
  401. top: 24px;
  402. left: 24px;
  403. padding: 10px 16px;
  404. border-radius: 12px;
  405. background: rgba(120, 124, 138, 0.92);
  406. color: #fff;
  407. font-size: 15px;
  408. z-index: 20;
  409. }
  410. .preview-card-stage .drop-hint {
  411. position: absolute;
  412. inset: 0;
  413. display: flex;
  414. align-items: center;
  415. justify-content: center;
  416. pointer-events: none;
  417. z-index: 5;
  418. }
  419. .preview-card-stage .drop-hint[hidden] {
  420. display: none;
  421. }
  422. .preview-card-stage .hint-text {
  423. margin: 0;
  424. padding: 0;
  425. font-size: 20px;
  426. font-weight: 600;
  427. color: #9ca3af;
  428. letter-spacing: 1px;
  429. text-align: center;
  430. }
  431. .preview-card-controls {
  432. width: 100%;
  433. flex-shrink: 0;
  434. background: transparent;
  435. padding: 16px 0;
  436. display: flex;
  437. align-items: center;
  438. justify-content: center;
  439. gap: 18px;
  440. flex-wrap: wrap;
  441. }
  442. .preview-card-controls .control-label {
  443. font-size: 14px;
  444. font-weight: 600;
  445. color: #9ca3af;
  446. letter-spacing: 0.1em;
  447. text-transform: uppercase;
  448. }
  449. .preview-card-controls .slider-container {
  450. display: flex;
  451. align-items: center;
  452. gap: 18px;
  453. flex: 1;
  454. max-width: 520px;
  455. padding: 16px 18px;
  456. border-radius: 18px;
  457. background: #f4f6fb;
  458. box-shadow: inset 0 0 0 1px #e7eaf2;
  459. }
  460. .preview-card-controls .fps-slider {
  461. flex: 1;
  462. height: 10px;
  463. -webkit-appearance: none;
  464. appearance: none;
  465. background: linear-gradient(90deg, #e5e7eb 0%, #c7ccd9 100%);
  466. border-radius: 999px;
  467. outline: none;
  468. cursor: pointer;
  469. transition: background 0.2s ease, box-shadow 0.2s ease;
  470. box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.08);
  471. }
  472. .preview-card-controls .fps-slider::-webkit-slider-runnable-track {
  473. height: 10px;
  474. border-radius: 999px;
  475. background: transparent;
  476. }
  477. .preview-card-controls .fps-slider::-webkit-slider-thumb {
  478. -webkit-appearance: none;
  479. appearance: none;
  480. width: 22px;
  481. height: 22px;
  482. background: #111827;
  483. border-radius: 50%;
  484. cursor: pointer;
  485. box-shadow: 0 6px 18px rgba(17, 24, 39, 0.25);
  486. transition: transform 0.2s ease, box-shadow 0.2s ease;
  487. margin-top: -6px;
  488. }
  489. .preview-card-controls .fps-slider::-webkit-slider-thumb:hover {
  490. transform: scale(1.15);
  491. box-shadow: 0 8px 22px rgba(17, 24, 39, 0.3);
  492. }
  493. .preview-card-controls .fps-slider::-webkit-slider-thumb:active {
  494. transform: scale(1.05);
  495. }
  496. .preview-card-controls .fps-value {
  497. min-width: 88px;
  498. padding: 8px 14px;
  499. background: #111827;
  500. color: #ffffff;
  501. border-radius: 10px;
  502. font-size: 15px;
  503. font-weight: 600;
  504. text-align: center;
  505. font-family: "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  506. box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  507. }
  508. @keyframes spin-preview {
  509. to {
  510. transform: rotate(360deg);
  511. }
  512. }
  513. @keyframes pulse-glow {
  514. 0%, 100% {
  515. transform: scale(0.9);
  516. opacity: 0.5;
  517. }
  518. 50% {
  519. transform: scale(1.1);
  520. opacity: 1;
  521. }
  522. }
  523. @keyframes fade-pulse {
  524. 0%, 100% {
  525. opacity: 0.6;
  526. }
  527. 50% {
  528. opacity: 1;
  529. }
  530. }
  531. @media (max-width: 900px) {
  532. .preview-card-stage {
  533. min-height: 60vh;
  534. }
  535. .preview-card-controls {
  536. flex-direction: column;
  537. }
  538. .preview-card-controls .slider-container {
  539. width: 100%;
  540. }
  541. }