styles.css 16 KB

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