webui.css 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. body {
  2. font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
  3. background: linear-gradient(135deg, #e0e7ff 0%, #f8fafc 100%);
  4. margin: 0;
  5. min-height: 100vh;
  6. width: 100vw;
  7. box-sizing: border-box;
  8. }
  9. .container {
  10. width: 90vw;
  11. min-height: 80vh;
  12. margin: 4vh auto 0 auto;
  13. background: #fff;
  14. border-radius: 22px;
  15. box-shadow: 0 10px 40px #7b8cff22, 0 1.5px 8px #0001;
  16. padding: 56px 0 40px 0;
  17. display: flex;
  18. flex-direction: column;
  19. align-items: center;
  20. justify-content: flex-start;
  21. max-width: 1100px;
  22. transition: box-shadow 0.3s;
  23. }
  24. h2 {
  25. text-align: center;
  26. margin-bottom: 36px;
  27. font-size: 2.5rem;
  28. color: #2d3a4a;
  29. letter-spacing: 2px;
  30. font-weight: 700;
  31. text-shadow: 0 2px 8px #7b8cff22;
  32. }
  33. .form-row {
  34. margin-bottom: 22px;
  35. display: flex;
  36. align-items: center;
  37. justify-content: center;
  38. width: 100%;
  39. }
  40. .form-row label {
  41. margin-right: 12px;
  42. font-weight: 500;
  43. color: #3b4252;
  44. }
  45. #fileInput {
  46. display: none;
  47. }
  48. .drop-zone {
  49. border: 2.5px dashed #7b8cff;
  50. border-radius: 14px;
  51. padding: 48px 0;
  52. text-align: center;
  53. color: #5a5a5a;
  54. background: #f4f7ff;
  55. cursor: pointer;
  56. margin-bottom: 20px;
  57. font-size: 1.15rem;
  58. transition: background 0.2s, border-color 0.2s;
  59. width: 96%;
  60. min-width: 320px;
  61. max-width: 1200px;
  62. margin-left: auto;
  63. margin-right: auto;
  64. display: flex;
  65. align-items: center;
  66. justify-content: center;
  67. min-height: 120px;
  68. box-sizing: border-box;
  69. box-shadow: 0 2px 12px #7b8cff11;
  70. }
  71. .drop-zone.dragover {
  72. background: #e0eaff;
  73. border-color: #3b82f6;
  74. }
  75. #resultArea {
  76. margin-top: 32px;
  77. width: 90%;
  78. max-width: 900px;
  79. }
  80. .download-row {
  81. display: flex;
  82. justify-content: flex-end;
  83. margin-top: 8px;
  84. width: 90%;
  85. max-width: 900px;
  86. }
  87. .result-block, #previewArea {
  88. display: flex;
  89. align-items: flex-start;
  90. gap: 18px;
  91. }
  92. .ocr-image-preview {
  93. max-width: 320px;
  94. max-height: 220px;
  95. border-radius: 8px;
  96. box-shadow: 0 1px 8px #0002;
  97. background: #fff;
  98. margin-right: 8px;
  99. }
  100. .ocr-text-content {
  101. flex: 1;
  102. min-width: 0;
  103. max-height: 220px;
  104. overflow-y: auto;
  105. background: #f7faff;
  106. border-radius: 8px;
  107. padding: 12px 16px;
  108. box-sizing: border-box;
  109. box-shadow: 0 1px 4px #0001;
  110. display: flex;
  111. flex-direction: column;
  112. position: relative;
  113. }
  114. .copy-btn {
  115. background: none;
  116. border: none;
  117. cursor: pointer;
  118. padding: 2px;
  119. margin-left: 8px;
  120. border-radius: 4px;
  121. transition: background 0.2s;
  122. display: flex;
  123. align-items: center;
  124. }
  125. .copy-btn:hover {
  126. background: #e0eaff;
  127. }
  128. .copy-btn svg {
  129. display: block;
  130. }
  131. .result-block {
  132. background: #f7faff;
  133. border-radius: 8px;
  134. padding: 0;
  135. margin-bottom: 14px;
  136. border-left: 4px solid #7b8cff;
  137. box-shadow: 0 1px 4px #0001;
  138. }
  139. .ocr-text-content pre {
  140. white-space: pre-wrap;
  141. word-break: break-all;
  142. font-size: 1.01rem;
  143. color: #2d3a4a;
  144. margin: 0;
  145. }
  146. #downloadBtn {
  147. margin-top: 22px;
  148. display: none;
  149. background: linear-gradient(90deg, #7b8cff 0%, #3b82f6 100%);
  150. color: #fff;
  151. border: none;
  152. border-radius: 6px;
  153. padding: 10px 28px;
  154. font-size: 1.08rem;
  155. cursor: pointer;
  156. box-shadow: 0 2px 8px #7b8cff22;
  157. transition: background 0.2s;
  158. }
  159. #downloadBtn:hover {
  160. background: linear-gradient(90deg, #3b82f6 0%, #7b8cff 100%);
  161. }
  162. #loading {
  163. display: none;
  164. text-align: center;
  165. margin-top: 20px;
  166. color: #3b82f6;
  167. font-size: 1.1rem;
  168. }
  169. #fileList {
  170. margin: 0;
  171. padding: 0 0 0 20px;
  172. color: #444;
  173. font-size: 15px;
  174. min-height: 24px;
  175. }
  176. #clearBtn {
  177. margin-left: 18px;
  178. background: #f3f4f6;
  179. color: #3b4252;
  180. border: 1.5px solid #d1d5db;
  181. border-radius: 6px;
  182. padding: 7px 18px;
  183. font-size: 1rem;
  184. cursor: pointer;
  185. transition: background 0.2s, border-color 0.2s;
  186. }
  187. #clearBtn:hover {
  188. background: #e0eaff;
  189. border-color: #7b8cff;
  190. }
  191. button[type="submit"] {
  192. background: linear-gradient(90deg, #7b8cff 0%, #3b82f6 100%);
  193. color: #fff;
  194. border: none;
  195. border-radius: 6px;
  196. padding: 10px 32px;
  197. font-size: 1.08rem;
  198. cursor: pointer;
  199. box-shadow: 0 2px 8px #7b8cff22;
  200. transition: background 0.2s;
  201. display: block;
  202. margin: 0 auto;
  203. }
  204. button[type="submit"]:hover {
  205. background: linear-gradient(90deg, #3b82f6 0%, #7b8cff 100%);
  206. }
  207. select {
  208. border-radius: 6px;
  209. border: 1.5px solid #d1d5db;
  210. padding: 7px 16px;
  211. font-size: 1rem;
  212. background: #f9fafb;
  213. color: #2d3a4a;
  214. outline: none;
  215. transition: border-color 0.2s;
  216. }
  217. select:focus {
  218. border-color: #7b8cff;
  219. }
  220. #progressArea {
  221. width: 80%;
  222. margin: 32px 0 0 0;
  223. display: none;
  224. flex-direction: column;
  225. align-items: center;
  226. gap: 10px;
  227. }
  228. .progress-bar-bg {
  229. width: 80%;
  230. height: 16px;
  231. background: #e0eaff;
  232. border-radius: 8px;
  233. overflow: hidden;
  234. margin-bottom: 4px;
  235. }
  236. .progress-bar {
  237. height: 100%;
  238. background: linear-gradient(90deg, #7b8cff 0%, #3b82f6 100%);
  239. border-radius: 8px;
  240. width: 0%;
  241. transition: width 0.3s;
  242. }
  243. #progressText {
  244. color: #3b4252;
  245. font-size: 1rem;
  246. margin-bottom: 2px;
  247. }
  248. #elapsedTime {
  249. color: #888;
  250. font-size: 0.98rem;
  251. margin-top: 2px;
  252. }
  253. @media (max-width: 900px) {
  254. .container {
  255. width: 98vw;
  256. min-height: 90vh;
  257. padding: 18px 0 18px 0;
  258. border-radius: 0;
  259. box-shadow: none;
  260. }
  261. .drop-zone {
  262. width: 96vw;
  263. min-width: 0;
  264. max-width: 100vw;
  265. }
  266. }
  267. @media (max-width: 600px) {
  268. .container {
  269. width: 100vw;
  270. min-height: 100vh;
  271. padding: 0;
  272. border-radius: 0;
  273. box-shadow: none;
  274. }
  275. h2 {
  276. font-size: 1.3rem;
  277. }
  278. .form-row {
  279. flex-direction: column;
  280. align-items: stretch;
  281. width: 100%;
  282. }
  283. .form-row label {
  284. margin-bottom: 6px;
  285. }
  286. .drop-zone {
  287. width: 98vw;
  288. min-width: 0;
  289. max-width: 100vw;
  290. padding: 28px 0;
  291. min-height: 60px;
  292. font-size: 1rem;
  293. }
  294. #downloadBtn, button[type="submit"] {
  295. width: 100%;
  296. margin-left: 0;
  297. margin-top: 10px;
  298. }
  299. #clearBtn {
  300. width: 100%;
  301. min-width: 0;
  302. max-width: 100vw;
  303. font-size: 0.98rem;
  304. padding: 7px 10px;
  305. margin-top: 10px;
  306. margin-left: 0;
  307. align-self: stretch;
  308. }
  309. #resultArea, .download-row {
  310. width: 98vw;
  311. max-width: 100vw;
  312. }
  313. }