/* Reset e variabili CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0B5AAB;
    --primary-hover: #094A92;
    --primary-light: #1E6BC7;
    --primary-lighter: #E8F1FF;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(11, 90, 171, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(11, 90, 171, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



.test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gestione delle schermate */
.test-screen {
    display: none;
    width: 100%;
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: test-fadeIn 0.5s ease-out;
}

.test-screen.test-active {
    display: block;
}

@keyframes test-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Schermata di benvenuto */
.test-welcome-content {
    padding: 60px 40px;
    text-align: center;
}

.test-welcome-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.test-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.test-level-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.test-level-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 24px 16px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.test-level-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.test-level-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.test-level-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.test-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.test-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.test-feature-icon {
    font-size: 1.25rem;
}

.test-info-box {
    background: var(--primary-lighter);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 32px;
    text-align: left;
}

.test-info-box p {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.test-info-box strong {
    color: var(--primary-color);
}

/* Pulsanti */
.test-btn-primary, .test-btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.test-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow);
}

.test-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
}

.test-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.test-btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.test-btn-secondary:hover:not(:disabled) {
    background: var(--primary-lighter);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.test-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Schermata del test */
.test-header {
    background: var(--background);
    padding: 24px 40px;
    border-bottom: 1px solid var(--border-color);
}

.test-progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.test-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.test-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.test-question-counter {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: right;
}

.test-question-container {
    padding: 40px;
}

.test-question-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 32px;
    line-height: 1.6;
}

.test-options-container {
    display: grid;
    gap: 16px;
    margin-bottom: 40px;
}

.test-option {
    padding: 16px 20px;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-lighter);
}

.test-option.test-selected {
    border-color: var(--primary-color);
    background: var(--primary-lighter);
    color: var(--primary-color);
}

.test-option-letter {
    width: 32px;
    height: 32px;
    background: var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.test-option.test-selected .test-option-letter {
    background: var(--primary-color);
    color: white;
}

.test-option-text {
    flex: 1;
}

.test-navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

/* Schermata dei risultati */
.test-results-content {
    padding: 60px 40px;
    text-align: center;
}

.test-result-icon {
    margin-bottom: 32px;
}

.test-level-badge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    position: relative;
    overflow: hidden;
}

.test-level-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    animation: test-pulse 2s infinite;
}

.test-level-badge span {
    position: relative;
    z-index: 1;
}

@keyframes test-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.test-result-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.test-result-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.test-score-details {
    background: var(--background);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.test-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.test-score-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.test-score-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.test-result-info {
    background: var(--primary-lighter);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 32px;
}

.test-result-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .test-container {
        padding: 16px;
    }

    .test-welcome-content,
    .test-question-container,
    .test-results-content {
        padding: 40px 24px;
    }

    .test-welcome-content h1 {
        font-size: 2rem;
    }

    .test-header {
        padding: 20px 24px;
    }

    .test-level-info {
        grid-template-columns: 1fr;
    }

    .test-features {
        gap: 16px;
        flex-direction: column;
        align-items: center;
    }

    .test-navigation-buttons {
        flex-direction: column;
    }

    .test-score-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .test-welcome-content h1 {
        font-size: 1.75rem;
    }

    .test-question-text {
        font-size: 1.125rem;
    }

    .test-btn-primary,
    .test-btn-secondary {
        padding: 12px 24px;
        font-size: 0.875rem;
    }

    .test-features {
        gap: 12px;
    }

    .test-feature {
        font-size: 0.8rem;
    }
}



