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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.back-btn {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat {
    text-align: center;
}

.label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

.stat span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
}

.sentence-display {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: black;
}

.original-sentence, .target-sentence {
    margin-bottom: 1.5rem;
}

.original-sentence h3, .target-sentence h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

#errorSentence {
    font-size: 1.2rem;
    line-height: 1.6;
    background: #ffe6e6;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ff4444;
}

#typingDisplay {
    font-size: 1.2rem;
    line-height: 1.6;
    min-height: 3rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    font-family: monospace;
}

.char-correct {
    background-color: #d4edda;
    color: #155724;
}

.char-incorrect {
    background-color: #f8d7da;
    color: #721c24;
}

.char-current {
    background-color: #007bff;
    color: white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.input-area {
    margin-bottom: 2rem;
}

#userInput {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

#userInput:focus {
    border-color: #007bff;
}

.controls {
    text-align: center;
    margin-bottom: 2rem;
}

.controls button {
    background: #FF6B35;
    color: white;
    border: none;
    padding: 1rem 2rem;
    margin: 0.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.controls button:hover {
    background: #e55a2b;
}

.controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.results {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.final-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

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

.value {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: #FFD700;
}

.unit {
    font-size: 1rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .stats, .final-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sentence-display {
        padding: 1rem;
    }
    
    #errorSentence, #typingDisplay {
        font-size: 1rem;
    }
}