* {
    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: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Stats Cards */
.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.stat {
    text-align: center;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 20px;
    border-radius: 15px;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Quote Display */
.test-area {
    margin-bottom: 30px;
}

.quote {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    font-size: 1.3em;
    line-height: 1.6;
    min-height: 120px;
    border-left: 5px solid #667eea;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.quote.current {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, #f0f8ff, #e6f3f3);
}

.quote .correct {
    color: #27ae60;
}

.quote .incorrect {
    color: #e74c3c;
    background-color: #ffe6e6;
    padding: 2px 4px;
    border-radius: 3px;
}

.quote .cursor {
    background-color: #3498db;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Input Area */
.input-area {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#test-input {
    flex: 1;
    padding: 20px;
    font-size: 1.2em;
    border: 3px solid #ddd;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    min-width: 300px;
    font-family: inherit;
}

#test-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    width: 0%;
    transition: width 0.3s ease;
}

/* Buttons */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 15px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 87, 108, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .input-area {
        flex-direction: column;
    }
    
    #test-input {
        min-width: auto;
    }
}