card.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  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. .btn-export {
  267. display: flex;
  268. align-items: center;
  269. justify-content: center;
  270. padding: 8px 16px;
  271. background: rgba(139, 92, 246, 0.95);
  272. border: none;
  273. border-radius: 8px;
  274. color: white;
  275. font-size: 13px;
  276. font-weight: 600;
  277. cursor: pointer;
  278. box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
  279. backdrop-filter: blur(4px);
  280. transition: all 0.2s ease;
  281. white-space: nowrap;
  282. }
  283. .btn-export:hover {
  284. background: rgba(124, 58, 237, 0.95);
  285. transform: translateY(-1px);
  286. box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  287. }
  288. .btn-export:active {
  289. transform: translateY(0);
  290. }
  291. .preview-card-stage .preview-image {
  292. max-width: 100%;
  293. max-height: 100%;
  294. object-fit: contain;
  295. image-rendering: pixelated;
  296. z-index: 1;
  297. }
  298. .preview-card-stage .preview-image:not([src]),
  299. .preview-card-stage .preview-image[src=""],
  300. .preview-card-stage .preview-image.is-hidden {
  301. opacity: 0;
  302. visibility: hidden;
  303. display: none;
  304. }
  305. .preview-card-stage .loading-overlay {
  306. position: absolute;
  307. inset: 0;
  308. display: flex;
  309. flex-direction: column;
  310. align-items: center;
  311. justify-content: center;
  312. gap: 20px;
  313. background: rgba(248, 249, 251, 0.92);
  314. backdrop-filter: blur(4px);
  315. z-index: 50;
  316. opacity: 0;
  317. visibility: hidden;
  318. transition: opacity 0.25s ease, visibility 0.25s ease;
  319. }
  320. .preview-card-stage .loading-overlay.is-visible {
  321. opacity: 1;
  322. visibility: visible;
  323. }
  324. .preview-card-stage .loading-spinner {
  325. width: 56px;
  326. height: 56px;
  327. border-radius: 50%;
  328. border: 4px solid rgba(59, 130, 246, 0.15);
  329. border-top-color: #3b82f6;
  330. animation: spin-preview 0.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  331. position: relative;
  332. }
  333. .preview-card-stage .loading-spinner::before {
  334. content: "";
  335. position: absolute;
  336. inset: -12px;
  337. border-radius: 50%;
  338. background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  339. animation: pulse-glow 1.5s ease-in-out infinite;
  340. }
  341. .preview-card-stage .loading-text {
  342. margin: 0;
  343. font-size: 14px;
  344. font-weight: 500;
  345. color: #6b7280;
  346. letter-spacing: 0.02em;
  347. animation: fade-pulse 1.5s ease-in-out infinite;
  348. }
  349. .preview-card-stage .image-error {
  350. position: absolute;
  351. top: 24px;
  352. left: 24px;
  353. padding: 10px 16px;
  354. border-radius: 12px;
  355. background: rgba(120, 124, 138, 0.92);
  356. color: #fff;
  357. font-size: 15px;
  358. z-index: 20;
  359. }
  360. .preview-card-stage .drop-hint {
  361. position: absolute;
  362. inset: 0;
  363. display: flex;
  364. align-items: center;
  365. justify-content: center;
  366. pointer-events: none;
  367. z-index: 5;
  368. }
  369. .preview-card-stage .drop-hint[hidden] {
  370. display: none;
  371. }
  372. .preview-card-stage .hint-text {
  373. margin: 0;
  374. padding: 0;
  375. font-size: 20px;
  376. font-weight: 600;
  377. color: #9ca3af;
  378. letter-spacing: 1px;
  379. text-align: center;
  380. }
  381. .preview-card-controls {
  382. width: 100%;
  383. flex-shrink: 0;
  384. background: transparent;
  385. padding: 16px 0;
  386. display: flex;
  387. align-items: center;
  388. justify-content: center;
  389. gap: 18px;
  390. flex-wrap: wrap;
  391. }
  392. .preview-card-controls .control-label {
  393. font-size: 14px;
  394. font-weight: 600;
  395. color: #9ca3af;
  396. letter-spacing: 0.1em;
  397. text-transform: uppercase;
  398. }
  399. .preview-card-controls .slider-container {
  400. display: flex;
  401. align-items: center;
  402. gap: 18px;
  403. flex: 1;
  404. max-width: 520px;
  405. padding: 16px 18px;
  406. border-radius: 18px;
  407. background: #f4f6fb;
  408. box-shadow: inset 0 0 0 1px #e7eaf2;
  409. }
  410. .preview-card-controls .fps-slider {
  411. flex: 1;
  412. height: 10px;
  413. -webkit-appearance: none;
  414. appearance: none;
  415. background: linear-gradient(90deg, #e5e7eb 0%, #c7ccd9 100%);
  416. border-radius: 999px;
  417. outline: none;
  418. cursor: pointer;
  419. transition: background 0.2s ease, box-shadow 0.2s ease;
  420. box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.08);
  421. }
  422. .preview-card-controls .fps-slider::-webkit-slider-runnable-track {
  423. height: 10px;
  424. border-radius: 999px;
  425. background: transparent;
  426. }
  427. .preview-card-controls .fps-slider::-webkit-slider-thumb {
  428. -webkit-appearance: none;
  429. appearance: none;
  430. width: 22px;
  431. height: 22px;
  432. background: #111827;
  433. border-radius: 50%;
  434. cursor: pointer;
  435. box-shadow: 0 6px 18px rgba(17, 24, 39, 0.25);
  436. transition: transform 0.2s ease, box-shadow 0.2s ease;
  437. margin-top: -6px;
  438. }
  439. .preview-card-controls .fps-slider::-webkit-slider-thumb:hover {
  440. transform: scale(1.15);
  441. box-shadow: 0 8px 22px rgba(17, 24, 39, 0.3);
  442. }
  443. .preview-card-controls .fps-slider::-webkit-slider-thumb:active {
  444. transform: scale(1.05);
  445. }
  446. .preview-card-controls .fps-value {
  447. min-width: 88px;
  448. padding: 8px 14px;
  449. background: #111827;
  450. color: #ffffff;
  451. border-radius: 10px;
  452. font-size: 15px;
  453. font-weight: 600;
  454. text-align: center;
  455. font-family: "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  456. box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  457. }
  458. @keyframes spin-preview {
  459. to {
  460. transform: rotate(360deg);
  461. }
  462. }
  463. @keyframes pulse-glow {
  464. 0%, 100% {
  465. transform: scale(0.9);
  466. opacity: 0.5;
  467. }
  468. 50% {
  469. transform: scale(1.1);
  470. opacity: 1;
  471. }
  472. }
  473. @keyframes fade-pulse {
  474. 0%, 100% {
  475. opacity: 0.6;
  476. }
  477. 50% {
  478. opacity: 1;
  479. }
  480. }
  481. @media (max-width: 900px) {
  482. .preview-card-stage {
  483. min-height: 60vh;
  484. }
  485. .preview-card-controls {
  486. flex-direction: column;
  487. }
  488. .preview-card-controls .slider-container {
  489. width: 100%;
  490. }
  491. }