/**
 * Typing Speed Test Styles
 */

/* Tool Header Card - Same as the percentage-gpa.css */
.tool-header-card {
    padding: 2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tool-header-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.tool-icon-container {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tool-icon-container svg {
    width: 40px;
    height: 40px;
}

.tool-header-card h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tool-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* For mobile devices */
@media (max-width: 576px) {
    .tool-header-card {
        padding: 1.5rem;
    }
    
    .tool-header-card h1 {
        font-size: 1.5rem;
    }
    
    .tool-description {
        font-size: 1rem;
    }
    
    .tool-icon-container {
        width: 60px;
        height: 60px;
    }
    
    .tool-icon-container svg {
        width: 30px;
        height: 30px;
    }
}

/* Main Container */
.typing-speed-test-tool {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    padding: 1.5rem;
}

.typing-test-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header with Timer and Buttons */
.typing-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.timer-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    padding: 0.5rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

.start-btn {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.start-btn:hover {
    background-color: #45a049;
}

.restart-btn {
    background-color: #2196F3;
    color: white;
    font-weight: bold;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.restart-btn:hover {
    background-color: #0b7dda;
}

.btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Test Content */
.typing-test-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.paragraph-container {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 1.2rem;
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.6;
}

.typing-text {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

/* Highlight for typing */
.typing-text .correct {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.typing-text .incorrect {
    color: #f44336;
    background-color: rgba(244, 67, 54, 0.1);
    text-decoration: underline;
    text-decoration-color: #f44336;
}

.typing-text.completed {
    color: #757575;
}

/* Input Area */
.typing-input-container {
    position: relative;
}

.typing-input {
    width: 100%;
    min-height: 120px;
    max-height: 200px;
    padding: 1rem;
    font-size: 1.1rem;
    line-height: 1.6;
    border: 2px solid #ddd;
    border-radius: 6px;
    resize: none;
    transition: border-color 0.3s;
}

.typing-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.typing-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Results Section */
.result-section {
    background-color: #f5f5f5;
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.result-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.3rem;
}

.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
}

.result-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 1rem;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 0.9rem;
    color: #757575;
    text-transform: uppercase;
}

/* Hidden Class */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .typing-test-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .timer-display {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .results-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .result-item {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .typing-speed-test-tool {
        padding: 1rem;
    }
    
    .paragraph-container, 
    .typing-input {
        min-height: 150px;
    }
}

/* Instructions Section Styles */
.typing-test-instructions {
    padding: 30px 25px;
    background-color: #f7f9fc;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.instructions-title {
    color: #333;
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.instructions-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #4CAF50;
    margin: 12px auto 0;
}

.instructions-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.instructions-content > p {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.step {
    background-color: white;
    border-radius: 8px;
    padding: 20px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.step h3 {
    color: #4CAF50;
    font-size: 17px;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 8px;
}

.step h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #4CAF50;
}

.step p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Mobile Styles for Instructions */
@media (max-width: 768px) {
    .typing-test-instructions {
        padding: 25px 15px;
        margin-left: 15px;
        margin-right: 15px;
    }
    
    .instructions-title {
        font-size: 22px;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .step {
        padding: 15px 12px;
    }
    
    .step h3 {
        font-size: 16px;
    }
    
    .step p {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .typing-test-instructions {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .typing-test-instructions {
        padding: 20px 12px;
        margin-left: 10px;
        margin-right: 10px;
        border-radius: 6px;
    }
    
    .instructions-title {
        font-size: 20px;
    }
    
    .instructions-content > p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .step {
        padding: 12px 10px;
    }
} 