styles.css 16 KB

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