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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px;
    width: 100%;
    max-width: 1200px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

/* 难度选择器 */
.difficulty-selector {
    text-align: center;
}

.difficulty-selector h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.keyboard-hint {
    text-align: center;
    margin-top: 30px;
    padding: 10px;
}

.keyboard-hint p {
    color: #999;
    font-size: 0.85em;
    margin: 0;
    font-weight: normal;
}

.difficulty-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    min-width: 160px;
    padding: 15px 30px;
    font-size: 1.05em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.difficulty-btn.level1 {
    background: #4caf50;
}

.difficulty-btn.level2 {
    background: #8bc34a;
}

.difficulty-btn.level3 {
    background: #ff9800;
}

.difficulty-btn.level4 {
    background: #ff5722;
}

.difficulty-btn.level5 {
    background: #f44336;
}

.difficulty-btn.level6 {
    background: #e91e63;
}

.difficulty-btn.level7 {
    background: #9c27b0;
}

.difficulty-btn:hover {
    opacity: 0.85;
}

/* 练习区域 */
.practice-area {
    animation: fadeIn 0.5s ease;
}

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

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    color: #333;
    font-size: 1.8em;
    font-weight: bold;
}

.stat-value:nth-child(2) {
    color: #4caf50;
}

.stat-value:nth-child(4) {
    color: #f44336;
}

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

.current-word {
    font-size: 3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: 2px;
    word-wrap: break-word;
    line-height: 1.3;
}

.current-translation {
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
}

.hint {
    color: #999;
    font-size: 0.9em;
}

.input-area {
    margin-bottom: 25px;
    position: relative;
}

#inputField {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.3em;
    border: 2px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s ease;
}

#inputField:focus {
    border-color: #667eea;
}

#inputField.correct {
    border-color: #4caf50;
    background-color: #f1f8f4;
}

#inputField.incorrect {
    border-color: #f44336;
    background-color: #fef1f1;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.feedback {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
}

.feedback.success {
    color: #4caf50;
}

.feedback.error {
    color: #f44336;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-btn {
    min-width: 160px;
    padding: 15px 30px;
    font-size: 1.05em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #667eea;
    color: white;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.control-btn.home-btn {
    background: #607d8b;
}

.control-btn:hover {
    opacity: 0.85;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 25px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .current-word {
        font-size: 2em;
    }

    .current-translation {
        font-size: 1.2em;
    }

    .stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .stat-item {
        flex: 1 1 30%;
    }
}
