styles.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. * {
  2. box-sizing: border-box;
  3. margin: 0;
  4. padding: 0;
  5. }
  6. body {
  7. font-family: 'Microsoft YaHei', Arial, sans-serif;
  8. line-height: 1.6;
  9. color: #333;
  10. background-color: #f5f5f5;
  11. padding: 10px 3px;
  12. }
  13. .container {
  14. max-width: 800px;
  15. margin: 0 auto;
  16. /* background-color: #fff; */
  17. border-radius: 8px;
  18. /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
  19. padding: 8px;
  20. }
  21. h1 {
  22. text-align: center;
  23. margin-bottom: 20px;
  24. color: #2c3e50;
  25. }
  26. .header {
  27. position: relative;
  28. }
  29. /* 模块切换器样式 */
  30. .module-switcher select {
  31. appearance: none;
  32. -webkit-appearance: none;
  33. width: 150px;
  34. padding: 5px 35px 5px 15px;
  35. border: 2px solid #3498db;
  36. border-radius: 8px;
  37. background-color: #fff;
  38. background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232980b9'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  39. background-repeat: no-repeat;
  40. background-position: right 12px center;
  41. background-size: 16px;
  42. font-size: 16px;
  43. color: #333;
  44. transition: all 0.3s ease;
  45. cursor: pointer;
  46. margin: 10px 0;
  47. }
  48. .module-switcher select:hover {
  49. border-color: #3498db;
  50. box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
  51. }
  52. .module-switcher select:focus {
  53. outline: none;
  54. border-color: #3498db;
  55. box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  56. }
  57. /* 下拉选项样式 */
  58. .module-switcher option {
  59. padding: 10px;
  60. background: #fff;
  61. color: #333;
  62. }
  63. .header .module-switcher {
  64. position: absolute;
  65. right: 10px;
  66. top: 85px;
  67. }
  68. .description {
  69. text-align: center;
  70. margin-bottom: 30px;
  71. color: #7f8c8d;
  72. }
  73. .problem-selector {
  74. background-color: #f9f9f9;
  75. padding: 20px;
  76. border-radius: 8px;
  77. margin-bottom: 20px;
  78. }
  79. .problem-selector h3 {
  80. margin-bottom: 15px;
  81. color: #2c3e50;
  82. text-align: center;
  83. }
  84. /* 问题类型区域样式已更新,使用下拉选择框替代按钮组 */
  85. .input-container {
  86. background-color: #f9f9f9;
  87. padding: 20px;
  88. border-radius: 8px;
  89. margin-bottom: 30px;
  90. }
  91. .number-inputs {
  92. display: flex;
  93. flex-wrap: wrap;
  94. gap: 15px;
  95. margin-bottom: 20px;
  96. justify-content: center;
  97. }
  98. .input-group {
  99. display: flex;
  100. flex-direction: column;
  101. }
  102. label {
  103. margin-bottom: 5px;
  104. font-weight: bold;
  105. color: #2c3e50;
  106. }
  107. input[type="number"] {
  108. width: 80px;
  109. padding: 10px;
  110. border: 1px solid #ddd;
  111. border-radius: 4px;
  112. font-size: 16px;
  113. text-align: center;
  114. }
  115. button {
  116. display: block;
  117. width: 100%;
  118. padding: 12px;
  119. background-color: #3498db;
  120. color: white;
  121. border: none;
  122. border-radius: 4px;
  123. font-size: 16px;
  124. cursor: pointer;
  125. transition: background-color 0.3s;
  126. }
  127. button:hover {
  128. background-color: #2980b9;
  129. }
  130. .results-container {
  131. background-color: #f9f9f9;
  132. padding: 20px;
  133. border-radius: 8px;
  134. }
  135. .results-header {
  136. display: flex;
  137. justify-content: space-between;
  138. align-items: center;
  139. margin-bottom: 15px;
  140. }
  141. .stats {
  142. font-size: 14px;
  143. color: #7f8c8d;
  144. }
  145. .filter-container {
  146. display: flex;
  147. gap: 20px;
  148. margin-bottom: 15px;
  149. }
  150. .solutions {
  151. background-color: white;
  152. border: 1px solid #ddd;
  153. border-radius: 4px;
  154. padding: 15px;
  155. max-height: 400px;
  156. overflow-y: auto;
  157. display: flex;
  158. flex-wrap: wrap;
  159. }
  160. .solution-item {
  161. padding: 10px;
  162. border: 1px solid #eee;
  163. margin: 3px 0;
  164. display: flex;
  165. justify-content: space-between;
  166. width: 100%;
  167. }
  168. /* 模块样式 */
  169. .module {
  170. background-color: #fff;
  171. border-radius: 8px;
  172. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  173. padding: 20px;
  174. margin-bottom: 30px;
  175. }
  176. .module h2 {
  177. margin-top: 0;
  178. color: #333;
  179. border-bottom: 2px solid #f0f0f0;
  180. padding-bottom: 10px;
  181. margin-bottom: 20px;
  182. }
  183. /* 出题模块样式 */
  184. .problem-module .problem-types,
  185. .problem-types {
  186. display: flex;
  187. align-items: center;
  188. gap: 15px;
  189. margin-bottom: 20px;
  190. }
  191. .timer-container {
  192. display: inline-flex;
  193. align-items: center;
  194. background-color: #f2f2f2;
  195. padding: 5px 10px;
  196. border-radius: 4px;
  197. margin-bottom: 10px;
  198. width: fit-content;
  199. margin-right: 15px;
  200. }
  201. .timer-label {
  202. font-size: 14px;
  203. color: #555;
  204. margin-right: 5px;
  205. }
  206. .timer-display {
  207. font-family: monospace;
  208. font-size: 16px;
  209. font-weight: bold;
  210. color: #e74c3c;
  211. }
  212. .timer-display.time-up {
  213. color: #ffffff;
  214. background-color: #e74c3c;
  215. padding: 2px 6px;
  216. border-radius: 4px;
  217. animation: blink 1s infinite;
  218. }
  219. @keyframes blink {
  220. 0% {
  221. opacity: 1;
  222. }
  223. 50% {
  224. opacity: 0.5;
  225. }
  226. 100% {
  227. opacity: 1;
  228. }
  229. }
  230. .problem-type-select-container {
  231. flex: 1;
  232. }
  233. .problem-type-select {
  234. width: 100%;
  235. padding: 10px 35px 10px 15px;
  236. border: 2px solid #3498db;
  237. border-radius: 8px;
  238. background-color: #fff;
  239. background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232980b9'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  240. background-repeat: no-repeat;
  241. background-position: right 12px center;
  242. background-size: 16px;
  243. font-size: 16px;
  244. color: #333;
  245. appearance: none;
  246. -webkit-appearance: none;
  247. transition: all 0.3s ease;
  248. cursor: pointer;
  249. }
  250. .problem-type-select:hover,
  251. .problem-type-select:focus {
  252. border-color: #2980b9;
  253. box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  254. outline: none;
  255. }
  256. .generate-problem-btn {
  257. padding: 10px 20px;
  258. background-color: #4CAF50;
  259. color: white;
  260. border: none;
  261. border-radius: 8px;
  262. font-size: 16px;
  263. cursor: pointer;
  264. transition: all 0.3s ease;
  265. white-space: nowrap;
  266. width: auto;
  267. }
  268. .generate-problem-btn:hover {
  269. background-color: #45a049;
  270. box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  271. }
  272. .problem-container {
  273. background-color: #f9f9f9;
  274. border-radius: 6px;
  275. padding: 15px;
  276. }
  277. .problem-content {
  278. margin-bottom: 15px;
  279. }
  280. .problem-text {
  281. font-size: 16px;
  282. line-height: 1.5;
  283. margin-bottom: 15px;
  284. }
  285. .problem-numbers {
  286. display: flex;
  287. justify-content: center;
  288. gap: 15px;
  289. margin: 20px 0;
  290. }
  291. .problem-number {
  292. display: flex;
  293. align-items: center;
  294. justify-content: center;
  295. width: 40px;
  296. height: 40px;
  297. background-color: #4CAF50;
  298. color: white;
  299. border-radius: 50%;
  300. font-size: 18px;
  301. font-weight: bold;
  302. }
  303. .problem-answer {
  304. background-color: #f0f8ff;
  305. border-radius: 6px;
  306. padding: 15px;
  307. margin-top: 15px;
  308. }
  309. .answers-container {
  310. display: flex;
  311. display: flex;
  312. flex-wrap: wrap;
  313. }
  314. .answer-item {
  315. padding: 8px;
  316. width: 100%;
  317. margin: 3px 0;
  318. }
  319. .answers-container .solution-item,
  320. .answers-container .answer-item {
  321. border: 1px solid #ddd;
  322. background: #fff;
  323. }
  324. .answer-group {
  325. display: flex;
  326. margin-bottom: 8px;
  327. }
  328. .answer-key {
  329. font-weight: bold;
  330. margin-right: 10px;
  331. min-width: 80px;
  332. }
  333. /* 计算器模块样式 */
  334. .calculator-module .input-container {
  335. margin-bottom: 20px;
  336. }
  337. .secondary-btn {
  338. background-color: #2196F3;
  339. color: white;
  340. border: none;
  341. border-radius: 4px;
  342. padding: 8px 15px;
  343. cursor: pointer;
  344. transition: all 0.3s;
  345. }
  346. .secondary-btn:hover {
  347. background-color: #0b7dda;
  348. }
  349. .solution-expression {
  350. font-family: monospace;
  351. font-size: 16px;
  352. font-weight: bold;
  353. }
  354. .solution-flag {
  355. display: inline-block;
  356. padding: 2px 8px;
  357. border-radius: 4px;
  358. font-size: 12px;
  359. font-weight: bold;
  360. }
  361. .flag-1 {
  362. background-color: #1d05f3 !important;
  363. }
  364. .flag-1 .solution-expression,
  365. .flag-1 .solution-flag {
  366. color: #fff;
  367. }
  368. .flag-2 {
  369. background-color: #f00808 !important;
  370. }
  371. .flag-2 .solution-expression,
  372. .flag-2 .solution-flag {
  373. color: #fff;
  374. }
  375. .placeholder {
  376. color: #95a5a6;
  377. text-align: center;
  378. padding: 20px;
  379. }
  380. /* 一星和二星数据表格样式 */
  381. .flag-search-container {
  382. display: flex;
  383. align-items: center;
  384. justify-content: space-between;
  385. gap: 15px;
  386. margin-bottom: 20px;
  387. background-color: #f9f9f9;
  388. padding: 15px;
  389. border-radius: 8px;
  390. }
  391. .flag-search-container .search-btn {
  392. width: 100px;
  393. padding: 10px;
  394. }
  395. .search-input {
  396. display: flex;
  397. align-items: center;
  398. gap: 10px;
  399. }
  400. .search-input label {
  401. margin: 0;
  402. }
  403. .flag-data-container {
  404. background-color: #fff;
  405. border-radius: 8px;
  406. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  407. padding: 5px;
  408. margin-bottom: 20px;
  409. max-height: 600px;
  410. overflow-y: auto;
  411. }
  412. .flag-table {
  413. width: 100%;
  414. border-collapse: collapse;
  415. }
  416. .flag-table th {
  417. background-color: #f2f2f2;
  418. padding: 10px;
  419. text-align: center;
  420. border-bottom: 2px solid #ddd;
  421. }
  422. .flag-table td {
  423. padding: 5px;
  424. border-bottom: 1px solid #eee;
  425. vertical-align: top;
  426. }
  427. /* 历史记录模块样式 */
  428. .history-search-container {
  429. display: flex;
  430. align-items: center;
  431. justify-content: center;
  432. gap: 15px;
  433. margin-bottom: 15px;
  434. padding: 15px;
  435. border-radius: 8px;
  436. background-color: #f9f9f9;
  437. flex-wrap: wrap;
  438. }
  439. .history-search-container select,.history-search-container input{
  440. outline: none;
  441. padding: 5px 10px;
  442. border-radius: 4px;
  443. border: 2px solid #3498db;
  444. }
  445. .history-search-container .search-btn {
  446. width: auto;
  447. padding:5px 15px;
  448. }
  449. .history-data-container {
  450. margin-top: 20px;
  451. max-height: 600px;
  452. overflow-y: auto;
  453. }
  454. .history-cards-container {
  455. display: flex;
  456. flex-direction: column;
  457. gap: 10px;
  458. padding: 10px 0;
  459. }
  460. .history-card {
  461. background-color: white;
  462. border-radius: 8px;
  463. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  464. padding: 8px;
  465. transition: transform 0.2s;
  466. margin-bottom:5px;
  467. font-size: 14px;
  468. border: 1px solid;
  469. }
  470. .history-card:hover {
  471. transform: translateY(-2px);
  472. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  473. }
  474. .history-card-header {
  475. display: flex;
  476. justify-content: space-between;
  477. align-items: center;
  478. margin-bottom: 8px;
  479. padding-bottom: 6px;
  480. border-bottom: 1px solid #eee;
  481. font-size: 13px;
  482. }
  483. .history-card-type {
  484. font-weight: bold;
  485. color: #3498db;
  486. padding: 3px 8px;
  487. border-radius: 4px;
  488. background-color: rgba(52, 152, 219, 0.1);
  489. }
  490. .history-card-time {
  491. font-size: 0.85em;
  492. color: #7f8c8d;
  493. }
  494. .history-card-content {
  495. display: flex;
  496. flex-direction: column;
  497. }
  498. .history-card .problem-text {
  499. font-size: 14px;
  500. line-height: 1.4;
  501. margin-bottom: 5px;
  502. }
  503. .history-card .problem-numbers {
  504. display: flex;
  505. gap: 10px;
  506. margin: 5px 0;
  507. justify-content: center;
  508. }
  509. .history-card .problem-number {
  510. display: inline-flex;
  511. align-items: center;
  512. justify-content: center;
  513. width: 30px;
  514. height: 30px;
  515. background-color: #4CAF50;
  516. border-radius: 4px;
  517. font-weight: bold;
  518. font-size: 16px;
  519. }
  520. .history-card .show-history-answer-btn {
  521. width: auto;
  522. padding: 3px 8px;
  523. font-size: 13px;
  524. }
  525. .history-card-answers {
  526. padding-top: 8px;
  527. border-top: 1px dashed #eee;
  528. }
  529. .history-card-answers h3 {
  530. font-size: 14px;
  531. margin-bottom: 8px;
  532. }
  533. .history-card-answers .answers-container {
  534. font-size: 13px;
  535. }
  536. .history-card-answers .solution-item,
  537. .history-card-answers .answer-item,
  538. .history-card-answers .answer-group {
  539. margin-bottom: 5px;
  540. padding: 5px;
  541. background-color: #f9f9f9;
  542. border-radius: 4px;
  543. }
  544. .history-card-question {
  545. font-size: 1.1em;
  546. color: #2c3e50;
  547. }
  548. .history-card-numbers {
  549. display: flex;
  550. gap: 10px;
  551. flex-wrap: wrap;
  552. }
  553. .history-card-solution {
  554. font-family: monospace;
  555. background-color: #f9f9f9;
  556. padding: 8px;
  557. border-radius: 4px;
  558. margin-top: 5px;
  559. }
  560. .load-more-btn {
  561. display: block;
  562. width: 100%;
  563. padding: 10px;
  564. margin-top: 15px;
  565. background-color: #f2f2f2;
  566. color: #333;
  567. border: 1px solid #ddd;
  568. border-radius: 4px;
  569. cursor: pointer;
  570. transition: background-color 0.3s;
  571. }
  572. .load-more-btn:hover {
  573. background-color: #e0e0e0;
  574. }
  575. .load-more-btn:disabled {
  576. background-color: #f9f9f9;
  577. color: #999;
  578. cursor: not-allowed;
  579. }
  580. /* 题型样式 */
  581. .type-a {
  582. border-color: #3498db;
  583. border-left: 4px solid #3498db;
  584. }
  585. .type-b {
  586. border-color: #2ecc71;
  587. border-left: 4px solid #2ecc71;
  588. }
  589. .type-c {
  590. border-color: #e74c3c;
  591. border-left: 4px solid #e74c3c;
  592. }
  593. .type-d {
  594. border-color: #f39c12;
  595. border-left: 4px solid #f39c12;
  596. }
  597. .type-e {
  598. border-color: #9b59b6;
  599. border-left: 4px solid #9b59b6;
  600. }
  601. .type-unknown {
  602. border-color: #9b59b6;
  603. border-left: 4px solid #9b59b6;
  604. }
  605. .flag-table .placeholder {
  606. text-align: center;
  607. color: #999;
  608. padding: 20px;
  609. }
  610. .flag-table .number-cell {
  611. width: 100px;
  612. white-space: nowrap;
  613. font-weight: bold;
  614. text-align: center;
  615. vertical-align: middle;
  616. }
  617. .flag-table .expressions-cell {
  618. line-height: 1.5;
  619. display: flex;
  620. justify-content: center;
  621. align-items: center;
  622. }
  623. .flag-table .expressions-item {
  624. white-space: nowrap;
  625. }
  626. .flag-table .expression-item.flag-1 {
  627. color: #1d05f3;
  628. background-color: transparent !important;
  629. }
  630. .flag-table .expression-item.flag-2 {
  631. color: #f00808;
  632. background-color: transparent !important;
  633. }
  634. .hidden {
  635. display: none !important;
  636. }
  637. .flag-table .expression-container {
  638. margin: 5px 0;
  639. display: flex;
  640. align-items: center;
  641. flex-wrap: wrap;
  642. gap: 8px;
  643. width: 100%;
  644. }
  645. .flag-table .toggle-btn {
  646. padding: 6px 8px;
  647. font-size: 14px;
  648. cursor: pointer;
  649. width: 100px;
  650. }
  651. .error {
  652. color: #e74c3c;
  653. text-align: center;
  654. padding: 10px;
  655. background-color: #fadbd8;
  656. border-radius: 4px;
  657. margin-top: 10px;
  658. }
  659. .secondary-btn {
  660. background-color: #95a5a6;
  661. color: white;
  662. padding: 8px 16px;
  663. border: none;
  664. border-radius: 4px;
  665. cursor: pointer;
  666. font-size: 14px;
  667. transition: background-color 0.3s;
  668. }
  669. .secondary-btn:hover {
  670. background-color: #7f8c8d;
  671. }