style.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. /* 编辑器区域滚动条 */
  2. #yaml-editor::-webkit-scrollbar,
  3. #frequency-editor::-webkit-scrollbar,
  4. #yaml-backdrop::-webkit-scrollbar,
  5. #frequency-backdrop::-webkit-scrollbar {
  6. width: 10px;
  7. height: 10px;
  8. }
  9. #yaml-editor::-webkit-scrollbar-track,
  10. #frequency-editor::-webkit-scrollbar-track,
  11. #yaml-backdrop::-webkit-scrollbar-track,
  12. #frequency-backdrop::-webkit-scrollbar-track {
  13. background: #1e1e1e;
  14. }
  15. #yaml-editor::-webkit-scrollbar-thumb,
  16. #frequency-editor::-webkit-scrollbar-thumb,
  17. #yaml-backdrop::-webkit-scrollbar-thumb,
  18. #frequency-backdrop::-webkit-scrollbar-thumb {
  19. background: #424242;
  20. border-radius: 0;
  21. }
  22. #yaml-editor::-webkit-scrollbar-thumb:hover,
  23. #frequency-editor::-webkit-scrollbar-thumb:hover,
  24. #yaml-backdrop::-webkit-scrollbar-thumb:hover,
  25. #frequency-backdrop::-webkit-scrollbar-thumb:hover {
  26. background: #4f4f4f;
  27. }
  28. /* 高亮编辑器容器 */
  29. .highlight-editor-wrap {
  30. position: relative;
  31. flex: 1;
  32. display: flex;
  33. overflow: hidden;
  34. }
  35. /* 高亮背景层 */
  36. .highlight-backdrop {
  37. position: absolute;
  38. top: 0;
  39. left: 0;
  40. right: 0;
  41. bottom: 0;
  42. padding: 1rem;
  43. margin: 0;
  44. border: none;
  45. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  46. font-size: 0.75rem;
  47. line-height: 1.625;
  48. white-space: pre-wrap;
  49. word-wrap: break-word;
  50. overflow: auto;
  51. background: #1e1e1e;
  52. color: #d4d4d4;
  53. pointer-events: none;
  54. z-index: 1;
  55. }
  56. /* 透明输入层 */
  57. .highlight-textarea {
  58. position: absolute;
  59. top: 0;
  60. left: 0;
  61. right: 0;
  62. bottom: 0;
  63. padding: 1rem;
  64. margin: 0;
  65. border: none;
  66. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  67. font-size: 0.75rem;
  68. line-height: 1.625;
  69. overflow: auto;
  70. background: transparent;
  71. color: transparent;
  72. caret-color: #d4d4d4;
  73. resize: none;
  74. outline: none;
  75. z-index: 2;
  76. }
  77. /* 注释样式 - 灰色 */
  78. .syntax-comment {
  79. color: #6a9955;
  80. }
  81. /* 右侧面板滚动条 */
  82. #modules-container::-webkit-scrollbar {
  83. width: 8px;
  84. }
  85. #modules-container::-webkit-scrollbar-track {
  86. background: transparent;
  87. }
  88. #modules-container::-webkit-scrollbar-thumb {
  89. background: #cbd5e1;
  90. border-radius: 4px;
  91. }
  92. /* 模块卡片样式 */
  93. .module-card {
  94. background: white;
  95. border-radius: 0.5rem; /* rounded-lg */
  96. border: 1px solid #e5e7eb; /* border-gray-200 */
  97. overflow: hidden;
  98. transition: all 0.2s;
  99. }
  100. /* 激活态(可编辑) */
  101. .module-card.active {
  102. box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  103. }
  104. .module-card.active:hover {
  105. box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  106. border-color: #bfdbfe; /* blue-200 */
  107. }
  108. .module-card.active .module-header {
  109. background-color: #fff;
  110. border-bottom: 1px solid #f3f4f6;
  111. color: #111827;
  112. }
  113. /* 禁用态(灰色/只读) */
  114. .module-card.disabled {
  115. background-color: #f9fafb; /* gray-50 */
  116. opacity: 0.8;
  117. }
  118. .module-card.disabled .module-header {
  119. background-color: #f3f4f6; /* gray-100 */
  120. color: #6b7280; /* gray-500 */
  121. cursor: not-allowed;
  122. }
  123. .module-card.disabled .module-body {
  124. display: none;
  125. }
  126. .module-card.disabled .locked-badge {
  127. display: inline-flex;
  128. }
  129. /* 输入控件统一 */
  130. input[type="text"],
  131. input[type="password"],
  132. input[type="number"],
  133. select {
  134. font-size: 0.875rem; /* text-sm */
  135. line-height: 1.25rem;
  136. padding: 0.5rem 0.75rem;
  137. border-radius: 0.375rem;
  138. border-width: 1px;
  139. border-color: #d1d5db; /* gray-300 */
  140. width: 100%;
  141. outline: 2px solid transparent;
  142. transition: all 0.15s;
  143. }
  144. input:focus, select:focus {
  145. border-color: #3b82f6; /* blue-500 */
  146. box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  147. }
  148. /* 开关样式 (Checkbox Toggle) */
  149. .toggle-checkbox:checked {
  150. right: 0;
  151. border-color: #3b82f6;
  152. }
  153. .toggle-checkbox:checked + .toggle-label {
  154. background-color: #3b82f6;
  155. }
  156. /* 列表样式 (Platforms & RSS & Sortable) */
  157. .sortable-list-item {
  158. background: #f8fafc;
  159. border: 1px solid #e2e8f0;
  160. margin-bottom: 0.5rem;
  161. border-radius: 0.375rem;
  162. transition: all 0.2s;
  163. }
  164. .sortable-list-item:hover {
  165. border-color: #cbd5e1;
  166. background: #f1f5f9;
  167. }
  168. .sortable-handle {
  169. cursor: grab;
  170. color: #94a3b8;
  171. }
  172. .sortable-handle:hover {
  173. color: #64748b;
  174. }
  175. .sortable-ghost {
  176. background: #e2e8f0;
  177. opacity: 0.5;
  178. }
  179. /* 禁用状态的勾选框 */
  180. input[type="checkbox"]:disabled {
  181. cursor: not-allowed;
  182. opacity: 0.5;
  183. }
  184. /* Tab 切换样式 */
  185. .tab-button {
  186. transition: all 0.2s;
  187. }
  188. .tab-button.active {
  189. color: #d4d4d4;
  190. border-color: #3b82f6;
  191. }
  192. .tab-content.hidden {
  193. display: none;
  194. }
  195. /* 标签输入样式 */
  196. .tag-input-container {
  197. display: flex;
  198. flex-wrap: wrap;
  199. gap: 0.5rem;
  200. padding: 0.5rem;
  201. border: 1px solid #d1d5db;
  202. border-radius: 0.375rem;
  203. background: white;
  204. min-height: 42px;
  205. }
  206. .tag-item {
  207. display: inline-flex;
  208. align-items: center;
  209. gap: 0.25rem;
  210. padding: 0.25rem 0.5rem;
  211. background: #3b82f6;
  212. color: white;
  213. border-radius: 0.25rem;
  214. font-size: 0.875rem;
  215. }
  216. .tag-item button {
  217. background: none;
  218. border: none;
  219. color: white;
  220. cursor: pointer;
  221. padding: 0;
  222. font-size: 1rem;
  223. line-height: 1;
  224. }
  225. .tag-input {
  226. flex: 1;
  227. border: none;
  228. outline: none;
  229. min-width: 120px;
  230. font-size: 0.875rem;
  231. }
  232. /* 词组卡片样式 */
  233. .word-group-card {
  234. background: white;
  235. border: 1px solid #e5e7eb;
  236. border-radius: 0.5rem;
  237. padding: 1rem;
  238. transition: all 0.2s;
  239. }
  240. .word-group-card:hover {
  241. border-color: #3b82f6;
  242. box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  243. }
  244. /* 插入区域样式 */
  245. .insert-zone {
  246. position: relative;
  247. height: 8px;
  248. margin: 0.5rem 0;
  249. display: flex;
  250. align-items: center;
  251. justify-content: center;
  252. transition: all 0.2s;
  253. }
  254. .insert-zone:hover {
  255. height: 32px;
  256. }
  257. .insert-button {
  258. opacity: 0;
  259. visibility: hidden;
  260. width: 32px;
  261. height: 32px;
  262. border-radius: 50%;
  263. background: linear-gradient(135deg, #3b82f6, #2563eb);
  264. color: white;
  265. border: 2px solid white;
  266. box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  267. display: flex;
  268. align-items: center;
  269. justify-content: center;
  270. cursor: pointer;
  271. transition: all 0.2s;
  272. font-size: 14px;
  273. }
  274. .insert-zone:hover .insert-button {
  275. opacity: 1;
  276. visibility: visible;
  277. }
  278. .insert-button:hover {
  279. transform: scale(1.1);
  280. box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
  281. background: linear-gradient(135deg, #2563eb, #1d4ed8);
  282. }
  283. .insert-button:active {
  284. transform: scale(0.95);
  285. }
  286. /* 编辑区域恢复默认鼠标样式 */
  287. .word-group-card .editable-area {
  288. cursor: default;
  289. }
  290. .word-group-card .editable-area input {
  291. cursor: text;
  292. }
  293. .word-group-card .editable-area button {
  294. cursor: pointer;
  295. }
  296. .word-group-card .editable-area .tag-item {
  297. cursor: pointer;
  298. }
  299. /* 拖拽手柄样式 */
  300. .drag-handle {
  301. cursor: grab;
  302. transition: all 0.2s;
  303. }
  304. .drag-handle:active {
  305. cursor: grabbing;
  306. }
  307. /* SortableJS 拖拽样式 */
  308. .sortable-ghost {
  309. opacity: 0.4;
  310. background: #dbeafe;
  311. border: 2px dashed #3b82f6;
  312. }
  313. .sortable-chosen {
  314. background: #f0f9ff;
  315. border-color: #3b82f6;
  316. }
  317. .sortable-drag {
  318. opacity: 0.8;
  319. box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  320. transform: rotate(2deg);
  321. }
  322. /* 独立区域复选框组 */
  323. .checkbox-grid {
  324. display: grid;
  325. grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  326. gap: 0.75rem;
  327. }
  328. .checkbox-card {
  329. display: flex;
  330. align-items: center;
  331. padding: 0.5rem;
  332. border: 1px solid #e5e7eb;
  333. border-radius: 0.375rem;
  334. background-color: #fff;
  335. cursor: pointer;
  336. transition: all 0.15s;
  337. }
  338. .checkbox-card:hover {
  339. border-color: #93c5fd;
  340. background-color: #eff6ff;
  341. }
  342. .checkbox-card input:checked + span {
  343. color: #2563eb;
  344. font-weight: 500;
  345. }
  346. /* ==========================================
  347. 拖拽上传遮罩层
  348. ========================================== */
  349. .drop-overlay {
  350. position: absolute;
  351. top: 0;
  352. left: 0;
  353. right: 0;
  354. bottom: 0;
  355. background: rgba(59, 130, 246, 0.9);
  356. display: flex;
  357. align-items: center;
  358. justify-content: center;
  359. z-index: 100;
  360. pointer-events: all;
  361. }
  362. .drop-overlay.hidden {
  363. display: none;
  364. }
  365. .drop-overlay-content {
  366. text-align: center;
  367. color: white;
  368. }
  369. .drop-overlay-content i {
  370. font-size: 3rem;
  371. margin-bottom: 0.5rem;
  372. animation: bounce 1s infinite;
  373. }
  374. @keyframes bounce {
  375. 0%, 100% { transform: translateY(0); }
  376. 50% { transform: translateY(-10px); }
  377. }
  378. /* ==========================================
  379. Toast 提示
  380. ========================================== */
  381. .toast-notification {
  382. position: fixed;
  383. bottom: 24px;
  384. right: 24px;
  385. display: flex;
  386. align-items: center;
  387. gap: 0.75rem;
  388. padding: 0.875rem 1.25rem;
  389. border-radius: 0.5rem;
  390. font-size: 0.875rem;
  391. font-weight: 500;
  392. box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  393. z-index: 9999;
  394. opacity: 0;
  395. transform: translateY(20px);
  396. transition: all 0.3s ease;
  397. }
  398. .toast-notification.show {
  399. opacity: 1;
  400. transform: translateY(0);
  401. }
  402. .toast-notification i {
  403. font-size: 1.125rem;
  404. }
  405. /* Toast 类型样式 */
  406. .toast-success {
  407. background: #10b981;
  408. color: white;
  409. }
  410. .toast-error {
  411. background: #ef4444;
  412. color: white;
  413. }
  414. .toast-info {
  415. background: #3b82f6;
  416. color: white;
  417. }
  418. .toast-warning {
  419. background: #f59e0b;
  420. color: white;
  421. }
  422. /* ==========================================
  423. 弹窗样式
  424. ========================================== */
  425. .modal-overlay {
  426. position: fixed;
  427. top: 0;
  428. left: 0;
  429. right: 0;
  430. bottom: 0;
  431. background: rgba(0, 0, 0, 0.5);
  432. display: flex;
  433. align-items: center;
  434. justify-content: center;
  435. z-index: 1000;
  436. }
  437. .modal-overlay.hidden {
  438. display: none;
  439. }
  440. .modal-content {
  441. background: white;
  442. border-radius: 0.75rem;
  443. padding: 1.5rem;
  444. max-width: 450px;
  445. width: 90%;
  446. max-height: 90vh;
  447. overflow-y: auto;
  448. box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  449. }
  450. /* 弹簧跳动动画 */
  451. @keyframes spring-in {
  452. 0% { transform: scale(0.5); opacity: 0; }
  453. 60% { transform: scale(1.1); }
  454. 80% { transform: scale(0.95); }
  455. 100% { transform: scale(1); opacity: 1; }
  456. }
  457. .support-modal-content {
  458. animation: spring-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  459. background: #ffffff;
  460. border: none;
  461. border-radius: 1.5rem;
  462. }
  463. /* 柔软卡片设计 */
  464. .support-card {
  465. position: relative;
  466. display: flex;
  467. flex-direction: column;
  468. align-items: center;
  469. padding: 1.5rem;
  470. background: #fdfdfd;
  471. border: 1px solid #f3f4f6;
  472. border-radius: 1.25rem;
  473. transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  474. text-decoration: none;
  475. cursor: pointer;
  476. overflow: hidden;
  477. }
  478. .support-card:hover {
  479. transform: translateY(-8px) scale(1.02);
  480. background: white;
  481. box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  482. border-color: #e5e7eb;
  483. }
  484. .support-card-num {
  485. position: absolute;
  486. top: 1rem;
  487. right: 1.25rem;
  488. font-size: 0.75rem;
  489. font-weight: 800;
  490. color: #f3f4f6;
  491. font-style: italic;
  492. transition: color 0.3s;
  493. }
  494. .support-card:hover .support-card-num {
  495. color: #e5e7eb;
  496. }
  497. .support-icon {
  498. width: 3.5rem;
  499. height: 3.5rem;
  500. border-radius: 1rem;
  501. display: flex;
  502. align-items: center;
  503. justify-content: center;
  504. font-size: 1.5rem;
  505. margin-bottom: 1rem;
  506. transition: all 0.3s ease;
  507. }
  508. .support-card:hover .support-icon {
  509. transform: rotate(12deg) scale(1.1);
  510. }
  511. .support-btn {
  512. margin-top: auto;
  513. width: 100%;
  514. text-align: center;
  515. padding: 0.5rem;
  516. border-radius: 0.75rem;
  517. font-size: 0.75rem;
  518. font-weight: bold;
  519. color: white;
  520. transition: all 0.3s;
  521. }