/* 全局样式 - 浅色主题 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 浅色背景 */
body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* 装饰性背景图案 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.05) 0%, transparent 50%);
    background-size: 100% 100%;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 - 浅色主题 */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #333;
    padding: 0.4rem 0;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1rem; /* 添加左右边距 */
}

.header-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-right: auto; /* 将标题推向左侧 */
}

.header-brand h1 {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    text-align: left; /* 标题文本靠左 */
}

.navigation {
    flex-shrink: 0;
}

.navigation ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #555;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav-link.active {
    color: white;
    background: linear-gradient(90deg, #667eea, #764ba2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.1rem;
}

.nav-text {
    font-size: 0.9rem;
}

.navigation ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

/* 主要内容区域 */
.main {
    min-height: calc(100vh - 120px);
    padding: 1.5rem 0;
}

/* 卡片样式 - 浅色主题 */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
    position: relative;
    padding-left: 1rem;
}

.card-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* 页面标题 - 星空背景 (仅首页) */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    background: linear-gradient(135deg, #0a0e27 0%, #1a237e 25%, #283593 50%, #3949ab 75%, #1a237e 100%);
    color: white;
    padding: 2rem 1rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 100vw;
    margin: 0 calc(50% - 50vw) 2rem calc(50% - 50vw);
    /* 16:9 比例高度 */
    height: 56.25vw; /* 9/16 = 0.5625 */
    max-height: 500px; /* 最大高度限制 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 星空动画效果 (仅首页) */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 50px 50px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 80px 10px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(3px 3px at 90px 40px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 150px 120px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 170px 30px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 200px 90px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 30px 150px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(3px 3px at 110px 160px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 60px 200px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 180px 180px, rgba(255, 255, 255, 0.7), transparent);
    background-size: 200px 200px;
    animation: twinkle 3s infinite ease-in-out;
    z-index: 0;
}

/* 子页面信息栏样式 (无星空背景) */
.subpage-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.subpage-header h1 {
    font-size: 1.8rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.subpage-header p {
    font-size: 1rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* 了解更多按钮 */
.learn-more-btn {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.learn-more-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 星空动画 */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: glow 2s infinite alternate;
    color: white;
}

.page-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0;
    color: #e8eaf6;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* 首页特性展示 */
.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.feature-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.feature-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.feature-content h4 {
    color: #333;
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.feature-content p {
    color: #666;
    margin: 0;
    font-size: 0.85rem;
}

/* 章节卡片 */
.chapter-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
}

.chapter-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.chapter-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.chapter-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.chapter-card h4 {
    color: #333;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chapter-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 课程卡片 */
.course-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.course-card h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.course-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 - 浅色主题 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #868e96);
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    box-shadow: 0 4px 20px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.2);
}

.btn-success:hover {
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    color: #333;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 滑块输入 */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.4);
}

/* 章节选项 */
.chapter-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chapter-option:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateX(2px);
}

.chapter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 1rem;
    cursor: pointer;
}

.chapter-option label {
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
}

/* 测验页面 */
.quiz-page {
    max-width: 800px;
    margin: 0 auto;
}

.question-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.question-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.quiz-question {
    margin-bottom: 1.5rem;
}

.quiz-question h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.option {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-size: 1rem;
}

.option:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateX(2px);
}

.option.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.quiz-navigation button {
    flex: 1;
    max-width: 180px;
}

/* 答案反馈弹窗 */
.answer-feedback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.feedback-content {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: feedbackAppear 0.3s ease;
}

@keyframes feedbackAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.feedback-header h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.feedback-body {
    text-align: left;
    margin-bottom: 1.5rem;
}

.feedback-body p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}

.feedback-body strong {
    color: #333;
}

.feedback-footer {
    text-align: center;
}

/* 聊天界面 */
.chat-page {
    max-width: 800px;
    margin: 0 auto;
    height: calc(100vh - 120px);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 300px;
    max-height: 70vh; /* 限制最大高度，避免在大屏幕上过高 */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #fafafa;
}

/* 输入框容器需要足够的空间 */
.chat-input-container {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start; /* 修改为flex-start，确保输入框可以正常显示 */
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.chat-welcome {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.chat-welcome h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.chat-tips {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border-left: 4px solid #4caf50;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    color: #155724;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    margin-left: auto;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.message.bot {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
}

.message.error {
    background: linear-gradient(45deg, #f44336, #ef5350);
    color: white;
    box-shadow: 0 2px 10px rgba(244, 67, 54, 0.2);
}

.message-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.message-text {
    flex: 1;
    line-height: 1.4;
}

/* Markdown内容样式 */
.message-text h1,
.message-text h2,
.message-text h3,
.message-text h4,
.message-text h5,
.message-text h6 {
    margin: 0.5em 0;
    font-weight: 600;
    line-height: 1.2;
}

.message-text h1 {
    font-size: 1.5em;
}

.message-text h2 {
    font-size: 1.4em;
}

.message-text h3 {
    font-size: 1.3em;
}

.message-text h4 {
    font-size: 1.2em;
}

.message-text h5 {
    font-size: 1.1em;
}

.message-text h6 {
    font-size: 1em;
}

.message-text p {
    margin: 0.5em 0;
}

.message-text strong {
    font-weight: 600;
}

.message-text em {
    font-style: italic;
}

.message-text ul,
.message-text ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.message-text li {
    margin: 0.2em 0;
}

.message-text code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.message-text pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 0.8em;
    overflow-x: auto;
    margin: 0.8em 0;
}

.message-text pre code {
    background-color: transparent;
    padding: 0;
}

.message-text blockquote {
    margin: 0.8em 0;
    padding: 0.5em 1em;
    border-left: 4px solid #dfe2e5;
    color: #6a737d;
    background-color: #f6f8fa;
}

.message-text table {
    border-collapse: collapse;
    margin: 0.8em 0;
    width: 100%;
}

.message-text th,
.message-text td {
    border: 1px solid #dfe2e5;
    padding: 0.4em 0.6em;
}

.message-text th {
    background-color: #f6f8fa;
    font-weight: 600;
}

.message-text a {
    color: #0366d6;
    text-decoration: none;
}

.message-text a:hover {
    text-decoration: underline;
}

.message-text img {
    max-width: 100%;
    height: auto;
}

.message-time {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-left: 0.5rem;
    white-space: nowrap;
    align-self: flex-end;
}

.chat-input-container {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-input-wrapper textarea {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    min-height: 45px;
    height: 45px;
    max-height: 150px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.chat-input-wrapper textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#send-btn {
    padding: 0.4rem 1rem;
    height: 45px;
    min-height: 45px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-info {
    text-align: right;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.5rem;
}

/* 知识库页面 */
.knowledge-base-page {
    max-width: 1000px;
    margin: 0 auto;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.options-grid .card {
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    padding: 1.5rem;
}

.options-grid .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.options-grid .card h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.content-header h3 {
    color: #333;
    font-size: 1.3rem;
    margin: 0;
}

.knowledge-content {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 1.5rem;
    line-height: 1.7;
    color: #333;
    max-height: none; /* 取消高度限制 */
    overflow-y: visible; /* 允许内容自然流动 */
}

/* 知识库内容美化样式 */
.knowledge-content h1,
.knowledge-content h2,
.knowledge-content h3,
.knowledge-content h4,
.knowledge-content h5,
.knowledge-content h6 {
    margin: 1.2em 0 0.8em 0;
    font-weight: 600;
    line-height: 1.3;
    color: #2c3e50;
}

.knowledge-content h1 {
    font-size: 2em;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.3em;
}

.knowledge-content h2 {
    font-size: 1.7em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
}

.knowledge-content h3 {
    font-size: 1.4em;
}

.knowledge-content h4 {
    font-size: 1.2em;
}

.knowledge-content h5 {
    font-size: 1.1em;
}

.knowledge-content h6 {
    font-size: 1em;
    color: #777;
}

.knowledge-content p {
    margin: 0.8em 0;
    font-size: 1em;
    line-height: 1.7;
}

.knowledge-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.knowledge-content em {
    font-style: italic;
}

.knowledge-content ul,
.knowledge-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.knowledge-content li {
    margin: 0.4em 0;
}

.knowledge-content code {
    background-color: #f8f8f8;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d6336c;
}

.knowledge-content pre {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1em;
    overflow-x: auto;
    margin: 1em 0;
    border: 1px solid #eee;
}

.knowledge-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.knowledge-content blockquote {
    margin: 1em 0;
    padding: 0.8em 1.2em;
    border-left: 4px solid #667eea;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 0 4px 4px 0;
}

.knowledge-content table {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
    background-color: white;
}

.knowledge-content th,
.knowledge-content td {
    border: 1px solid #ddd;
    padding: 0.6em 0.8em;
    text-align: left;
}

.knowledge-content th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.knowledge-content a {
    color: #667eea;
    text-decoration: none;
}

.knowledge-content a:hover {
    text-decoration: underline;
}

.knowledge-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5em 0;
}

.knowledge-content::-webkit-scrollbar {
    width: 6px;
}

.knowledge-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.knowledge-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: #666;
}

.loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 25px;
    margin-bottom: 1rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    margin: 0 4px;
    animation: loadingDots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 聊天加载文本 */
.loading-text {
    text-align: center;
    color: #667eea;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* 错误页面 */
.error {
    text-align: center;
    padding: 2rem;
    background: rgba(244, 67, 54, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(244, 67, 54, 0.2);
    color: #c62828;
}

.error h3 {
    color: #c62828;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* 页脚 */
.footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #333;
    padding: 1.5rem 0 0.75rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: #666;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    color: #666;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-bottom p {
    color: #999;
    margin: 0.2rem 0;
    font-size: 0.8rem;
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header .container {
        flex-direction: row;
        gap: 0.5rem;
        text-align: left;
        padding: 0.4rem 0.5rem; /* 移动端较小的边距 */
    }

    .header-brand {
        align-items: center;
        text-align: left;
        flex-direction: row;
        margin-right: auto;
    }

    .header-brand h1 {
        font-size: 1.2rem;
        text-align: left;
    }

    .navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }

    .nav-link {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .nav-icon {
        font-size: 0.9rem;
    }

    .main {
        padding: 0.5rem 0;
    }

    .page-header {
        padding: 1.5rem 1rem;
        max-height: 400px;
        margin-bottom: 1rem;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }

    .learn-more-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        bottom: 1.5rem;
    }

    /* 星空背景在移动端的优化 */
    .page-header::before {
        background-size: 150px 150px;
        background-image:
            radial-gradient(3px 3px at 15px 20px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(2px 2px at 30px 50px, rgba(255, 255, 255, 0.7), transparent),
            radial-gradient(3px 3px at 40px 40px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(2px 2px at 60px 10px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(4px 4px at 70px 30px, rgba(255, 255, 255, 0.6), transparent),
            radial-gradient(2px 2px at 100px 60px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(3px 3px at 120px 90px, rgba(255, 255, 255, 0.7), transparent),
            radial-gradient(2px 2px at 140px 20px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(3px 3px at 160px 70px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(2px 2px at 20px 120px, rgba(255, 255, 255, 0.7), transparent),
            radial-gradient(4px 4px at 90px 130px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(2px 2px at 50px 160px, rgba(255, 255, 255, 0.6), transparent),
            radial-gradient(3px 3px at 140px 150px, rgba(255, 255, 255, 0.8), transparent);
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .home-features {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .feature-item {
        padding: 0.8rem;
    }

    .feature-icon {
        font-size: 1.3rem;
    }

    .feature-content h4 {
        font-size: 0.9rem;
    }

    .feature-content p {
        font-size: 0.75rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .course-card {
        padding: 1rem;
    }

    .course-card h3 {
        font-size: 1.1rem;
    }

    .course-actions {
        flex-direction: column;
        gap: 0.4rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        max-width: none;
    }

    .quiz-navigation {
        flex-direction: column;
    }

    .quiz-navigation button {
        max-width: none;
    }

    .chapter-card {
        padding: 0.8rem;
    }

    .chapter-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .chapter-card h4 {
        font-size: 0.95rem;
    }

    .chat-page {
        height: calc(100vh - 80px);
        margin: 0;
        padding: 0 5px;
    }

    .chat-container {
        height: calc(100vh - 130px);
        min-height: 250px;
        border-radius: 6px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    }

    .chat-messages {
        padding: 0.6rem;
    }

    .chat-welcome {
        padding: 0.8rem;
    }

    .chat-welcome h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .chat-welcome p {
        font-size: 0.85rem;
    }

    .chat-tips {
        padding: 0.6rem;
        margin: 0.6rem 0;
    }

    .chat-input-wrapper {
        gap: 0.4rem;
        align-items: flex-start;
    }

    .chat-input-wrapper textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
        min-height: 45px;
        height: 45px;
    }

    #send-btn {
        padding: 0.3rem 0.6rem;
        height: 36px;
        min-height: 36px;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.5rem;
        width: 100%;
    }

    .message {
        padding: 0.4rem;
        margin-bottom: 0.6rem;
        max-width: 90%;
    }

    .message-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .feedback-content {
        padding: 1.2rem;
        margin: 0.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 0.8rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    /* 隐藏页脚 */
    .footer {
        display: none;
    }

    /* 知识库页面移动端优化 */
    .knowledge-base-page {
        max-width: 100%;
        margin: 0;
    }

    .quick-links {
        flex-direction: column;
        gap: 0.6rem;
    }

    .quick-links .btn {
        width: 100%;
        text-align: center;
    }

    .content-header {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .content-header h2 {
        font-size: 1.2rem;
    }

    .knowledge-content {
        padding: 0.8rem;
        font-size: 0.9rem;
        max-height: none; /* 取消高度限制 */
        overflow-y: visible; /* 允许内容自然流动 */
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.2rem;
        text-align: left;
    }

    .page-header {
        padding: 1.2rem 0.8rem;
        max-height: 350px;
    }

    /* 星空背景在小屏幕上的优化 */
    .page-header::before {
        background-size: 120px 120px;
        background-image:
            radial-gradient(4px 4px at 10px 15px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(3px 3px at 25px 40px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(4px 4px at 35px 35px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(3px 3px at 50px 10px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(5px 5px at 60px 25px, rgba(255, 255, 255, 0.7), transparent),
            radial-gradient(3px 3px at 85px 50px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(4px 4px at 100px 70px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(3px 3px at 115px 15px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(4px 4px at 130px 60px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(3px 3px at 15px 100px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(5px 5px at 75px 110px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(3px 3px at 40px 130px, rgba(255, 255, 255, 0.7), transparent),
            radial-gradient(4px 4px at 115px 125px, rgba(255, 255, 255, 0.9), transparent);
    }

    .page-title {
        font-size: 1.4rem;
    }

    .page-subtitle {
        font-size: 0.8rem;
    }

    .learn-more-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        bottom: 1rem;
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .course-card {
        padding: 1rem;
    }

    .course-card h3 {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .nav-link {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .nav-icon {
        font-size: 0.9rem;
    }

    .quiz-question h3 {
        font-size: 1.1rem;
    }

    .option {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .chat-page {
        height: calc(100vh - 80px);
        padding: 0;
    }

    .chat-container {
        height: calc(100vh - 130px);
        min-height: 250px;
        border-radius: 6px;
    }

    .chat-messages {
        padding: 0.5rem;
    }

    .chat-welcome {
        padding: 0.75rem;
    }

    .chat-welcome h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .chat-welcome p {
        font-size: 0.85rem;
    }

    .chat-tips {
        padding: 0.5rem;
        margin: 0.5rem 0;
        font-size: 0.8rem;
    }

    .chat-input-wrapper {
        gap: 0.4rem;
        align-items: flex-start;
    }

    .chat-input-wrapper textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
        min-height: 45px;
        height: 45px;
    }

    #send-btn {
        padding: 0.3rem 0.6rem;
        height: 36px;
        min-height: 36px;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.5rem;
        width: 100%;
    }

    .chat-input-info {
        font-size: 0.7rem;
        margin-top: 0.3rem;
    }

    .message {
        padding: 0.4rem;
        margin-bottom: 0.5rem;
    }

    .message-text {
        font-size: 0.85rem;
    }

    .chapter-option {
        padding: 0.8rem;
    }

    .chapter-option label {
        font-size: 0.9rem;
    }

    /* 知识库页面小屏幕优化 */
    .subpage-header h1 {
        font-size: 1.5rem;
    }

    .subpage-header p {
        font-size: 0.9rem;
    }

    .content-header h2 {
        font-size: 1.2rem;
    }

    .knowledge-content {
        padding: 0.75rem;
        font-size: 0.9rem;
        max-height: none; /* 取消高度限制 */
        overflow-y: visible; /* 允许内容自然流动 */
    }

    .options-grid .card {
        padding: 1rem;
    }

    .options-grid .card h3 {
        font-size: 1.1rem;
    }
}

/* 特殊效果 */
.highlight {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0%, 100% {
        background: rgba(102, 126, 234, 0.05);
    }
    50% {
        background: rgba(102, 126, 234, 0.15);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 小屏幕设备优化 */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    .header h1 {
        font-size: 1.1rem;
        text-align: left;
    }

    .page-header {
        padding: 1rem 0.6rem;
        max-height: 300px;
    }

    /* 星空背景在最小屏幕上的优化 */
    .page-header::before {
        background-size: 100px 100px;
        background-image:
            radial-gradient(5px 5px at 8px 12px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(4px 4px at 20px 30px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(5px 5px at 30px 30px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(4px 4px at 40px 8px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(6px 6px at 50px 20px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(4px 4px at 70px 40px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(5px 5px at 85px 55px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(4px 4px at 100px 12px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(5px 5px at 110px 50px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(4px 4px at 12px 80px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(6px 6px at 60px 90px, rgba(255, 255, 255, 1), transparent),
            radial-gradient(4px 4px at 35px 105px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(5px 5px at 95px 100px, rgba(255, 255, 255, 1), transparent);
    }

    .page-title {
        font-size: 1.3rem;
    }

    .page-subtitle {
        font-size: 0.75rem;
    }

    .learn-more-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        bottom: 0.8rem;
    }

    .card {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    /* 聊天界面最小屏幕优化 */
    .chat-page {
        height: calc(100vh - 70px);
    }

    .chat-container {
        height: calc(100vh - 120px);
        min-height: 220px;
        border-radius: 4px;
    }

    .chat-messages {
        padding: 0.4rem;
    }

    .chat-welcome {
        padding: 0.5rem;
    }

    .chat-welcome h3 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    .chat-welcome p {
        font-size: 0.8rem;
    }

    .chat-tips {
        padding: 0.4rem;
        margin: 0.4rem 0;
        font-size: 0.75rem;
    }

    .chat-input-wrapper {
        gap: 0.3rem;
        flex-direction: column;
        align-items: stretch;
    }

    .chat-input-wrapper textarea {
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 40px;
        height: 40px;
    }

    #send-btn {
        padding: 0.2rem 0.5rem;
        height: 30px;
        min-height: 30px;
        font-size: 0.75rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .chat-input-info {
        font-size: 0.65rem;
        margin-top: 0.2rem;
    }

    .message {
        padding: 0.3rem;
        margin-bottom: 0.4rem;
    }

    .message-text {
        font-size: 0.8rem;
    }

    .message-time {
        font-size: 0.6rem;
    }

    /* 知识库页面最小屏幕优化 */
    .subpage-header h1 {
        font-size: 1.3rem;
    }

    .subpage-header p {
        font-size: 0.85rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .content-header h2 {
        font-size: 1.1rem;
    }

    .knowledge-content {
        padding: 0.5rem;
        max-height: none; /* 取消高度限制 */
        overflow-y: visible; /* 允许内容自然流动 */
        font-size: 0.85rem;
    }

    .options-grid .card {
        padding: 0.75rem;
    }

    .options-grid .card h3 {
        font-size: 1rem;
    }
}

/* 横屏模式优化 */
@media (max-height: 600px) and (orientation: landscape) {
    .chat-container {
        height: 300px;
    }

    .main {
        padding: 1rem 0;
    }

    .page-header {
        margin-bottom: 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }
}

/* 超小高度设备优化 */
@media (max-height: 500px) {
    .chat-container {
        height: 250px;
    }

    .chat-input-wrapper textarea {
        min-height: 40px;
        padding: 0.5rem;
        font-size: 0.85rem;
        height: 40px;
    }

    #send-btn {
        height: 30px;
        min-height: 30px;
        padding: 0.2rem 0.6rem;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.5rem;
        width: 100%;
    }
}

/* 测试结果页面样式 */
#quiz-results {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

#quiz-results h2 {
    color: #333;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

#quiz-results .score {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    color: #333;
}

.question-review {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #ddd;
    transition: all 0.3s ease;
}

/* 答对题目样式 - 淡绿色背景 */
.question-review.correct {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* 答错题目样式 - 淡红色背景 */
.question-review.incorrect {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.question-review h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.question-review p {
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.question-review .correct-answer {
    color: #2E7D32;
    font-weight: 600;
}

.question-review .user-answer {
    font-weight: 600;
}

.question-review .user-answer.correct {
    color: #2E7D32;
}

.question-review .user-answer.incorrect {
    color: #C62828;
}

.question-review .explanation {
    color: #666;
    font-style: italic;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.8rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* 移动端测试结果优化 */
@media (max-width: 768px) {
    .question-review {
        padding: 1rem;
        margin-bottom: 0.8rem;
    }

    .question-review h3 {
        font-size: 1rem;
    }

    #quiz-results .score {
        font-size: 1.2rem;
        padding: 0.8rem;
    }
}
