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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
    padding: 30px;
    text-align: center;
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #007bff;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 123, 255, 0.2);
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    font-size: 1.2em;
    flex-wrap: wrap;
    gap: 15px;
}

.level, .score, .progress {
    background-color: #e7f3ff;
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid #007bff;
    font-weight: bold;
}

#level, #score, #progress {
    color: #007bff;
}

.back-btn {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #007bff;
}

.back-btn:hover {
    background-color: white;
    color: #007bff;
    transform: scale(1.05);
}

.game-content {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.word-display {
    margin-bottom: 30px;
}

.word {
    font-size: 3em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 123, 255, 0.2);
}

.pronunciation {
    font-size: 1.2em;
    color: #6c757d;
    font-style: italic;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.option-btn {
    background-color: white;
    border: 2px solid #007bff;
    border-radius: 10px;
    padding: 15px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.option-btn:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.option-btn.correct {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    animation: correctAnswer 0.5s ease-in-out;
}

.option-btn.incorrect {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    animation: incorrectAnswer 0.5s ease-in-out;
}

.feedback {
    margin: 20px 0;
    font-size: 1.2em;
    font-weight: bold;
    min-height: 30px;
}

.feedback.correct {
    color: #28a745;
    animation: fadeIn 0.5s ease-in-out;
}

.feedback.incorrect {
    color: #dc3545;
    animation: fadeIn 0.5s ease-in-out;
}

.next-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.next-btn:hover {
    background-color: #218838;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.difficulty-selector {
    background-color: #e7f3ff;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #007bff;
    margin-bottom: 20px;
}

.difficulty-selector h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.difficulty-buttons h4 {
    color: #007bff;
    margin: 10px 0 5px 0;
    font-size: 1.2em;
    text-align: center;
    width: 100%;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 5px;
}

.difficulty-buttons > div {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.difficulty-btn {
    background-color: white;
    border: 2px solid #007bff;
    color: #007bff;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.difficulty-btn:hover {
    background-color: #007bff;
    color: white;
    transform: scale(1.1);
}

.difficulty-btn.active {
    background-color: #007bff;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.game-over {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 15px;
    border: 3px solid #007bff;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

.game-over h2 {
    color: #007bff;
    margin-bottom: 20px;
    font-size: 2em;
}

.final-score, .accuracy {
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

#finalScore, #accuracy {
    color: #007bff;
}

.restart-btn, .change-difficulty-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
    border: 2px solid #007bff;
}

.restart-btn:hover, .change-difficulty-btn:hover {
    background-color: white;
    color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* 动画效果 */
@keyframes correctAnswer {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes incorrectAnswer {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

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

/* 发音按钮样式 */
.sound-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.sound-btn:hover {
    background-color: #218838;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

/* 学习模式样式 */
.learning-mode {
    background-color: #e7f3ff;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #007bff;
    margin-bottom: 20px;
}

.learning-mode h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.mode-btn {
    background-color: #007bff;
    color: white;
    border: 2px solid #007bff;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.mode-btn:hover {
    background-color: white;
    color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* 学习内容样式 */
.learning-content {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    text-align: center;
}

.learning-word-display {
    margin-bottom: 30px;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
}

.learning-word {
    font-size: 3em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 123, 255, 0.2);
}

.learning-pronunciation {
    font-size: 1.5em;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 15px;
}

.learning-meaning {
    font-size: 2em;
    color: #28a745;
    font-weight: bold;
    background-color: #e7f9ed;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #28a745;
}

/* 学习控制按钮样式 */
.learning-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.learning-nav-btn {
    background-color: #007bff;
    color: white;
    border: 2px solid #007bff;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.learning-nav-btn:hover {
    background-color: white;
    color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.exit-btn {
    background-color: #dc3545;
    color: white;
    border: 2px solid #dc3545;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.exit-btn:hover {
    background-color: white;
    color: #dc3545;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .game-info {
        flex-direction: column;
        align-items: center;
    }
    
    .word {
        font-size: 2em;
    }
    
    .options {
        grid-template-columns: 1fr;
    }
    
    .difficulty-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .difficulty-btn {
        width: 100%;
        max-width: 200px;
    }
    
    /* 学习模式响应式 */
    .learning-controls {
        flex-direction: column;
    }
    
    .learning-word {
        font-size: 2em;
    }
    
    .learning-pronunciation {
        font-size: 1.2em;
    }
    
    .learning-meaning {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }
    
    .game-content {
        padding: 20px;
    }
    
    .word {
        font-size: 1.8em;
    }
    
    .pronunciation {
        font-size: 1em;
    }
    
    /* 学习模式响应式 */
    .learning-word-display {
        padding: 20px;
    }
    
    .learning-word {
        font-size: 1.8em;
    }
    
    .learning-pronunciation {
        font-size: 1em;
    }
    
    .learning-meaning {
        font-size: 1.3em;
    }
}