styles.css 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889
  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. .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: 600px;
  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-actions {
  489. display: flex;
  490. gap: 5px;
  491. align-items: center;
  492. }
  493. .history-card.favorite {
  494. border-left: 4px solid #ffcc00;
  495. }
  496. /* 确保收藏模块中的删除按钮样式一致 */
  497. .favorites-module .history-card.deleted {
  498. opacity: 0.6;
  499. background-color: #f9f9f9;
  500. border-color: #ddd;
  501. border-left: 4px solid #e74c3c !important;
  502. }
  503. .history-card-type {
  504. font-weight: bold;
  505. color: #3498db;
  506. padding: 3px 8px;
  507. border-radius: 4px;
  508. background-color: rgba(52, 152, 219, 0.1);
  509. }
  510. .history-card-time {
  511. font-size: 0.85em;
  512. color: #7f8c8d;
  513. }
  514. .history-card-content {
  515. display: flex;
  516. flex-direction: column;
  517. }
  518. .history-card .problem-text {
  519. font-size: 14px;
  520. line-height: 1.4;
  521. margin-bottom: 5px;
  522. }
  523. .history-card .problem-numbers {
  524. display: flex;
  525. gap: 10px;
  526. margin: 5px 0;
  527. justify-content: center;
  528. }
  529. .history-card .problem-number {
  530. display: inline-flex;
  531. align-items: center;
  532. justify-content: center;
  533. width: 30px;
  534. height: 30px;
  535. background-color: #4CAF50;
  536. border-radius: 4px;
  537. font-weight: bold;
  538. font-size: 16px;
  539. }
  540. .history-card-answers {
  541. padding-top: 8px;
  542. border-top: 1px dashed #eee;
  543. }
  544. .history-card-answers h3 {
  545. font-size: 14px;
  546. margin-bottom: 8px;
  547. }
  548. .history-card-answers .answers-container {
  549. font-size: 13px;
  550. }
  551. .history-card-answers .solution-item,
  552. .history-card-answers .answer-item,
  553. .history-card-answers .answer-group {
  554. margin-bottom: 5px;
  555. padding: 5px;
  556. background-color: #f9f9f9;
  557. border-radius: 4px;
  558. }
  559. .history-card-question {
  560. font-size: 1.1em;
  561. color: #2c3e50;
  562. }
  563. .history-card-numbers {
  564. display: flex;
  565. gap: 10px;
  566. flex-wrap: wrap;
  567. }
  568. .history-card-solution {
  569. font-family: monospace;
  570. background-color: #f9f9f9;
  571. padding: 8px;
  572. border-radius: 4px;
  573. margin-top: 5px;
  574. }
  575. .load-more-btn {
  576. display: block;
  577. width: 100%;
  578. padding: 10px;
  579. margin-top: 15px;
  580. background-color: #f2f2f2;
  581. color: #333;
  582. border: 1px solid #ddd;
  583. border-radius: 4px;
  584. cursor: pointer;
  585. transition: background-color 0.3s;
  586. }
  587. .load-more-btn:hover {
  588. background-color: #e0e0e0;
  589. }
  590. .load-more-btn:disabled {
  591. background-color: #f9f9f9;
  592. color: #999;
  593. cursor: not-allowed;
  594. }
  595. /* 题型样式 */
  596. .type-a {
  597. border-color: #3498db;
  598. border-left: 4px solid #3498db;
  599. }
  600. .type-b {
  601. border-color: #2ecc71;
  602. border-left: 4px solid #2ecc71;
  603. }
  604. .type-c {
  605. border-color: #e74c3c;
  606. border-left: 4px solid #e74c3c;
  607. }
  608. .type-d {
  609. border-color: #f39c12;
  610. border-left: 4px solid #f39c12;
  611. }
  612. .type-e {
  613. border-color: #9b59b6;
  614. border-left: 4px solid #9b59b6;
  615. }
  616. .type-unknown {
  617. border-color: #9b59b6;
  618. border-left: 4px solid #9b59b6;
  619. }
  620. .flag-table .placeholder {
  621. text-align: center;
  622. color: #999;
  623. padding: 20px;
  624. }
  625. .flag-table .number-cell {
  626. width: 100px;
  627. white-space: nowrap;
  628. font-weight: bold;
  629. text-align: center;
  630. vertical-align: middle;
  631. }
  632. .flag-table .expressions-cell {
  633. line-height: 1.5;
  634. display: flex;
  635. justify-content: center;
  636. align-items: center;
  637. }
  638. .flag-table .expressions-item {
  639. white-space: nowrap;
  640. }
  641. .flag-table .expression-item.flag-1 {
  642. color: #1d05f3;
  643. background-color: transparent !important;
  644. }
  645. .flag-table .expression-item.flag-2 {
  646. color: #f00808;
  647. background-color: transparent !important;
  648. }
  649. .hidden {
  650. display: none !important;
  651. }
  652. /* 收藏和删除操作的过渡效果 */
  653. .flag-table .expression-container {
  654. margin: 5px 0;
  655. display: flex;
  656. align-items: center;
  657. flex-wrap: wrap;
  658. gap: 8px;
  659. width: 100%;
  660. }
  661. .flag-table .toggle-btn {
  662. padding: 6px 8px;
  663. font-size: 14px;
  664. cursor: pointer;
  665. width: 100px;
  666. }
  667. .error {
  668. color: #e74c3c;
  669. text-align: center;
  670. padding: 10px;
  671. background-color: #fadbd8;
  672. border-radius: 4px;
  673. margin-top: 10px;
  674. }
  675. .secondary-btn {
  676. background-color: #95a5a6;
  677. color: white;
  678. padding: 8px 16px;
  679. border: none;
  680. border-radius: 4px;
  681. cursor: pointer;
  682. font-size: 14px;
  683. transition: background-color 0.3s;
  684. }
  685. .secondary-btn:hover {
  686. background-color: #7f8c8d;
  687. }
  688. .icon-btn {
  689. display: inline-flex;
  690. align-items: center;
  691. justify-content: center;
  692. padding: 5px;
  693. border: none;
  694. background: transparent;
  695. color: #666;
  696. cursor: pointer;
  697. border-radius: 4px;
  698. transition: all 0.2s;
  699. }
  700. /* 确保按钮在不同状态下的一致性 */
  701. .show-history-answer-btn,
  702. .favorite-btn,
  703. .delete-btn {
  704. outline: none;
  705. box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
  706. }
  707. .show-history-answer-btn{
  708. color:#3498db;
  709. }
  710. .favorite-btn{
  711. color:#f39c12;
  712. }
  713. .delete-btn {
  714. color:#c0392b;
  715. }
  716. .delete-btn.active{
  717. color: #4CAF50;
  718. }
  719. /* 禁用状态的按钮样式 */
  720. .favorite-btn:disabled,
  721. .delete-btn:disabled {
  722. opacity: 0.6;
  723. cursor: not-allowed;
  724. }
  725. .icon-btn:hover {
  726. background: rgba(0, 0, 0, 0.05);
  727. /*color: #333;*/
  728. }
  729. .history-card-actions {
  730. display: flex;
  731. gap: 8px;
  732. }
  733. .show-history-answer-btn.active {
  734. color: #3498db;
  735. }
  736. .favorite-btn.active {
  737. color: #f39c12;
  738. }
  739. /* 已删除历史卡片样式 */
  740. .history-card.deleted {
  741. opacity: 0.6;
  742. background-color: #f9f9f9;
  743. border-color: #ddd;
  744. border-left: 4px solid #e74c3c;
  745. }
  746. .history-card.deleted .history-card-header {
  747. color: #7f8c8d;
  748. }
  749. .history-card.deleted .delete-btn {
  750. background-color: #e74c3c;
  751. color: white;
  752. border-color: #c0392b;
  753. }
  754. .history-card.deleted .delete-btn:hover {
  755. background-color: #c0392b;
  756. }