Files
InfoGenie/InfoGenie-frontend/public/toolbox/学习工具/计算机英语词汇学习/styles.css
2026-03-28 20:59:52 +08:00

364 lines
5.8 KiB
CSS

/* 基础样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
line-height: 1.6;
color: #2c3e50;
min-height: 100vh;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* 头部样式 */
header {
text-align: center;
margin-bottom: 30px;
}
header h1 {
color: #27ae60;
font-size: 2rem;
margin-bottom: 20px;
font-weight: 600;
}
/* 模式选择器 */
.mode-selector {
display: flex;
justify-content: center;
gap: 10px;
margin-bottom: 20px;
}
.mode-btn {
padding: 8px 16px;
border: 2px solid #27ae60;
background: transparent;
color: #27ae60;
border-radius: 20px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
font-weight: 500;
}
.mode-btn:hover {
background: #27ae60;
color: white;
transform: translateY(-2px);
}
.mode-btn.active {
background: #27ae60;
color: white;
}
/* 主要内容区域 */
main {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
/* 词汇卡片 */
.vocabulary-card {
background: white;
border-radius: 20px;
padding: 40px;
box-shadow: 0 10px 30px rgba(39, 174, 96, 0.1);
text-align: center;
margin-bottom: 30px;
width: 100%;
max-width: 500px;
border: 2px solid #e8f5e8;
transition: all 0.3s ease;
}
.vocabulary-card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 40px rgba(39, 174, 96, 0.15);
}
.word-number {
color: #95a5a6;
font-size: 14px;
margin-bottom: 20px;
font-weight: 500;
}
.word-content {
display: flex;
flex-direction: column;
gap: 15px;
}
.english-word {
font-size: 2.5rem;
font-weight: 700;
color: #27ae60;
margin-bottom: 10px;
}
.phonetic {
font-size: 1.2rem;
color: #7f8c8d;
font-style: italic;
}
.word-type {
font-size: 1rem;
color: #e67e22;
font-weight: 600;
}
.chinese-meaning {
font-size: 1.3rem;
color: #2c3e50;
font-weight: 500;
line-height: 1.5;
}
/* 进度信息 */
.progress-info {
color: #7f8c8d;
font-size: 16px;
margin-bottom: 30px;
font-weight: 500;
}
/* 控制按钮 */
.control-buttons {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
}
.control-btn {
padding: 12px 24px;
border: 2px solid #27ae60;
background: transparent;
color: #27ae60;
border-radius: 25px;
cursor: pointer;
font-size: 16px;
font-weight: 600;
transition: all 0.3s ease;
min-width: 100px;
}
.control-btn:hover {
background: #27ae60;
color: white;
transform: translateY(-2px);
}
.control-btn.primary {
background: #27ae60;
color: white;
}
.control-btn.primary:hover {
background: #219a52;
transform: translateY(-2px);
}
.control-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.control-btn:disabled:hover {
background: transparent;
color: #27ae60;
transform: none;
}
/* 平板端适配 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
.container {
padding: 30px;
}
header h1 {
font-size: 2.5rem;
}
.vocabulary-card {
padding: 50px;
}
.english-word {
font-size: 3rem;
}
.control-buttons {
gap: 20px;
}
.control-btn {
padding: 15px 30px;
font-size: 18px;
min-width: 120px;
}
}
/* 电脑端适配 (1024px+) */
@media (min-width: 1024px) {
.container {
padding: 40px;
}
header h1 {
font-size: 3rem;
}
.vocabulary-card {
padding: 60px;
}
.english-word {
font-size: 3.5rem;
}
.phonetic {
font-size: 1.4rem;
}
.chinese-meaning {
font-size: 1.5rem;
}
.control-buttons {
gap: 25px;
}
.control-btn {
padding: 15px 35px;
font-size: 18px;
min-width: 130px;
}
.mode-btn {
padding: 10px 20px;
font-size: 16px;
}
}
/* 手机端优化 (最大767px) */
@media (max-width: 767px) {
.container {
padding: 15px;
}
header h1 {
font-size: 1.8rem;
margin-bottom: 15px;
}
.mode-selector {
gap: 8px;
margin-bottom: 15px;
}
.mode-btn {
padding: 6px 12px;
font-size: 12px;
border-radius: 15px;
}
.vocabulary-card {
padding: 25px 20px;
margin-bottom: 20px;
border-radius: 15px;
}
.english-word {
font-size: 2rem;
margin-bottom: 8px;
}
.phonetic {
font-size: 1rem;
}
.word-type {
font-size: 0.9rem;
}
.chinese-meaning {
font-size: 1.1rem;
}
.word-content {
gap: 10px;
}
.progress-info {
font-size: 14px;
margin-bottom: 20px;
}
.control-buttons {
gap: 10px;
width: 100%;
}
.control-btn {
padding: 10px 16px;
font-size: 14px;
min-width: 80px;
flex: 1;
}
}
/* 超小屏幕优化 (最大480px) */
@media (max-width: 480px) {
.container {
padding: 10px;
}
header h1 {
font-size: 1.5rem;
}
.vocabulary-card {
padding: 20px 15px;
}
.english-word {
font-size: 1.8rem;
}
.control-buttons {
flex-direction: column;
gap: 8px;
}
.control-btn {
width: 100%;
min-width: auto;
}
}