* { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Microsoft YaHei', Arial, sans-serif; line-height: 1.6; color: #333; background-color: #f5f5f5; padding: 10px 3px; height: 100vh; width: 100vw; overflow: hidden; } .container { max-width: 900px; margin: 0 auto; border-radius: 8px; padding: 8px; } h1 { text-align: center; margin-bottom: 20px; color: #2c3e50; } .header { position: relative; } /* 模块切换器样式 */ .module-switcher select { appearance: none; -webkit-appearance: none; width: 150px; padding: 5px 35px 5px 15px; border: 2px solid #3498db; border-radius: 8px; background-color: #fff; 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"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; font-size: 16px; color: #333; transition: all 0.3s ease; cursor: pointer; margin: 10px 0; } .module-switcher select:hover { border-color: #3498db; box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2); } .module-switcher select:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2); } /* 下拉选项样式 */ .module-switcher option { padding: 10px; background: #fff; color: #333; } .header .module-switcher { position: absolute; right: 10px; top: 85px; } .description { text-align: center; margin-bottom: 30px; color: #7f8c8d; } .problem-selector { background-color: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 20px; } .problem-selector h3 { margin-bottom: 15px; color: #2c3e50; text-align: center; } /* 问题类型区域样式已更新,使用下拉选择框替代按钮组 */ .input-container { background-color: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 30px; } .number-inputs { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; justify-content: center; } .input-group { display: flex; flex-direction: column; } label { margin-bottom: 5px; font-weight: bold; color: #2c3e50; } input[type="number"] { width: 80px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; text-align: center; } button { display: block; width: 100%; padding: 12px; background-color: #3498db; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s; } button:hover { background-color: #2980b9; } .results-container { background-color: #f9f9f9; padding: 20px; border-radius: 8px; } .results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; } .stats { font-size: 14px; color: #7f8c8d; } .filter-container { display: flex; gap: 20px; margin-bottom: 15px; } .solutions { background-color: white; border: 1px solid #ddd; border-radius: 4px; padding: 15px; max-height: 400px; overflow-y: auto; display: flex; flex-wrap: wrap; } .solution-item { padding: 10px; border: 1px solid #eee; margin: 3px 0; display: flex; justify-content: space-between; width: 100%; } /* 模块样式 */ .module { background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); padding: 20px; } .module h2 { margin-top: 0; color: #333; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; margin-bottom: 20px; } /* 出题模块样式 */ .problem-module .problem-types, .problem-types { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; } .pre-container { display: inline-flex; gap: 8px; align-items: center; } .timer-container { display: inline-flex; align-items: center; background-color: #f2f2f2; padding: 5px 10px; border-radius: 4px; width: fit-content; margin-right: 15px; } .timer-label { font-size: 14px; color: #555; margin-right: 5px; } .timer-display { font-family: monospace; font-size: 16px; font-weight: bold; color: #e74c3c; white-space: nowrap; } .timer-display.time-up { color: #ffffff; background-color: #e74c3c; padding: 2px 6px; border-radius: 4px; animation: blink 1s infinite; } @keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } } .problem-type-select-container { flex: 1; } .problem-type-select { width: 100%; padding: 10px 35px 10px 15px; border: 2px solid #3498db; border-radius: 8px; background-color: #fff; 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"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; font-size: 16px; color: #333; appearance: none; -webkit-appearance: none; transition: all 0.3s ease; cursor: pointer; } .problem-type-select:hover, .problem-type-select:focus { border-color: #2980b9; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); outline: none; } .generate-problem-btn { padding: 10px 20px; background-color: #4CAF50; color: white; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; width: auto; } .generate-problem-btn:hover { background-color: #45a049; box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3); } .problem-container { background-color: #f9f9f9; border-radius: 6px; padding: 15px; } .problem-content { margin-bottom: 15px; } .problem-text { font-size: 16px; line-height: 1.5; margin-bottom: 15px; } .problem-numbers { display: flex; justify-content: center; gap: 15px; margin: 20px 0; } .problem-number { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background-color: #4CAF50; color: white; border-radius: 50%; font-size: 18px; font-weight: bold; } .problem-answer { background-color: #f0f8ff; border-radius: 6px; padding: 15px; margin-top: 15px; } .answers-container { display: flex; display: flex; flex-wrap: wrap; } .answer-item { padding: 8px; width: 100%; margin: 3px 0; } .answers-container .solution-item, .answers-container .answer-item { border: 1px solid #ddd; background: #fff; } .answer-group { display: flex; margin-bottom: 8px; } .answer-key { font-weight: bold; margin-right: 10px; min-width: 80px; } /* 计算器模块样式 */ .calculator-module .input-container { margin-bottom: 20px; } .secondary-btn { background-color: #2196F3; color: white; border: none; border-radius: 4px; padding: 8px 15px; cursor: pointer; transition: all 0.3s; } .secondary-btn:hover { background-color: #0b7dda; } .solution-expression { font-family: monospace; font-size: 16px; font-weight: bold; } .solution-flag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; } .flag-1 { background-color: #1d05f3 !important; } .flag-1 .solution-expression, .flag-1 .solution-flag { color: #fff; } .flag-2 { background-color: #f00808 !important; } .flag-2 .solution-expression, .flag-2 .solution-flag { color: #fff; } .placeholder { color: #95a5a6; text-align: center; padding: 20px; } /* 一星和二星数据表格样式 */ .flag-search-container { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; background-color: #f9f9f9; padding: 15px; border-radius: 8px; } .flag-search-container .search-btn { width: 100px; padding: 10px; } .search-input { display: flex; align-items: center; gap: 10px; } .search-input label { margin: 0; } .flag-data-container { background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); padding: 5px; margin-bottom: 20px; max-height: 600px; overflow-y: auto; } .flag-table { width: 100%; border-collapse: collapse; } .flag-table th { background-color: #f2f2f2; padding: 10px; text-align: center; border-bottom: 2px solid #ddd; } .flag-table td { padding: 5px; border-bottom: 1px solid #eee; vertical-align: top; } /* 历史记录模块样式 */ .history-search-container { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 15px; padding: 15px; border-radius: 8px; background-color: #f9f9f9; flex-wrap: wrap; } .history-search-container select, .history-search-container input { outline: none; padding: 5px 10px; border-radius: 4px; border: 2px solid #3498db; } .history-search-container .search-btn { width: auto; padding: 5px 15px; } .history-data-container { margin-top: 20px; max-height: calc(110vh - 400px); overflow-y: auto; } .history-cards-container { display: flex; flex-direction: column; gap: 10px; padding: 10px 0; } .history-card { background-color: white; border-radius: 8px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); padding: 8px; transition: transform 0.2s, opacity 0.3s, border-left-color 0.3s; margin-bottom: 5px; font-size: 14px; border: 1px solid; } .history-card:hover { transform: translateY(-2px); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12); } .history-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee; font-size: 13px; } .history-card.favorite { border-left: 4px solid #ffcc00; } /* 确保收藏模块中的删除按钮样式一致 */ .favorites-module .history-card.deleted { opacity: 0.6; background-color: #f9f9f9; border-color: #ddd; border-left: 4px solid #e74c3c !important; } .history-card-type { font-weight: bold; color: #3498db; padding: 3px 8px; border-radius: 4px; background-color: rgba(52, 152, 219, 0.1); } .history-card-time { font-size: 0.85em; color: #7f8c8d; } .history-card-content { display: flex; flex-direction: column; } .history-card .problem-text { font-size: 14px; line-height: 1.4; margin-bottom: 5px; } .history-card .problem-numbers { display: flex; gap: 10px; margin: 5px 0; justify-content: center; } .history-card .problem-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background-color: #4CAF50; border-radius: 4px; font-weight: bold; font-size: 16px; } .history-card-answers { padding-top: 8px; border-top: 1px dashed #eee; } .history-card-answers h3 { font-size: 14px; margin-bottom: 8px; } .history-card-answers .answers-container { font-size: 13px; } .history-card-answers .solution-item, .history-card-answers .answer-item, .history-card-answers .answer-group { margin-bottom: 5px; padding: 5px; background-color: #f9f9f9; border-radius: 4px; } .history-card-question { font-size: 1.1em; color: #2c3e50; } .history-card-numbers { display: flex; gap: 10px; flex-wrap: wrap; } .history-card-solution { font-family: monospace; background-color: #f9f9f9; padding: 8px; border-radius: 4px; margin-top: 5px; } .records-stats { display: block; width: 100%; padding: 3px; /*background-color: #f5f5f5;*/ color: #666; text-align: center; font-size: 14px; } /* 保留加载按钮样式用于其他地方 */ .load-more-btn { display: block; width: 100%; padding: 10px; margin-top: 5px; background-color: #2ecc71; color: #eee; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; transition: background-color 0.3s; } .load-more-btn:hover { color: #fff; background-color: #2ecc71; } .load-more-btn:disabled { color: #ddd; cursor: not-allowed; } /* 题型样式 */ .type-a { border-color: #3498db; border-left: 4px solid #3498db; } .type-b { border-color: #2ecc71; border-left: 4px solid #2ecc71; } .type-c { border-color: #e74c3c; border-left: 4px solid #e74c3c; } .type-d { border-color: #f39c12; border-left: 4px solid #f39c12; } .type-e { border-color: #9b59b6; border-left: 4px solid #9b59b6; } .type-unknown { border-color: #9b59b6; border-left: 4px solid #9b59b6; } .flag-table .placeholder { text-align: center; color: #999; padding: 20px; } .flag-table .number-cell { width: 100px; white-space: nowrap; font-weight: bold; text-align: center; vertical-align: middle; } .flag-table .expressions-cell { line-height: 1.5; display: flex; justify-content: center; align-items: center; } .flag-table .expressions-item { white-space: nowrap; } .flag-table .expression-item.flag-1 { color: #1d05f3; background-color: transparent !important; } .flag-table .expression-item.flag-2 { color: #f00808; background-color: transparent !important; } .hidden { display: none !important; } /* 收藏和删除操作的过渡效果 */ .flag-table .expression-container { margin: 5px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; } .flag-table .toggle-btn { padding: 6px 8px; font-size: 14px; cursor: pointer; width: 100px; } .error { color: #e74c3c; text-align: center; padding: 10px; background-color: #fadbd8; border-radius: 4px; margin-top: 10px; } .secondary-btn { background-color: #95a5a6; color: white; padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background-color 0.3s; } .secondary-btn:hover { background-color: #7f8c8d; } .icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 5px; border: none; background: transparent; color: #666; cursor: pointer; border-radius: 4px; transition: all 0.2s; } /* 确保按钮在不同状态下的一致性 */ .show-history-answer-btn, .favorite-btn, .delete-btn { outline: none; box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3); } .show-history-answer-btn { color: #3498db; } .favorite-btn { color: #f39c12; } .delete-btn { color: #c0392b; } .delete-btn.active { color: #4CAF50; } /* 禁用状态的按钮样式 */ .favorite-btn:disabled, .delete-btn:disabled { opacity: 0.6; cursor: not-allowed; } .icon-btn:hover { background: rgba(0, 0, 0, 0.05); /*color: #333;*/ } .history-card-actions { display: flex; align-items: center; gap: 15px; } .show-history-answer-btn.active { color: #3498db; } .favorite-btn.active { color: #f39c12; } /* 已删除历史卡片样式 */ .history-card.deleted { opacity: 0.6; background-color: #f9f9f9; border-color: #ddd; border-left: 4px solid #e74c3c; } .history-card.deleted .history-card-header { color: #7f8c8d; } .history-card.deleted .delete-btn { background-color: #e74c3c; color: white; border-color: #c0392b; } .history-card.deleted .delete-btn:hover { background-color: #c0392b; }