/* Estilos para el test de nivel de idiomas - Usando la estética de workouts */

/* Variables CSS para consistencia con workouts */
:root {
    --primary-color: #ffffff;
    --text-color: #2d3748;
    --accent-color: #E54539;
    --accent-hover: #c53030;
    --active-bg: #f7fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 16px;
    --radius-sm: 8px;
    --spacing: 1.5rem;
    --spacing-sm: 1rem;
    --spacing-lg: 2rem;
}

.workouts-test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.test-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.test-header h2 {
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
}

.test-header p {
    color: #718096;
    font-size: 1.1rem;
    line-height: 1.6;
}

.test-content {
    background: var(--primary-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.test-start {
    text-align: center;
    padding: var(--spacing-lg);
}

.test-start p {
    margin-bottom: var(--spacing);
    color: #4a5568;
    line-height: 1.6;
}

.start-test-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.start-test-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.test-questions {
    display: none;
    padding: var(--spacing-lg);
}

.question-item {
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing);
    box-shadow: var(--shadow);
}

.question-header {
    margin-bottom: var(--spacing);
    display: flex;
    align-items: center;
    gap: 15px;
}

.question-number {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-weight: 600;
    margin-right: 15px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.question-text {
    display: inline;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.question-answer {
    margin-top: var(--spacing);
}

.answer-textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--primary-color);
}

.answer-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(229, 69, 57, 0.1);
}

.answer-textarea.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.multiple-choice-options {
    display: grid;
    gap: var(--spacing-sm);
}

.multiple-choice-options label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--active-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.multiple-choice-options label:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.multiple-choice-options input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.multiple-choice-options input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--accent-color);
}

.rating-options {
    text-align: center;
}

.rating-options label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: var(--spacing);
    display: block;
}

.rating-scale {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.rating-scale input[type="radio"] {
    display: none;
}

.rating-scale label {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.rating-scale label:hover {
    border-color: var(--accent-color);
    background: var(--active-bg);
}

.rating-scale input[type="radio"]:checked + label {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #718096;
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--active-bg);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing);
}

.test-progress {
    font-weight: 600;
    color: #4a5568;
    font-size: 1rem;
}

.test-buttons {
    display: flex;
    gap: 15px;
}

.test-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: var(--shadow);
}

.test-btn-primary {
    background: var(--accent-color);
    color: white;
}

.test-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.test-btn-secondary {
    background: var(--primary-color);
    color: #4a5568;
    border: 2px solid var(--border-color);
}

.test-btn-secondary:hover {
    background: var(--active-bg);
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.test-results {
    display: none;
    text-align: center;
    padding: var(--spacing-lg);
}

.test-results h3 {
    color: var(--text-color);
    margin-bottom: var(--spacing);
    font-size: 1.8rem;
    font-weight: 700;
}

.level-assigned {
    background: var(--accent-color);
    color: white;
    padding: var(--spacing);
    border-radius: var(--radius);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing);
    display: inline-block;
    min-width: 200px;
    box-shadow: var(--shadow);
}

.level-description {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.test-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.test-loading {
    text-align: center;
    padding: var(--spacing-lg);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.test-error {
    text-align: center;
    padding: var(--spacing-lg);
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: var(--radius);
    color: #c53030;
}

.test-login-required {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--active-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.test-login-required p {
    margin-bottom: var(--spacing);
    color: #4a5568;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .workouts-test-container {
        padding: var(--spacing-sm);
    }
    
    .test-header {
        padding: var(--spacing);
    }
    
    .test-header h2 {
        font-size: 1.5rem;
    }
    
    .test-questions {
        padding: var(--spacing);
    }
    
    .question-item {
        padding: var(--spacing);
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .test-navigation {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .test-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .test-btn {
        flex: 1;
        max-width: 150px;
    }
    
    .rating-scale {
        gap: 15px;
    }
    
    .rating-scale label {
        width: 40px;
        height: 40px;
    }
}