/* WordPress Typing Speed Test - CSS */
.typing-speed-test {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Header */
.tt-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.tt-header h2 {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.tt-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Stats */
.tt-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.tt-stat {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #eaeaea;
}

.tt-stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
}

#tt-timer { color: #0073aa; }
#tt-wpm { color: #46b450; }
#tt-accuracy { color: #f56e28; }

.tt-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Text Display */
.tt-text-box {
    background: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.tt-text-display {
    font-size: 18px;
    line-height: 1.6;
    min-height: 120px;
    margin-bottom: 15px;
    font-family: 'Courier New', Courier, monospace;
    color: #333;
}

/* Progress Bar */
.tt-progress {
    height: 6px;
    background: #eaeaea;
    border-radius: 3px;
    margin-bottom: 15px;
    overflow: hidden;
}

.tt-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    width: 0%;
    transition: width 0.3s;
}

/* Buttons */
.tt-small-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.tt-small-btn:hover {
    background: #005a87;
}

.tt-icon {
    font-size: 14px;
    line-height: 1;
}

/* Textarea */
.tt-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
    resize: none;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.tt-textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.tt-textarea:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* Control Buttons */
.tt-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.tt-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.tt-primary {
    background: #0073aa;
    color: white;
}

.tt-primary:hover:not(:disabled) {
    background: #005a87;
}

.tt-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.tt-secondary {
    background: #6c757d;
    color: white;
}

.tt-secondary:hover:not(:disabled) {
    background: #545b62;
}

.tt-secondary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Results */
.tt-results {
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    border-radius: 6px;
    padding: 25px;
    color: white;
    text-align: center;
    display: none;
}

.tt-results h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
}

.tt-score {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.tt-score-item {
    text-align: center;
}

.tt-score-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
}

.tt-score-label {
    font-size: 14px;
    opacity: 0.9;
}

.tt-message {
    font-size: 15px;
    font-style: italic;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Character Styling */
.tt-correct {
    color: #46b450;
    font-weight: 600;
}

.tt-incorrect {
    color: #dc3232;
    background: rgba(220, 50, 50, 0.1);
}

.tt-current {
    background: rgba(0, 115, 170, 0.2);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 600px) {
    .typing-speed-test {
        padding: 15px;
    }
    
    .tt-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .tt-stat {
        padding: 12px;
    }
    
    .tt-stat-value {
        font-size: 24px;
    }
    
    .tt-text-display {
        font-size: 16px;
        min-height: 100px;
    }
    
    .tt-textarea {
        font-size: 15px;
        padding: 12px;
    }
    
    .tt-buttons {
        flex-direction: column;
    }
    
    .tt-score {
        gap: 20px;
    }
    
    .tt-score-value {
        font-size: 30px;
    }
}