* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    /* 移除整体背景图片，改为纯色背景 */
    background: #f5f7fa;
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    text-align: center;
    padding: 20px 20px;
    /* 移除背景图片，使用纯色背景 */
    background-color: #f0f8ff; /* 使用淡蓝色背景 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 其他样式保持不变 */
.main-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.2em;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    margin-top: 40px;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.word-display {
    text-align: center;
    margin-bottom: 30px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.word-display h2 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.word-phonetic {
    color: #666;
    font-style: italic;
    margin: 0;
    font-size: 1.2em;
}

.home-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.home-btn {
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    border: none;
    margin: 10px 0;
    font-size: 1.2em;
    padding: 15px 30px;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s;
}

.home-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.difficulty-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 1em;
    margin: 0;
}

.difficulty-tag.basic {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.difficulty-tag.intermediate {
    background-color: #fff3e0;
    color: #ef6c00;
}

.difficulty-tag.advanced {
    background-color: #fce4ec;
    color: #c2185b;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.back-btn {
    margin-top: 20px;
    background-color: #f8f9fa;
    color: #2c3e50;
    border: 2px solid #e9ecef;
}

.back-btn:hover {
    background-color: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

.options {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    margin: 0;
    flex-wrap: wrap;
}

.option-btn {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    margin: 5px;
    padding: 15px;
    background-color: #f8f9fa;
    color: #2c3e50;
    border: 2px solid #e9ecef;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    background-color: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

.option-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.option-btn.correct-answer {
    background-color: #4caf50;
    color: white;
}

.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.difficulty-btn {
    background-color: #f8f9fa;
    color: #2c3e50;
    border: 2px solid #e9ecef;
}

.difficulty-btn:hover {
    background-color: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

.feedback-container {
    margin: 1rem 0;
    padding: 1rem;
    text-align: center;
}

.feedback {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
    animation: fadeIn 0.3s ease-in-out;
}

.feedback.correct {
    background-color: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
}

.feedback.incorrect {
    background-color: #ffebee;
    border: 1px solid #e57373;
    color: #c62828;
}

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

.feedback-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.feedback-content p {
    margin: 0;
    font-size: 1rem;
}

.wrong-answers {
    margin-top: 30px;
    text-align: left;
}

.wrong-answers h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.wrong-answers-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.wrong-answer-item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wrong-answer-item:last-child {
    border-bottom: none;
}

.test-history {
    margin-top: 20px;
    text-align: left;
}

.test-history-item {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.result-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

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

.progress {
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background-color: #2ecc71;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-header {
        padding: 20px;
    }

    .main-header h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .container {
        padding: 15px;
    }

    .options {
        flex-direction: column;
    }

    .option-btn {
        width: 100%;
        max-width: none;
    }

    .word-display h2 {
        font-size: 1.5em;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }
}

/* 适配不同屏幕高度 */
@media (max-height: 700px) {
    .main-header {
        padding: 15px;
    }

    .main-content {
        padding: 10px;
    }

    .container {
        margin: 10px auto;
    }

    .wrong-answers-list {
        max-height: 300px;
    }
}

/* 排行榜样式 */
.leaderboard {
    margin-top: 30px;
    text-align: left;
}

.leaderboard h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    background-color: #f8f9fa;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: #3498db;
    color: white;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: rgba(248, 249, 250, 0.9);
    border-radius: 5px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.leaderboard-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    width: 40px;
}

.rank-1 {
    color: #f1c40f;
}

.rank-2 {
    color: #95a5a6;
}

.rank-3 {
    color: #d35400;
}

.score-info {
    flex: 1;
    margin-left: 15px;
}

.score-info p {
    margin: 2px 0;
}

.score-percentage {
    font-weight: bold;
    color: #27ae60;
}

.word-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.word-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
    width: 100%;
}

.word-header h2 {
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    font-size: 2.5em;
}

.word-text {
    font-size: 1.5em;
    color: #2c3e50;
}

.word-meaning {
    margin: 5px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.play-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 5px;
    font-size: 1.2em;
    transition: transform 0.2s;
}

.play-btn:hover {
    transform: scale(1.1);
}

.play-btn span {
    font-size: 1.4em;
    line-height: 1;
    display: flex;
    align-items: center;
}

.test-word-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.choose-text {
    color: #666;
    margin: 15px 0;
    font-size: 1.1em;
}

.results-container {
    text-align: center;
    padding: 20px;
}

.result-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.wrong-answers-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.wrong-answers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.wrong-answer-item {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.word-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.word {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

.phonetic {
    color: #666;
    font-style: italic;
}

.meaning {
    color: #333;
    font-size: 1.1em;
}

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

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.history-item {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date {
    color: #666;
    font-size: 0.9em;
}

.difficulty {
    color: #2c3e50;
    font-weight: bold;
}

.score-info {
    text-align: right;
}

.score {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

.percentage {
    color: #3498db;
    font-size: 1.1em;
    margin-left: 10px;
}

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

.leaderboard-section {
    margin: 20px 0;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 20px;
}

.leaderboard-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.5);
}

.rank {
    font-weight: bold;
    color: #3498db;
    min-width: 50px;
}

@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .score-info {
        text-align: left;
    }

    .leaderboard-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

.error-message {
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 235, 238, 0.9);
    border-radius: 8px;
    margin: 20px auto;
    max-width: 600px;
}

.error-message h2 {
    color: #d32f2f;
    margin-bottom: 15px;
}

.error-message p {
    color: #666;
    margin: 10px 0;
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
}

.nav-btn {
    min-width: 100px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: #357abd;
}

.nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.incorrect-answer {
    background-color: #ffebee !important;
    border-color: #ffcdd2 !important;
    color: #d32f2f !important;
}

/* 页脚样式 */
.main-footer {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 40px 20px 20px;
    margin-top: 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
}

.footer-section {
    padding: 0 15px;
}

.footer-section h3 {
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 15px;
    position: relative;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #3498db;
}

.footer-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

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

.footer-section ul li {
    color: #666;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.footer-section ul li:before {
    content: '•';
    color: #3498db;
    position: absolute;
    left: 0;
}

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

.footer-bottom p {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
}

.seo-text {
    color: #999;
    font-size: 0.8em;
}

/* 移动端适配优化 */
@media (max-width: 768px) {
    .main-header {
        padding: 15px;
    }

    .main-header h1 {
        font-size: 1.8em;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 1em;
        line-height: 1.4;
        padding: 0 10px;
    }

    .container {
        padding: 15px;
        margin: 10px;
    }

    .options {
        flex-direction: column;
    }

    .option-btn {
        width: 100%;
        max-width: none;
        margin: 5px 0;
    }

    .word-display h2 {
        font-size: 1.5em;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
        margin: 5px 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-section {
        padding: 0 10px;
    }

    .footer-bottom {
        padding: 15px 10px;
    }

    .footer-bottom p {
        font-size: 0.8em;
    }

    .main-footer {
        padding: 20px 10px;
        margin-top: 20px;
    }
}

/* 适配不同屏幕高度 */
@media (max-height: 700px) {
    .main-header {
        padding: 10px;
    }

    .main-content {
        padding: 10px;
    }

    .container {
        margin: 5px auto;
    }

    .footer-content {
        gap: 15px;
    }

    .footer-section {
        padding: 0 5px;
    }
}