zylyzghc/style.css

379 lines
6.3 KiB
CSS
Raw Normal View History

2026-01-08 21:14:46 +08:00
/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background-color: #f5f7fa;
color: #333;
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
/* 头部样式 */
.header {
text-align: center;
margin-bottom: 30px;
padding: 20px;
background-color: #4a90e2;
color: white;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header h1 {
font-size: 2.5em;
margin-bottom: 10px;
}
.subtitle {
font-size: 1.2em;
opacity: 0.9;
}
/* 状态栏样式 */
.status-bar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding: 15px;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.score, .progress {
font-size: 1.1em;
font-weight: bold;
color: #4a90e2;
}
/* 内容区域样式 */
.content {
background-color: white;
border-radius: 10px;
padding: 30px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
/* 场景信息样式 */
.scene-info {
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 2px solid #e8f0fe;
}
.scene-info h2 {
color: #4a90e2;
margin-bottom: 10px;
font-size: 1.8em;
}
.scene-info p {
color: #666;
font-size: 1.1em;
}
/* 场景图片样式 */
.scene-image-container {
margin-top: 20px;
display: flex;
justify-content: center;
align-items: center;
}
#scene-image {
max-width: 100%;
height: auto;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
max-height: 300px;
object-fit: cover;
}
/* 对话区域样式 */
.conversation-area {
margin-bottom: 30px;
}
.conversation {
max-height: 400px;
overflow-y: auto;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #e9ecef;
}
.message {
margin-bottom: 15px;
padding: 10px 15px;
border-radius: 18px;
max-width: 80%;
clear: both;
}
.message.other {
background-color: #e3f2fd;
color: #1565c0;
float: left;
border-bottom-left-radius: 5px;
}
.message.user {
background-color: #4a90e2;
color: white;
float: right;
border-bottom-right-radius: 5px;
}
.message .speaker {
font-weight: bold;
margin-right: 10px;
}
/* 问题区域样式 */
.question-area {
margin-bottom: 30px;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #e9ecef;
}
.question h3 {
color: #4a90e2;
margin-bottom: 20px;
font-size: 1.3em;
}
.options {
display: flex;
flex-direction: column;
gap: 15px;
}
.option {
padding: 15px 20px;
border: 2px solid #e0e0e0;
background-color: white;
border-radius: 8px;
font-size: 1.1em;
cursor: pointer;
transition: all 0.3s ease;
text-align: left;
}
.option:hover {
border-color: #4a90e2;
background-color: #f0f8ff;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.option.selected {
border-color: #4a90e2;
background-color: #e3f2fd;
}
.option.correct {
border-color: #4caf50;
background-color: #e8f5e9;
color: #2e7d32;
}
.option.incorrect {
border-color: #f44336;
background-color: #ffebee;
color: #c62828;
}
.option.disabled {
cursor: not-allowed;
opacity: 0.7;
}
.option.disabled:hover {
transform: none;
box-shadow: none;
}
/* 反馈区域样式 */
.feedback {
margin-bottom: 20px;
padding: 15px 20px;
border-radius: 8px;
border: 1px solid #ddd;
text-align: center;
font-weight: bold;
}
.feedback.correct {
background-color: #e8f5e9;
border-color: #4caf50;
color: #2e7d32;
}
.feedback.incorrect {
background-color: #ffebee;
border-color: #f44336;
color: #c62828;
}
/* 控制按钮样式 */
.controls {
display: flex;
gap: 15px;
justify-content: center;
margin-top: 30px;
}
.btn {
padding: 12px 24px;
border: none;
border-radius: 8px;
font-size: 1.1em;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
min-width: 120px;
}
.btn-primary {
background-color: #4a90e2;
color: white;
}
.btn-primary:hover {
background-color: #357abd;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.btn-secondary {
background-color: #90a4ae;
color: white;
}
.btn-secondary:hover {
background-color: #78909c;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.btn-success {
background-color: #4caf50;
color: white;
}
.btn-success:hover {
background-color: #388e3c;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
/* 响应式设计 */
/* 实时对话功能样式 */
.real-time-chat {
margin-top: 30px;
padding-top: 20px;
border-top: 2px solid #e8f0fe;
}
.real-time-chat h3 {
color: #4a90e2;
margin-bottom: 15px;
font-size: 1.5em;
}
.chat-history {
max-height: 300px;
overflow-y: auto;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #e9ecef;
margin-bottom: 15px;
}
.chat-input {
display: flex;
gap: 10px;
}
#chat-message {
flex: 1;
padding: 12px 15px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 1em;
transition: all 0.3s ease;
}
#chat-message:focus {
outline: none;
border-color: #4a90e2;
box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}
.chat-input .btn {
min-width: 100px;
}
2026-01-08 21:14:46 +08:00
@media (max-width: 768px) {
.container {
padding: 10px;
}
.header h1 {
font-size: 2em;
}
.content {
padding: 20px;
}
.status-bar {
flex-direction: column;
gap: 10px;
align-items: flex-start;
}
.message {
max-width: 95%;
}
.controls {
flex-direction: column;
align-items: center;
}
.btn {
width: 100%;
max-width: 300px;
}
.chat-input {
flex-direction: column;
}
.chat-input .btn {
min-width: auto;
}
2026-01-08 21:14:46 +08:00
}