:root {
    --primary-color: #2556A3;
    --secondary-color: #81BE59;
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f7f9fc;
    --border-color: #ddd;
    --white: #ffffff;
    --light-gray: #f0f0f0;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    margin: 0;
}

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

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

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

.hidden {
    display: none;
}

/* Welcome Screen */
#welcome-screen {
    text-align: center;
}

#logo {
    max-width: 250px;
    margin-bottom: 1rem;
}

#language-selector {
    margin: 1rem 0;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.main-headline {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2.5rem;
    margin: 1rem 0;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.text-input {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.text-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 86, 163, 0.3);
}

.cta-button {
    background: var(--secondary-color);
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-transform: uppercase;
}

.cta-button:hover {
    background: #6da84a; /* Darken secondary */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.cta-button:disabled {
    background-color: #81be59;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#detailed-description-container {
    text-align: left;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

#detailed-description-container h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}

#detailed-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

/* Quiz Screen */
#progress-text {
    text-align: right;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

#progress-container {
    width: 100%;
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    margin-bottom: 2rem;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--secondary-color);
    border-radius: 5px;
    transition: width 0.4s ease-in-out;
}

.question-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option {
    background-color: var(--white);
    border: 2px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: left;
}

.option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.option.selected {
    border-color: var(--primary-color);
    background-color: #eef3fb;
    font-weight: 700;
}

#next-btn {
    display: block;
    margin: 0 auto;
}

/* Lead Capture Screen */
#lead-form {
    max-width: 450px;
    margin: 0 auto;
    text-align: center;
}

.consent-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

#consent {
    width: 1.2em;
    height: 1.2em;
}

#consent-label a {
    color: var(--primary-color);
}

/* Results Screen */
#results-screen {
    text-align: center;
}

.score-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.results-section {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.results-section h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

#social-sharing, #social-follow, #promotion-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

#social-sharing a, #social-follow a, #promotion-links a {
    background-color: var(--light-gray);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

#social-sharing a:hover, #social-follow a:hover, #promotion-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Certificate Template - Positioned off-screen for flicker-free PDF generation */
#certificate-template {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* Certificate Template Styling (for PDF generation) */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Lato:wght@400;700&display=swap');

.cert-container {
    width: 1056px; /* A4 landscape width in pixels at 96 DPI */
    height: 816px; /* A4 landscape height */
    padding: 40px;
    background-color: #ffffff;
    font-family: 'Lato', sans-serif;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}
.cert-border {
    border: 10px solid #2556A3;
    width: 100%;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}
.cert-header {
    text-align: center;
}
.cert-logo {
    width: 200px;
    margin-bottom: 20px;
}
.cert-title {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    color: #2556A3;
    margin: 0;
}
.cert-body {
    margin: 40px 0;
}
.cert-recipient-label {
    font-size: 24px;
    margin-bottom: 20px;
}
.cert-name {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    color: #81BE59;
    margin: 0;
}
.cert-achievement {
    font-size: 20px;
    margin-top: 30px;
}
.cert-quiz-title {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #2556A3;
    margin: 10px 0;
}
.cert-score-label {
    font-size: 20px;
    margin-top: 20px;
}
.cert-score {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-top: 10px;
}
.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}
.cert-footer p {
    margin: 0;
    font-size: 16px;
}
.cert-footer hr {
    border: 0;
    border-top: 1px solid #333;
    margin-top: 5px;
}
.cert-date-section, .cert-url-section {
    width: 40%;
}

@media (max-width: 768px) {
    #quiz-container {
        padding: 1rem 1.5rem;
    }
    .main-headline {
        font-size: 2rem;
    }
    .intro-text {
        font-size: 1rem;
    }
    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    #promotion-links a {
        width: 100%;
        text-align: center;
    }
}