/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input {
    margin-right: 5px;
}

button, .btn {
    display: inline-block;
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
}

button:hover, .btn:hover {
    background: #2980b9;
}

.btn.secondary {
    background: #95a5a6;
}

.btn.secondary:hover {
    background: #7f8c8d;
}

/* 进度条 */
.progress {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: #3498db;
    transition: width 0.3s;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
    font-size: 12px;
    font-weight: bold;
}

/* 题目样式 */
.question {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.word {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

.phonetic {
    text-align: center;
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.meaning {
    font-size: 20px;
    text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
}

/* 统计结果 */
.summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.stat-box {
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    background: #f8f9fa;
    width: 22%;
}

.stat-box.correct {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.stat-box.wrong {
    background: #ffebee;
    border: 1px solid #ffcdd2;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
}

/* 答题详情 */
.details {
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

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

tr.correct {
    background-color: #e8f5e9;
}

tr.wrong {
    background-color: #ffebee;
}

.result-correct {
    color: #2ecc71;
    font-weight: bold;
}

.result-wrong {
    color: #e74c3c;
    font-weight: bold;
}

/* 错题列表 */
.wrong-words-list {
    margin-bottom: 30px;
}

.wrong-word {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
}

.word-info {
    margin-bottom: 10px;
}

.wrong-info {
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

/* 警告框 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert.error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

.alert.info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #1565c0;
}

/* 操作按钮 */
.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* 答案反馈样式 */
.answer-feedback {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.answer-feedback h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.question-review {
    padding: 10px;
}

.question-review .word,
.question-review .meaning {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.question-review .phonetic {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.question-review p {
    margin: 5px 0;
}

.result {
    font-weight: bold;
    margin-top: 10px;
    padding: 5px;
    border-radius: 4px;
}

.result.correct {
    color: #2ecc71;
    background-color: #e8f5e9;
}

.result.wrong {
    color: #e74c3c;
    background-color: #ffebee;
}

.ai-feedback {
    margin-top: 10px;
    padding: 8px;
    background-color: #e3f2fd;
    border-radius: 4px;
    font-size: 14px;
    color: #1565c0;
}

/* 按钮容器 */
.btn-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错题考查区域 */
.wrong-exam-section {
    margin-top: 40px;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 8px;
}

.wrong-exam-info p {
    margin-bottom: 15px;
}

.btn-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 网站描述 */
.site-description {
    text-align: center;
    color: #555;
    margin-bottom: 30px;
    font-size: 18px;
}

/* 功能特点 */
.features {
    margin-bottom: 40px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.feature .icon {
    font-size: 36px;
    margin-bottom: 15px;
}

/* 使用指南 */
.how-it-works {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.how-it-works ol {
    padding-left: 20px;
    margin-top: 15px;
}

.how-it-works li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 学生评价 */
.testimonials {
    margin: 40px 0;
}

.testimonial {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

blockquote {
    font-style: italic;
    color: #555;
    margin-bottom: 10px;
}

.author {
    text-align: right;
    font-weight: bold;
    color: #3498db;
}

/* 词汇表 */
.vocab-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.vocab-table th, .vocab-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: center;
}

.vocab-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.vocab-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 页脚 */
footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #777;
    font-size: 14px;
}

footer nav {
    margin-top: 10px;
}

footer a {
    color: #3498db;
    text-decoration: none;
    margin: 0 5px;
}

/* 考试头部 */
.exam-header {
    margin-bottom: 20px;
}

.exam-header p {
    color: #7f8c8d;
    margin-top: 5px;
}