/* styles/test.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-tdah: #1976d2;
    --primary-discalculia: #f57c00;
    --primary-dislexia: #7b1fa2;
    --light-tdah: #e3f2fd;
    --light-discalculia: #fff3e0;
    --light-dislexia: #f3e5f5;
}

/* Hero del test */
.test-hero {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 40px 20px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.test-hero h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-hero p {
    font-size: 1.2rem;
    color: #666;
}

/* Barra de progreso */
.test-progress-container {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.test-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #4dd0e1, #26a69a);
    transition: width 0.3s ease;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(77, 208, 225, 0.5);
}

.test-progress-text {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 20px;
    border-radius: 25px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(5px);
}

/* Contenedor del test */
.test-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Preguntas */
.test-question {
    text-align: center;
}

.test-question h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.test-question .category-badge {
    display: inline-block;
    padding: 8px 25px;
    border-radius: 50px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-badge.tdah {
    background: linear-gradient(135deg, var(--light-tdah), #bbdefb);
    color: var(--primary-tdah);
    border: 2px solid var(--primary-tdah);
}

.category-badge.discalculia {
    background: linear-gradient(135deg, var(--light-discalculia), #ffe0b2);
    color: var(--primary-discalculia);
    border: 2px solid var(--primary-discalculia);
}

.category-badge.dislexia {
    background: linear-gradient(135deg, var(--light-dislexia), #e1bee7);
    color: var(--primary-dislexia);
    border: 2px solid var(--primary-dislexia);
}

/* Opciones de respuesta */
.test-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.test-option {
    position: relative;
}

.test-option input[type="radio"] {
    display: none;
}

.test-option label {
    display: block;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.test-option label:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #4dd0e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.2);
}

.test-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #4dd0e1, #26a69a);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(77, 208, 225, 0.4);
}

.test-option label .option-value {
    float: right;
    font-weight: 600;
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
}

.test-option input[type="radio"]:checked + label .option-value {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Controles de navegación */
.test-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.test-prev-btn,
.test-next-btn,
.test-submit-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.test-prev-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 2px solid #4dd0e1;
}

.test-prev-btn:hover:not(:disabled) {
    background: #4dd0e1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.4);
}

.test-prev-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.test-next-btn {
    background: linear-gradient(135deg, #4dd0e1, #26a69a);
    color: white;
    margin-left: auto;
    border: 2px solid transparent;
}

.test-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.4);
}

.test-submit-btn {
    background: linear-gradient(135deg, #4dd0e1, #26a69a);
    color: white;
    margin-left: auto;
    border: 2px solid transparent;
}

.test-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.4);
}

/* Resultados del test */
.test-results {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.test-results h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-results > p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Cards de resultados */
.results-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.result-card {
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid transparent;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.result-card.tdah {
    background: linear-gradient(135deg, rgba(227, 242, 253, 0.9), rgba(187, 222, 251, 0.9));
    border: 2px solid var(--primary-tdah);
}

.result-card.discalculia {
    background: linear-gradient(135deg, rgba(255, 243, 224, 0.9), rgba(255, 224, 178, 0.9));
    border: 2px solid var(--primary-discalculia);
}

.result-card.dislexia {
    background: linear-gradient(135deg, rgba(243, 229, 245, 0.9), rgba(225, 190, 231, 0.9));
    border: 2px solid var(--primary-dislexia);
}

.result-card i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.result-card.tdah i { 
    color: var(--primary-tdah);
    text-shadow: 0 2px 10px rgba(25, 118, 210, 0.3);
}

.result-card.discalculia i { 
    color: var(--primary-discalculia);
    text-shadow: 0 2px 10px rgba(245, 124, 0, 0.3);
}

.result-card.dislexia i { 
    color: var(--primary-dislexia);
    text-shadow: 0 2px 10px rgba(123, 31, 162, 0.3);
}

.result-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.result-card.tdah h3 { color: var(--primary-tdah); }
.result-card.discalculia h3 { color: var(--primary-discalculia); }
.result-card.dislexia h3 { color: var(--primary-dislexia); }

.result-score {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 15px 0;
    color: #333;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-recommendation {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.result-games {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.game-tag {
    padding: 6px 15px;
    background: white;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.game-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.game-tag i {
    font-size: 0.8rem;
    margin-right: 5px;
    color: #4dd0e1;
}

/* Acciones de resultados */
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.results-actions .btn-primary {
    background: linear-gradient(135deg, #4dd0e1, #26a69a);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.results-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.4);
}

.results-actions .btn-outline {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 2px solid #4dd0e1;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.results-actions .btn-outline:hover {
    background: #4dd0e1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.4);
}

/* Mensaje de acceso restringido para test */
#testAccessRestricted {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

#testAccessRestricted .restricted-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 500px;
}

#testAccessRestricted .restricted-card i {
    font-size: 4rem;
    color: #4dd0e1;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(77, 208, 225, 0.3);
}

#testAccessRestricted .restricted-card h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

#testAccessRestricted .restricted-card p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

#testAccessRestricted .btn-primary {
    background: linear-gradient(135deg, #4dd0e1, #26a69a);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#testAccessRestricted .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .test-hero h1 {
        font-size: 2rem;
    }
    
    .test-hero p {
        font-size: 1rem;
    }
    
    .test-container {
        padding: 20px;
        margin: 0 15px;
    }

    .test-question h3 {
        font-size: 1.2rem;
    }

    .test-option label {
        padding: 15px;
    }
    
    .test-option label .option-value {
        float: none;
        display: inline-block;
        margin-left: 10px;
    }

    .results-cards {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .results-actions {
        flex-direction: column;
        padding: 0 15px;
    }

    .results-actions button {
        width: 100%;
    }
    
    .test-navigation {
        flex-direction: column;
    }
    
    .test-prev-btn,
    .test-next-btn,
    .test-submit-btn {
        width: 100%;
        margin-left: 0;
    }
}

/* Animaciones adicionales */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.test-question {
    animation: slideIn 0.3s ease;
}

.result-card {
    animation: fadeIn 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.test-submit-btn {
    animation: pulse 2s infinite;
}

.test-submit-btn:hover {
    animation: none;
}