/* Main Container */
.typing-speed-pro-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Header */
.typing-speed-pro-header h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
}

/* Stats Display */
.typing-speed-pro-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.typing-speed-pro-stats .stat {
    text-align: center;
    flex: 1;
}

.typing-speed-pro-stats .value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.typing-speed-pro-stats .label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Time Selector */
.typing-speed-pro-time-selector {
    margin-bottom: 20px;
}

.time-selector-container {
    display: flex;
    align-items: center;
    background-color: #f8fafc;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    width: fit-content;
    margin: 0 auto;
}

.time-icon {
    margin-right: 12px;
    color: #64748b;
}

.time-select {
    padding: 8px 15px 8px 10px;
    border: none;
    background-color: transparent;
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 15px;
    padding-right: 30px;
}

.time-select:focus {
    outline: none;
}

/* Text Container */
.typing-speed-pro-text-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

/* Text Display */
.typing-speed-pro-text-display {
    background-color: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    flex-grow: 1;
    min-height: 160px;
    font-size: 18px;
    line-height: 1.7;
    color: #334155;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Next Button */
.typing-speed-pro-next-btn {
    display: none;
    margin-left: 15px;
    padding: 12px 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
}

.typing-speed-pro-next-btn svg {
    margin-right: 8px;
}

.typing-speed-pro-next-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

/* Typing Input */
.typing-speed-pro-input {
    width: 100%;
    padding: 20px;
    font-size: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 20px;
    resize: none;
    min-height: 120px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.typing-speed-pro-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button */
.typing-speed-pro-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.typing-speed-pro-btn svg {
    margin-right: 10px;
}

.typing-speed-pro-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Character highlighting */
.correct {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.incorrect {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    text-decoration: underline;
}

.current {
    background-color: rgba(253, 230, 138, 0.4);
    border-radius: 2px;
}

/* Time warning */
.time-warning {
    color: #ef4444 !important;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .typing-speed-pro-container {
        padding: 20px;
    }
    
    .typing-speed-pro-stats {
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .typing-speed-pro-stats .stat {
        width: 50%;
        margin-bottom: 15px;
    }
    
    .typing-speed-pro-text-display {
        padding: 20px;
        font-size: 16px;
        min-height: 140px;
    }
    
    .typing-speed-pro-input {
        padding: 15px;
        min-height: 100px;
    }
    
    .typing-speed-pro-text-container {
        flex-direction: column;
    }
    
    .typing-speed-pro-next-btn {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }
    
    .time-selector-container {
        width: 100%;
        justify-content: center;
    }
}