/* --- VARIABLES & GLOBAL STYLES --- */
:root {
    --primary-color: #2556A3;
    --secondary-color: #81BE59;
    --background-color: #f4f7fc;
    --text-color: #333;
    --light-gray: #e0e0e0;
    --white: #ffffff;
    --correct-green: #28a745;
    --incorrect-red: #dc3545;
    --font-family: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.quiz-container {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    padding: 2rem 3rem;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* --- HEADERS & TEXT --- */
h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.2rem; margin-top: 1.5rem;}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.intro-text {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.error-message {
    color: var(--incorrect-red);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 1rem;
    display: none; /* Hidden by default */
}

/* --- WELCOME SCREEN --- */
#welcome-screen {
    text-align: center;
}

.logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 1.5rem;
}

.language-selector {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.lang-btn {
    background: var(--light-gray);
    color: var(--text-color);
    border: 2px solid var(--light-gray);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #ccc;
}

.lang-btn.active {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

.seo-content {
    margin-top: 3rem;
    text-align: left;
    color: #555;
    font-size: 0.95rem;
    border-top: 1px solid var(--light-gray);
    padding-top: 1.5rem;
}

.seo-content h2 {
    text-align: left;
    font-size: 1.5rem;
}

/* --- BUTTONS --- */
.cta-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 1.5rem auto 0;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-btn:hover:not(:disabled) {
    background-color: #1c4482;
    transform: translateY(-2px);
}

.cta-btn:disabled {
    background-color: var(--light-gray);
    cursor: not-allowed;
}

.cta-btn.secondary-btn {
    background-color: var(--secondary-color);
}
.cta-btn.secondary-btn:hover {
     background-color: #69a147;
}


/* --- INPUT FIELDS & FORMS --- */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 86, 163, 0.2);
}

.consent-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.consent-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.privacy-policy {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* --- QUIZ SCREEN --- */
#progress-container {
    margin-bottom: 2rem;
}

#progress-text {
    text-align: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

#progress-bar-inner {
    height: 100%;
    width: 0;
    background-color: var(--secondary-color);
    transition: width 0.4s ease;
}

.answer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.answer-option {
    background-color: #f8f9fa;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.answer-option:hover {
    border-color: var(--primary-color);
    background-color: #e9ecef;
}

.answer-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(37, 86, 163, 0.1);
}

.answer-option.correct {
    border-color: var(--correct-green);
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--correct-green);
    font-weight: bold;
}

.answer-option.incorrect {
    border-color: var(--incorrect-red);
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--incorrect-red);
    font-weight: bold;
}

#feedback-text {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    display: none; /* Hidden until feedback is shown */
}

#feedback-text.correct {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--correct-green);
    display: block;
}

#feedback-text.incorrect {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--incorrect-red);
    display: block;
}


/* --- RESULTS SCREEN --- */
#score-headline {
    font-size: 2.5rem;
}

.results-cta-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

#social-sharing, #promotion-section, #social-follow {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-gray);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1rem;
}

.social-icons img {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}

.promo-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.promo-link {
    display: block;
    width: 100%;
    max-width: 400px;
    background: #f0f0f0;
    color: var(--primary-color);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

.promo-link:hover {
    background: #e0e0e0;
}


/* --- RESPONSIVENESS --- */
@media (max-width: 768px) {
    .quiz-container {
        padding: 1.5rem;
    }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
     body {
        padding: 10px;
    }
    .quiz-container {
        padding: 1rem;
    }
    .results-cta-group {
        flex-direction: column;
    }
    .cta-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
}