main.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. @import url("all.min.css");
  2. /* 全局样式 */
  3. :root {
  4. --primary-color: #4a6bff;
  5. --secondary-color: #6c757d;
  6. --background-color: #f8f9fa;
  7. --card-bg: #ffffff;
  8. --text-color: #333333;
  9. --border-color: #e0e0e0;
  10. --success-color: #28a745;
  11. --danger-color: #dc3545;
  12. --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  13. --radius: 8px;
  14. --transition: all 0.3s ease;
  15. }
  16. * {
  17. margin: 0;
  18. padding: 0;
  19. box-sizing: border-box;
  20. }
  21. body {
  22. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  23. background-color: var(--background-color);
  24. color: var(--text-color);
  25. line-height: 1.6;
  26. }
  27. .app-container {
  28. max-width: 1200px;
  29. margin: 0 auto;
  30. padding: 0 20px 20px;
  31. }
  32. /* 头部样式 */
  33. .app-header {
  34. text-align: center;
  35. margin-bottom: 20px;
  36. padding: 15px 0;
  37. border-bottom: 1px solid var(--border-color);
  38. }
  39. .app-header h1 {
  40. font-size: 2.2rem;
  41. color: var(--primary-color);
  42. margin-bottom: 5px;
  43. }
  44. .app-description {
  45. font-size: 1rem;
  46. color: var(--secondary-color);
  47. }
  48. /* 主内容区域 */
  49. .app-main {
  50. display: flex;
  51. gap: 20px;
  52. max-height: calc(100vh - 150px);
  53. }
  54. .tool-panel {
  55. flex: 1;
  56. display: flex;
  57. flex-direction: column;
  58. background-color: var(--card-bg);
  59. border-radius: var(--radius);
  60. box-shadow: var(--shadow);
  61. overflow: hidden;
  62. }
  63. .preview-panel {
  64. flex: 1;
  65. background-color: var(--card-bg);
  66. border-radius: var(--radius);
  67. padding: 15px;
  68. box-shadow: var(--shadow);
  69. display: flex;
  70. flex-direction: column;
  71. }
  72. /* 面板选项卡 */
  73. .panel-tabs {
  74. display: flex;
  75. border-bottom: 1px solid var(--border-color);
  76. }
  77. .panel-tab {
  78. flex: 1;
  79. padding: 12px 15px;
  80. background: none;
  81. border: none;
  82. font-size: 0.95rem;
  83. font-weight: 500;
  84. color: var(--secondary-color);
  85. cursor: pointer;
  86. transition: var(--transition);
  87. }
  88. .panel-tab:hover {
  89. background-color: rgba(0, 0, 0, 0.03);
  90. }
  91. .panel-tab.active {
  92. color: var(--primary-color);
  93. border-bottom: 2px solid var(--primary-color);
  94. }
  95. .panel-content {
  96. flex: 1;
  97. overflow: hidden;
  98. position: relative;
  99. }
  100. .tab-content {
  101. position: absolute;
  102. top: 0;
  103. left: 0;
  104. width: 100%;
  105. height: 100%;
  106. padding: 15px;
  107. overflow-y: auto;
  108. display: none;
  109. }
  110. .tab-content.active {
  111. display: block;
  112. }
  113. /* 模板选择区域 */
  114. .template-selection {
  115. height: 100%;
  116. }
  117. .template-categories {
  118. display: flex;
  119. flex-wrap: wrap;
  120. gap: 8px;
  121. margin-bottom: 12px;
  122. }
  123. .category-btn {
  124. padding: 5px 10px;
  125. border-radius: 16px;
  126. border: 1px solid var(--border-color);
  127. background-color: white;
  128. font-size: 0.85rem;
  129. cursor: pointer;
  130. transition: var(--transition);
  131. }
  132. .category-btn:hover {
  133. background-color: var(--background-color);
  134. }
  135. .category-btn.active {
  136. background-color: var(--primary-color);
  137. color: white;
  138. border-color: var(--primary-color);
  139. }
  140. .templates-container {
  141. display: grid;
  142. grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  143. gap: 12px;
  144. height: calc(100% - 40px);
  145. overflow-y: auto;
  146. padding: 5px;
  147. align-items: start; /* 确保项目从顶部对齐 */
  148. }
  149. .template-item {
  150. border: 2px solid transparent;
  151. border-radius: var(--radius);
  152. overflow: hidden;
  153. cursor: pointer;
  154. transition: var(--transition);
  155. position: relative;
  156. display: flex;
  157. flex-direction: column;
  158. height: 130px; /* 固定高度 */
  159. }
  160. .template-item:hover {
  161. transform: translateY(-3px);
  162. box-shadow: var(--shadow);
  163. }
  164. .template-item.selected {
  165. border-color: var(--primary-color);
  166. }
  167. .template-thumbnail {
  168. width: 100%;
  169. height: 100%;
  170. object-fit: cover;
  171. flex: 1;
  172. }
  173. .template-name {
  174. font-size: 0.8rem;
  175. text-align: center;
  176. padding: 4px;
  177. background-color: rgba(0, 0, 0, 0.7);
  178. color: white;
  179. position: absolute;
  180. bottom: 0;
  181. width: 100%;
  182. white-space: nowrap;
  183. overflow: hidden;
  184. text-overflow: ellipsis;
  185. }
  186. /* 编辑区域 */
  187. .editor-panel {
  188. height: 100%;
  189. }
  190. .edit-form {
  191. display: flex;
  192. flex-direction: column;
  193. gap: 12px;
  194. max-height: 100%;
  195. overflow-y: auto;
  196. padding-right: 5px;
  197. }
  198. .form-group {
  199. display: flex;
  200. flex-direction: column;
  201. }
  202. .form-group label {
  203. margin-bottom: 4px;
  204. font-weight: 500;
  205. font-size: 0.9rem;
  206. }
  207. .form-control {
  208. padding: 8px 10px;
  209. border: 1px solid var(--border-color);
  210. border-radius: var(--radius);
  211. font-size: 0.95rem;
  212. transition: var(--transition);
  213. }
  214. .form-control:focus {
  215. outline: none;
  216. border-color: var(--primary-color);
  217. box-shadow: 0 0 0 2px rgba(74, 107, 255, 0.2);
  218. }
  219. .color-picker {
  220. height: 36px;
  221. padding: 4px;
  222. border: 1px solid var(--border-color);
  223. border-radius: var(--radius);
  224. }
  225. /* 高级选项区域 */
  226. .advanced-options {
  227. display: flex;
  228. flex-direction: column;
  229. gap: 20px;
  230. }
  231. .option-group {
  232. background-color: #f8f9fa;
  233. border-radius: var(--radius);
  234. padding: 15px;
  235. }
  236. .option-group h3 {
  237. font-size: 1rem;
  238. margin-bottom: 12px;
  239. color: var(--primary-color);
  240. font-weight: 600;
  241. }
  242. .range-slider-container {
  243. display: flex;
  244. align-items: center;
  245. gap: 10px;
  246. }
  247. .range-slider {
  248. flex: 1;
  249. -webkit-appearance: none;
  250. height: 6px;
  251. border-radius: 3px;
  252. background: #ddd;
  253. outline: none;
  254. }
  255. .range-slider::-webkit-slider-thumb {
  256. -webkit-appearance: none;
  257. appearance: none;
  258. width: 16px;
  259. height: 16px;
  260. border-radius: 50%;
  261. background: var(--primary-color);
  262. cursor: pointer;
  263. }
  264. .range-value {
  265. width: 40px;
  266. font-size: 0.85rem;
  267. text-align: right;
  268. }
  269. .watermark-options {
  270. margin-top: 10px;
  271. padding-top: 10px;
  272. border-top: 1px dashed var(--border-color);
  273. }
  274. /* 预览区域标题栏 */
  275. .preview-header {
  276. display: flex;
  277. justify-content: space-between;
  278. align-items: center;
  279. margin-bottom: 15px;
  280. padding-bottom: 10px;
  281. border-bottom: 1px solid var(--border-color);
  282. }
  283. .preview-header h2 {
  284. margin: 0;
  285. color: var(--primary-color);
  286. font-size: 1.2rem;
  287. }
  288. .zoom-controls {
  289. display: flex;
  290. gap: 8px;
  291. }
  292. .zoom-btn {
  293. padding: 4px 12px;
  294. border: 1px solid var(--border-color);
  295. border-radius: 4px;
  296. background-color: white;
  297. color: var(--text-color);
  298. font-size: 13px;
  299. cursor: pointer;
  300. transition: var(--transition);
  301. }
  302. .zoom-btn:hover {
  303. background-color: var(--background-color);
  304. border-color: var(--primary-color);
  305. color: var(--primary-color);
  306. }
  307. /* 预览区域 */
  308. .preview-container {
  309. display: flex;
  310. justify-content: center;
  311. align-items: center;
  312. flex: 1;
  313. margin-bottom: 15px;
  314. background-color: #f0f2f5;
  315. border-radius: var(--radius);
  316. padding: 15px;
  317. overflow: hidden;
  318. position: relative;
  319. }
  320. .poster-preview {
  321. width: 375px;
  322. height: 667px;
  323. background-color: white;
  324. box-shadow: var(--shadow);
  325. border-radius: var(--radius);
  326. overflow: hidden;
  327. position: relative;
  328. transform-origin: center;
  329. transition: transform 0.3s ease;
  330. }
  331. .poster-preview.with-filter {
  332. filter: brightness(var(--brightness, 100%)) contrast(var(--contrast, 100%)) saturate(var(--saturation, 100%));
  333. }
  334. .poster-preview-container {
  335. position: relative;
  336. }
  337. .poster-watermark {
  338. position: absolute;
  339. color: white;
  340. font-size: 16px;
  341. padding: 5px 10px;
  342. font-weight: 500;
  343. text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  344. pointer-events: none;
  345. }
  346. /* 图片上传 */
  347. .image-upload {
  348. display: flex;
  349. flex-direction: column;
  350. gap: 10px;
  351. }
  352. .upload-preview {
  353. max-width: 100%;
  354. height: 120px;
  355. border: 1px dashed var(--border-color);
  356. border-radius: var(--radius);
  357. display: flex;
  358. align-items: center;
  359. justify-content: center;
  360. overflow: hidden;
  361. }
  362. .upload-preview img {
  363. max-width: 100%;
  364. max-height: 100%;
  365. object-fit: contain;
  366. }
  367. .upload-btn {
  368. display: inline-block;
  369. padding: 6px 12px;
  370. background-color: var(--secondary-color);
  371. color: white;
  372. border: none;
  373. border-radius: var(--radius);
  374. cursor: pointer;
  375. transition: var(--transition);
  376. font-size: 0.9rem;
  377. }
  378. .upload-btn:hover {
  379. background-color: #5a6268;
  380. }
  381. .placeholder-message {
  382. text-align: center;
  383. color: var(--secondary-color);
  384. padding: 20px;
  385. }
  386. .detection-notice {
  387. margin-bottom: 15px;
  388. }
  389. .info-message {
  390. padding: 10px;
  391. background-color: rgba(74, 107, 255, 0.1);
  392. border-radius: var(--radius);
  393. display: flex;
  394. align-items: center;
  395. gap: 8px;
  396. font-size: 0.9rem;
  397. color: var(--primary-color);
  398. }
  399. .info-message i {
  400. font-size: 1rem;
  401. }
  402. /* 按钮样式 */
  403. .action-buttons {
  404. display: flex;
  405. justify-content: center;
  406. gap: 15px;
  407. margin-top: 10px;
  408. }
  409. .btn {
  410. padding: 10px 20px;
  411. border: none;
  412. border-radius: var(--radius);
  413. font-size: 1rem;
  414. font-weight: 500;
  415. cursor: pointer;
  416. transition: var(--transition);
  417. display: flex;
  418. align-items: center;
  419. gap: 8px;
  420. }
  421. .btn i {
  422. font-size: 1.1rem;
  423. }
  424. .primary-btn {
  425. background-color: var(--primary-color);
  426. color: white;
  427. }
  428. .primary-btn:hover {
  429. background-color: #3a5bd9;
  430. }
  431. .secondary-btn {
  432. background-color: var(--secondary-color);
  433. color: white;
  434. }
  435. .secondary-btn:hover {
  436. background-color: #5a6268;
  437. }
  438. .btn:disabled {
  439. background-color: #cccccc;
  440. cursor: not-allowed;
  441. }
  442. /* 模态框样式 */
  443. .overlay {
  444. position: fixed;
  445. top: 0;
  446. left: 0;
  447. width: 100%;
  448. height: 100%;
  449. background-color: rgba(0, 0, 0, 0.5);
  450. z-index: 999;
  451. display: none;
  452. }
  453. .modal {
  454. position: fixed;
  455. top: 50%;
  456. left: 50%;
  457. transform: translate(-50%, -50%);
  458. background-color: white;
  459. padding: 30px;
  460. border-radius: var(--radius);
  461. box-shadow: var(--shadow);
  462. z-index: 1000;
  463. width: 80%;
  464. max-width: 500px;
  465. display: none;
  466. }
  467. .close-modal {
  468. position: absolute;
  469. right: 20px;
  470. top: 15px;
  471. font-size: 1.5rem;
  472. cursor: pointer;
  473. color: var(--secondary-color);
  474. }
  475. .close-modal:hover {
  476. color: var(--danger-color);
  477. }
  478. .modal h2 {
  479. margin-bottom: 20px;
  480. color: var(--primary-color);
  481. }
  482. .share-options {
  483. display: flex;
  484. justify-content: space-around;
  485. margin-bottom: 30px;
  486. }
  487. .share-option {
  488. display: flex;
  489. flex-direction: column;
  490. align-items: center;
  491. gap: 10px;
  492. cursor: pointer;
  493. transition: var(--transition);
  494. }
  495. .share-option i {
  496. font-size: 2rem;
  497. color: var(--primary-color);
  498. }
  499. .share-option:hover {
  500. transform: translateY(-5px);
  501. }
  502. .share-instructions {
  503. background-color: var(--background-color);
  504. padding: 15px;
  505. border-radius: var(--radius);
  506. }
  507. .share-instructions p {
  508. margin-bottom: 8px;
  509. }
  510. /* 响应式设计 */
  511. @media (max-width: 992px) {
  512. .app-main {
  513. flex-direction: column;
  514. }
  515. .preview-panel {
  516. margin-top: 20px;
  517. }
  518. }
  519. @media (max-width: 576px) {
  520. .app-header h1 {
  521. font-size: 2rem;
  522. }
  523. .templates-container {
  524. grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  525. }
  526. .action-buttons {
  527. flex-direction: column;
  528. }
  529. .btn {
  530. width: 100%;
  531. justify-content: center;
  532. }
  533. }
  534. /* 动画效果 */
  535. @keyframes fadeIn {
  536. from { opacity: 0; }
  537. to { opacity: 1; }
  538. }
  539. .fade-in {
  540. animation: fadeIn 0.5s ease forwards;
  541. }
  542. /* 导航栏样式 */
  543. .main-navbar {
  544. background-color: #fff;
  545. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  546. padding: 10px 20px;
  547. margin-bottom: 20px;
  548. }
  549. .navbar-brand {
  550. display: flex;
  551. align-items: center;
  552. }
  553. .brand-link {
  554. display: flex;
  555. align-items: center;
  556. text-decoration: none;
  557. color: var(--text-color);
  558. }
  559. .brand-link img {
  560. width: 24px;
  561. height: 24px;
  562. margin-right: 8px;
  563. }
  564. .brand-text {
  565. font-size: 18px;
  566. font-weight: 600;
  567. margin-right: 8px;
  568. }
  569. .brand-subtitle {
  570. font-size: 14px;
  571. color: var(--secondary-color);
  572. padding-left: 8px;
  573. border-left: 1px solid var(--border-color);
  574. }
  575. /* 移除旧的预览面板标题样式 */
  576. .preview-panel h2 {
  577. margin-bottom: 0;
  578. padding-bottom: 0;
  579. border-bottom: none;
  580. }