main.css 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891
  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 0px;
  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 - 80px);
  53. height: calc(100vh - 80px); /* 添加固定高度 */
  54. }
  55. .tool-panel {
  56. flex: 1;
  57. display: flex;
  58. flex-direction: column;
  59. background-color: var(--card-bg);
  60. border-radius: var(--radius);
  61. box-shadow: var(--shadow);
  62. overflow: hidden;
  63. min-height: 0; /* 确保 flex 子元素可以正确滚动 */
  64. }
  65. .preview-panel {
  66. flex: 1;
  67. background-color: var(--card-bg);
  68. border-radius: var(--radius);
  69. box-shadow: var(--shadow);
  70. display: flex;
  71. flex-direction: column;
  72. }
  73. /* 面板选项卡 */
  74. .panel-tabs {
  75. display: flex;
  76. border-bottom: 1px solid var(--border-color);
  77. height: 46px; /* 统一高度 */
  78. flex-shrink: 0; /* 防止压缩 */
  79. }
  80. .panel-tab {
  81. flex: 1;
  82. padding: 12px 15px;
  83. background: none;
  84. border: none;
  85. font-size: 0.95rem;
  86. font-weight: 500;
  87. color: var(--secondary-color);
  88. cursor: pointer;
  89. transition: var(--transition);
  90. display: flex;
  91. align-items: center;
  92. justify-content: center;
  93. gap: 8px;
  94. }
  95. .panel-tab i {
  96. font-size: 1rem;
  97. }
  98. .panel-tab span {
  99. margin-top: 1px;
  100. }
  101. .panel-tab:hover {
  102. background-color: rgba(0, 0, 0, 0.03);
  103. }
  104. .panel-tab.active {
  105. color: var(--primary-color);
  106. border-bottom: 2px solid var(--primary-color);
  107. }
  108. .panel-tab.active i {
  109. color: var(--primary-color);
  110. }
  111. .panel-content {
  112. flex: 1;
  113. display: flex;
  114. flex-direction: column;
  115. min-height: 0; /* 确保内容可以滚动 */
  116. height: 100%;
  117. }
  118. .tab-content {
  119. display: none;
  120. width: 100%;
  121. height: 100%;
  122. padding: 15px;
  123. overflow-y: auto;
  124. }
  125. .tab-content.active {
  126. display: block;
  127. }
  128. /* 模板选择区域 */
  129. .template-selection {
  130. height: 100%;
  131. display: flex;
  132. flex-direction: column;
  133. }
  134. .template-categories {
  135. display: flex;
  136. flex-wrap: wrap;
  137. gap: 8px;
  138. margin-bottom: 12px;
  139. flex-shrink: 0; /* 防止压缩 */
  140. }
  141. .category-btn {
  142. padding: 5px 10px;
  143. border-radius: 16px;
  144. border: 1px solid var(--border-color);
  145. background-color: white;
  146. font-size: 0.85rem;
  147. cursor: pointer;
  148. transition: var(--transition);
  149. }
  150. .category-btn:hover {
  151. background-color: var(--background-color);
  152. }
  153. .category-btn.active {
  154. background-color: var(--primary-color);
  155. color: white;
  156. border-color: var(--primary-color);
  157. }
  158. .templates-container {
  159. display: grid;
  160. grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  161. gap: 12px;
  162. flex: 1;
  163. overflow-y: auto;
  164. padding: 5px;
  165. align-items: start;
  166. min-height: 0; /* 确保可以滚动 */
  167. }
  168. .template-item {
  169. border: 2px solid transparent;
  170. border-radius: var(--radius);
  171. overflow: hidden;
  172. cursor: pointer;
  173. transition: var(--transition);
  174. position: relative;
  175. display: flex;
  176. flex-direction: column;
  177. height: 130px; /* 固定高度 */
  178. }
  179. .template-item:hover {
  180. transform: translateY(-3px);
  181. box-shadow: var(--shadow);
  182. }
  183. .template-item.selected {
  184. border-color: var(--primary-color);
  185. }
  186. .template-thumbnail {
  187. width: 100%;
  188. height: 100%;
  189. object-fit: cover;
  190. flex: 1;
  191. }
  192. .template-name {
  193. font-size: 0.8rem;
  194. text-align: center;
  195. padding: 4px;
  196. background-color: rgba(0, 0, 0, 0.7);
  197. color: white;
  198. position: absolute;
  199. bottom: 0;
  200. width: 100%;
  201. white-space: nowrap;
  202. overflow: hidden;
  203. text-overflow: ellipsis;
  204. }
  205. /* 编辑区域 */
  206. .editor-panel {
  207. height: 100%;
  208. overflow-y: auto;
  209. }
  210. .edit-form {
  211. display: flex;
  212. flex-direction: column;
  213. gap: 12px;
  214. padding-right: 5px;
  215. }
  216. .form-group {
  217. display: flex;
  218. flex-direction: column;
  219. }
  220. .form-group label {
  221. margin-bottom: 4px;
  222. font-weight: 500;
  223. font-size: 0.9rem;
  224. }
  225. .form-control {
  226. padding: 8px 10px;
  227. border: 1px solid var(--border-color);
  228. border-radius: var(--radius);
  229. font-size: 0.95rem;
  230. transition: var(--transition);
  231. }
  232. .form-control:focus {
  233. outline: none;
  234. border-color: var(--primary-color);
  235. box-shadow: 0 0 0 2px rgba(74, 107, 255, 0.2);
  236. }
  237. .color-picker {
  238. height: 36px;
  239. padding: 4px;
  240. border: 1px solid var(--border-color);
  241. border-radius: var(--radius);
  242. }
  243. /* 高级选项区域 */
  244. .advanced-options {
  245. height: 100%;
  246. overflow-y: auto;
  247. display: flex;
  248. flex-direction: column;
  249. gap: 20px;
  250. padding-right: 5px;
  251. }
  252. .option-group {
  253. background-color: #f8f9fa;
  254. border-radius: var(--radius);
  255. padding: 15px;
  256. }
  257. .option-group h3 {
  258. font-size: 1rem;
  259. margin-bottom: 12px;
  260. color: var(--primary-color);
  261. font-weight: 600;
  262. }
  263. .range-slider-container {
  264. display: flex;
  265. align-items: center;
  266. gap: 10px;
  267. }
  268. .range-slider {
  269. flex: 1;
  270. -webkit-appearance: none;
  271. height: 6px;
  272. border-radius: 3px;
  273. background: #ddd;
  274. outline: none;
  275. }
  276. .range-slider::-webkit-slider-thumb {
  277. -webkit-appearance: none;
  278. appearance: none;
  279. width: 16px;
  280. height: 16px;
  281. border-radius: 50%;
  282. background: var(--primary-color);
  283. cursor: pointer;
  284. }
  285. .range-value {
  286. width: 40px;
  287. font-size: 0.85rem;
  288. text-align: right;
  289. }
  290. .watermark-options {
  291. margin-top: 10px;
  292. padding-top: 10px;
  293. border-top: 1px dashed var(--border-color);
  294. }
  295. /* 预览区域标题栏 */
  296. .preview-header {
  297. display: flex;
  298. justify-content: space-between;
  299. align-items: center;
  300. height: 46px; /* 统一高度 */
  301. border-bottom: 1px solid var(--border-color);
  302. padding: 0 15px;
  303. }
  304. .preview-header h2 {
  305. margin: 0;
  306. color: var(--primary-color);
  307. font-size: 0.95rem; /* 统一字体大小 */
  308. font-weight: 500; /* 统一字重 */
  309. }
  310. .zoom-controls {
  311. display: flex;
  312. gap: 8px;
  313. }
  314. .zoom-btn {
  315. padding: 4px 12px;
  316. border: 1px solid var(--border-color);
  317. border-radius: 4px;
  318. background-color: white;
  319. color: var(--text-color);
  320. font-size: 13px;
  321. cursor: pointer;
  322. transition: var(--transition);
  323. height: 28px; /* 固定按钮高度 */
  324. line-height: 20px; /* 文字垂直居中 */
  325. }
  326. .zoom-btn:hover {
  327. background-color: var(--background-color);
  328. border-color: var(--primary-color);
  329. color: var(--primary-color);
  330. }
  331. /* 预览区域 */
  332. .preview-container {
  333. display: flex;
  334. justify-content: center;
  335. align-items: center;
  336. flex: 1;
  337. margin-bottom: 15px;
  338. background-color: #f0f2f5;
  339. padding: 15px;
  340. overflow: hidden;
  341. position: relative;
  342. }
  343. .poster-preview {
  344. width: 375px;
  345. min-height: 667px;
  346. background-color: white;
  347. box-shadow: var(--shadow);
  348. border-radius: var(--radius);
  349. position: relative;
  350. transform-origin: center;
  351. transition: transform 0.3s ease;
  352. }
  353. .poster-preview > div {
  354. min-height: 667px;
  355. display: flex;
  356. flex-direction: column;
  357. }
  358. .poster-preview img {
  359. max-width: 100%;
  360. height: auto;
  361. object-fit: contain;
  362. }
  363. .poster-preview.with-filter {
  364. filter: brightness(var(--brightness, 100%)) contrast(var(--contrast, 100%)) saturate(var(--saturation, 100%));
  365. }
  366. .poster-preview-container {
  367. position: relative;
  368. }
  369. .poster-watermark {
  370. position: absolute;
  371. color: white;
  372. font-size: 16px;
  373. padding: 5px 10px;
  374. font-weight: 500;
  375. text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  376. pointer-events: none;
  377. }
  378. /* 图片上传 */
  379. .image-upload {
  380. display: flex;
  381. flex-direction: column;
  382. gap: 10px;
  383. }
  384. .upload-preview {
  385. max-width: 100%;
  386. height: 120px;
  387. border: 1px dashed var(--border-color);
  388. border-radius: var(--radius);
  389. display: flex;
  390. align-items: center;
  391. justify-content: center;
  392. overflow: hidden;
  393. }
  394. .upload-preview img {
  395. max-width: 100%;
  396. max-height: 100%;
  397. object-fit: contain;
  398. }
  399. .upload-btn {
  400. display: inline-block;
  401. padding: 6px 12px;
  402. background-color: var(--secondary-color);
  403. color: white;
  404. border: none;
  405. border-radius: var(--radius);
  406. cursor: pointer;
  407. transition: var(--transition);
  408. font-size: 0.9rem;
  409. }
  410. .upload-btn:hover {
  411. background-color: #5a6268;
  412. }
  413. .placeholder-message {
  414. text-align: center;
  415. color: var(--secondary-color);
  416. padding: 20px;
  417. }
  418. .detection-notice {
  419. margin-bottom: 15px;
  420. }
  421. .info-message {
  422. padding: 10px;
  423. background-color: rgba(74, 107, 255, 0.1);
  424. border-radius: var(--radius);
  425. display: flex;
  426. align-items: center;
  427. gap: 8px;
  428. font-size: 0.9rem;
  429. color: var(--primary-color);
  430. }
  431. .info-message i {
  432. font-size: 1rem;
  433. }
  434. /* 按钮样式 */
  435. .action-buttons {
  436. display: flex;
  437. justify-content: center;
  438. gap: 15px;
  439. margin-bottom: 10px;
  440. }
  441. .btn {
  442. padding: 10px 20px;
  443. border: none;
  444. border-radius: var(--radius);
  445. font-size: 1rem;
  446. font-weight: 500;
  447. cursor: pointer;
  448. transition: var(--transition);
  449. display: flex;
  450. align-items: center;
  451. gap: 8px;
  452. }
  453. .btn i {
  454. font-size: 1.1rem;
  455. }
  456. .primary-btn {
  457. background-color: var(--primary-color);
  458. color: white;
  459. }
  460. .primary-btn:hover {
  461. background-color: #3a5bd9;
  462. }
  463. .secondary-btn {
  464. background-color: var(--secondary-color);
  465. color: white;
  466. }
  467. .secondary-btn:hover {
  468. background-color: #5a6268;
  469. }
  470. .btn:disabled {
  471. background-color: #cccccc;
  472. cursor: not-allowed;
  473. }
  474. /* 模态框样式 */
  475. .overlay {
  476. position: fixed;
  477. top: 0;
  478. left: 0;
  479. width: 100%;
  480. height: 100%;
  481. background-color: rgba(0, 0, 0, 0.5);
  482. z-index: 999;
  483. display: none;
  484. }
  485. .modal {
  486. position: fixed;
  487. top: 50%;
  488. left: 50%;
  489. transform: translate(-50%, -50%);
  490. background-color: white;
  491. padding: 30px;
  492. border-radius: var(--radius);
  493. box-shadow: var(--shadow);
  494. z-index: 1000;
  495. width: 80%;
  496. max-width: 500px;
  497. display: none;
  498. }
  499. .close-modal {
  500. position: absolute;
  501. right: 20px;
  502. top: 15px;
  503. font-size: 1.5rem;
  504. cursor: pointer;
  505. color: var(--secondary-color);
  506. }
  507. .close-modal:hover {
  508. color: var(--danger-color);
  509. }
  510. .modal h2 {
  511. margin-bottom: 20px;
  512. color: var(--primary-color);
  513. }
  514. .share-options {
  515. display: flex;
  516. justify-content: space-around;
  517. margin-bottom: 30px;
  518. }
  519. .share-option {
  520. display: flex;
  521. flex-direction: column;
  522. align-items: center;
  523. gap: 10px;
  524. cursor: pointer;
  525. transition: var(--transition);
  526. }
  527. .share-option i {
  528. font-size: 2rem;
  529. color: var(--primary-color);
  530. }
  531. .share-option:hover {
  532. transform: translateY(-5px);
  533. }
  534. .share-instructions {
  535. background-color: var(--background-color);
  536. padding: 15px;
  537. border-radius: var(--radius);
  538. }
  539. .share-instructions p {
  540. margin-bottom: 8px;
  541. }
  542. /* 响应式设计 */
  543. @media (max-width: 992px) {
  544. .app-main {
  545. flex-direction: column;
  546. }
  547. .preview-panel {
  548. margin-top: 20px;
  549. }
  550. }
  551. @media (max-width: 576px) {
  552. .app-header h1 {
  553. font-size: 2rem;
  554. }
  555. .templates-container {
  556. grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  557. }
  558. .action-buttons {
  559. flex-direction: column;
  560. }
  561. .btn {
  562. width: 100%;
  563. justify-content: center;
  564. }
  565. }
  566. /* 动画效果 */
  567. @keyframes fadeIn {
  568. from { opacity: 0; }
  569. to { opacity: 1; }
  570. }
  571. .fade-in {
  572. animation: fadeIn 0.5s ease forwards;
  573. }
  574. /* 导航栏样式 */
  575. .main-navbar {
  576. background-color: #fff;
  577. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  578. padding: 10px 20px;
  579. margin-bottom: 20px;
  580. }
  581. .navbar-brand {
  582. display: flex;
  583. align-items: center;
  584. position: relative;
  585. }
  586. .mod-head-actions{
  587. position: absolute;
  588. right: 0;
  589. }
  590. .mod-head-actions a:hover{
  591. color: #f00;
  592. }
  593. .brand-link {
  594. display: flex;
  595. align-items: center;
  596. text-decoration: none;
  597. color: var(--text-color);
  598. }
  599. .brand-link img {
  600. width: 24px;
  601. height: 24px;
  602. margin-right: 8px;
  603. }
  604. .brand-text {
  605. margin-right: 8px;
  606. }
  607. .brand-subtitle {
  608. font-size: 14px;
  609. color: var(--secondary-color);
  610. padding-left: 8px;
  611. border-left: 1px solid var(--border-color);
  612. }
  613. /* 移除旧的预览面板标题样式 */
  614. .preview-panel h2 {
  615. margin-bottom: 0;
  616. padding-bottom: 0;
  617. border-bottom: none;
  618. }
  619. /* 特殊布局样式 */
  620. .special-layout {
  621. background-color: var(--background-color);
  622. padding: 15px;
  623. border-radius: var(--radius);
  624. position: relative;
  625. }
  626. .special-layout .image-upload {
  627. height: 100%;
  628. }
  629. .special-layout .upload-preview {
  630. height: 150px;
  631. }
  632. .special-layout .color-picker {
  633. width: 100%;
  634. height: 40px;
  635. }
  636. .special-layout label {
  637. margin-bottom: 8px;
  638. color: var(--text-color);
  639. font-weight: 500;
  640. }
  641. .special-layout .left-column{
  642. flex: 1;
  643. width: 240px;
  644. }
  645. .special-layout .right-column{
  646. flex: 1;
  647. width: 120px;
  648. position: absolute;
  649. top: 15px;
  650. right: 20px;
  651. }
  652. .special-layout .upload-btn{
  653. position: absolute;
  654. bottom: 0;
  655. background: #0009;
  656. color: #fff;
  657. width: 240px;
  658. text-align: center;
  659. }
  660. /* 加载提示 */
  661. .loading-tip {
  662. position: fixed;
  663. top: 50%;
  664. left: 50%;
  665. transform: translate(-50%, -50%);
  666. background: rgba(0, 0, 0, 0.8);
  667. color: white;
  668. padding: 15px 30px;
  669. border-radius: 25px;
  670. font-size: 14px;
  671. display: flex;
  672. align-items: center;
  673. gap: 10px;
  674. z-index: 9999;
  675. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  676. }
  677. .loading-tip i {
  678. font-size: 16px;
  679. }
  680. @keyframes spin {
  681. 0% { transform: rotate(0deg); }
  682. 100% { transform: rotate(360deg); }
  683. }
  684. .loading-tip .fa-spin {
  685. animation: spin 1s linear infinite;
  686. }
  687. /* 工具市场按钮样式(保持不变) */
  688. .panel-title>a.x-other-tools {
  689. margin: 1px 0 0;
  690. font-size: 13px;
  691. cursor: pointer;
  692. text-decoration: none;
  693. -webkit-user-select: none;
  694. user-select: none;
  695. color: #333;
  696. float: right;
  697. background-color: #f5f8ff;
  698. padding: 5px 10px;
  699. border-radius: 15px;
  700. border: 1px solid #d0d9ff;
  701. transition: all 0.3s ease;
  702. display: flex;
  703. align-items: center;
  704. position: relative;
  705. top: 0px;
  706. }
  707. .panel-title>a.x-other-tools .icon-plus-circle {
  708. display: inline-block;
  709. width: 16px;
  710. height: 16px;
  711. background: url(../../static/img/plus-circle.svg) no-repeat center center;
  712. background-size: contain;
  713. margin-right: 5px;
  714. }
  715. .panel-title>a.x-other-tools .tool-market-badge {
  716. display: inline-block;
  717. background-color: #4d89fe;
  718. color: white;
  719. padding: 2px 6px;
  720. border-radius: 10px;
  721. margin-left: 5px;
  722. font-size: 12px;
  723. font-weight: bold;
  724. }
  725. .panel-title>a.x-other-tools:hover {
  726. color: #333;
  727. background-color: #e6edff;
  728. box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  729. transform: translateY(-1px);
  730. }
  731. /* 保持原有的顶部导航样式 */
  732. .x-donate-link {
  733. float: right;
  734. line-height: 18px;
  735. color: #2563eb;
  736. cursor: pointer;
  737. text-decoration: none;
  738. border: none;
  739. white-space: nowrap;
  740. margin-right: auto;
  741. border-radius: 20px;
  742. background-color: #eff6ff;
  743. transition: all 0.2s ease;
  744. position: relative;
  745. display: inline-flex;
  746. align-items: center;
  747. box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
  748. position: absolute;
  749. right: 230px;
  750. top: 4px;
  751. padding: 4px 12px;
  752. font-size: 12px;
  753. font-weight: normal;
  754. }
  755. .x-donate-link:hover {
  756. background-color: #dbeafe;
  757. color: #1d4ed8;
  758. text-decoration: none;
  759. box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
  760. transform: translateY(-1px);
  761. }
  762. .x-donate-link>a {
  763. font-size: 12px;
  764. color: blue;
  765. cursor: pointer;
  766. text-decoration: underline;
  767. }
  768. .x-donate-link>a:hover {
  769. text-decoration: underline;
  770. color: #f00;
  771. }