/* ============================================================
   Quiz-Wrapper – ersetzt die body-Stile der Standalone-Version
   ============================================================ */
#ai-act-quiz-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a202c;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    /* Abstand beim Scrollen zum Quiz-Anfang, damit ein Sticky-Header
       des Themes den Quiz-Kopf nicht verdeckt */
    scroll-margin-top: 6rem;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ============================================================
   Karten-Container
   ============================================================ */
#ai-act-quiz-app .karte {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
}

/* ============================================================
   Startseite
   ============================================================ */
#ai-act-quiz-app .startseite {
    text-align: center;
}

#ai-act-quiz-app .startseite h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #235E6F;
    margin-bottom: 1rem;
}

#ai-act-quiz-app .untertitel {
    font-size: 1.125rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

#ai-act-quiz-app .beschreibung {
    color: #718096;
    max-width: 560px;
    margin: 0 auto 2rem;
}

/* ============================================================
   Quiz-Kopfbereich
   ============================================================ */
#ai-act-quiz-app .quiz-kopf {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

#ai-act-quiz-app .fortschritt {
    display: inline-block;
    background: #F9F4EC;
    color: #235E6F;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
}

#ai-act-quiz-app .quiz-kopf h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #235E6F;
    margin-bottom: 0.5rem;
}

#ai-act-quiz-app .hinweis {
    font-size: 0.8125rem;
    color: #a0aec0;
    font-style: italic;
}

/* ============================================================
   Fragen-Liste
   ============================================================ */
#ai-act-quiz-app .fragen-liste {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#ai-act-quiz-app .frage-block {
    background: #F9F4EC;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

#ai-act-quiz-app .frage-text {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

#ai-act-quiz-app .antworten {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#ai-act-quiz-app .antwort-label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.9375rem;
    color: #4a5568;
}

#ai-act-quiz-app .antwort-label:hover {
    background: #edf2f7;
}

#ai-act-quiz-app .antwort-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: #235E6F;
    cursor: pointer;
}

/* ============================================================
   Quiz-Fußbereich
   ============================================================ */
#ai-act-quiz-app .quiz-fuss {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

/* ============================================================
   Buttons
   ============================================================ */
#ai-act-quiz-app .btn-primaer,
#ai-act-quiz-app .btn-sekundaer {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

#ai-act-quiz-app .btn-primaer {
    background: #235E6F;
    color: #ffffff;
}

#ai-act-quiz-app .btn-primaer:hover:not(:disabled) {
    background: #1a4858;
}

#ai-act-quiz-app .btn-primaer:active:not(:disabled) {
    transform: translateY(1px);
}

#ai-act-quiz-app .btn-primaer:disabled {
    background: #b8d8de;
    color: #7ab5c0;
    cursor: not-allowed;
}

#ai-act-quiz-app .btn-sekundaer {
    background: #e2e8f0;
    color: #2d3748;
}

#ai-act-quiz-app .btn-sekundaer:hover {
    background: #cbd5e0;
}

/* ============================================================
   Lade-Anzeige
   ============================================================ */
#ai-act-quiz-app .laden {
    text-align: center;
    color: #718096;
    padding: 3rem;
}

#ai-act-quiz-app .laden p::after {
    content: '';
    display: inline-block;
    width: 1rem;
    animation: aaq-punkte 1.2s steps(3, end) infinite;
}

@keyframes aaq-punkte {
    0%   { content: ''; }
    33%  { content: '.'; }
    66%  { content: '..'; }
    100% { content: '...'; }
}

/* ============================================================
   Fehlermeldung
   ============================================================ */
#ai-act-quiz-app .fehler {
    text-align: center;
}

#ai-act-quiz-app .fehler h2 {
    color: #c53030;
    margin-bottom: 1rem;
}

#ai-act-quiz-app .fehler p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
}

/* ============================================================
   Ergebnisseite
   ============================================================ */
#ai-act-quiz-app .ergebnis h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #235E6F;
    margin-bottom: 0.5rem;
}

#ai-act-quiz-app .gesamt-text {
    font-size: 1.125rem;
    color: #4a5568;
    margin-bottom: 2rem;
}

#ai-act-quiz-app .chart-container {
    max-width: 500px;
    margin: 0 auto 2rem;
}

#ai-act-quiz-app .ergebnis-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

#ai-act-quiz-app .ergebnis-tabelle th,
#ai-act-quiz-app .ergebnis-tabelle td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

#ai-act-quiz-app .ergebnis-tabelle th {
    background: #F9F4EC;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#ai-act-quiz-app .ergebnis-tabelle tfoot td {
    border-top: 2px solid #e2e8f0;
    border-bottom: none;
    font-size: 1rem;
}

#ai-act-quiz-app .ergebnis-tabelle .punkte {
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #235E6F;
    font-weight: 600;
}

#ai-act-quiz-app .ergebnis .btn-sekundaer {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/* ============================================================
   Säulen-Legende
   ============================================================ */
#ai-act-quiz-app .saeulen-legende {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: fit-content;
    margin: 0 auto 2rem;
}

#ai-act-quiz-app .legende-eintrag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

#ai-act-quiz-app .saeulen-legende .legende-eintrag:nth-child(1) span:last-child { color: #235E6F; }
#ai-act-quiz-app .saeulen-legende .legende-eintrag:nth-child(2) span:last-child { color: #065f46; }
#ai-act-quiz-app .saeulen-legende .legende-eintrag:nth-child(3) span:last-child { color: #92400e; }

#ai-act-quiz-app .legende-farbe {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

#ai-act-quiz-app .legende-blau  { background: rgba(35, 94, 111, 0.45); border: 2px solid #235E6F; }
#ai-act-quiz-app .legende-gruen { background: rgba(16, 185, 129, 0.45); border: 2px solid #065f46; }
#ai-act-quiz-app .legende-amber { background: rgba(245, 158, 11,  0.45); border: 2px solid #92400e; }

/* ============================================================
   E-Mail-Versand
   ============================================================ */
#ai-act-quiz-app .email-versand {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

#ai-act-quiz-app .email-versand h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #235E6F;
    margin-bottom: 0.375rem;
}

#ai-act-quiz-app .email-versand p {
    color: #718096;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

#ai-act-quiz-app .email-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#ai-act-quiz-app .email-form input[type="email"] {
    flex: 1 1 220px;
    padding: 0.625rem 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #2d3748;
    outline: none;
    transition: border-color 0.15s ease;
}

#ai-act-quiz-app .email-form input[type="email"]:focus {
    border-color: #235E6F;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#ai-act-quiz-app .kontakt-zustimmung {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.875rem;
    font-size: 0.875rem;
    color: #4a5568;
    cursor: pointer;
    line-height: 1.5;
}

#ai-act-quiz-app .kontakt-zustimmung input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: #235E6F;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

#ai-act-quiz-app .email-status {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

#ai-act-quiz-app .email-status.erfolg { color: #065f46; }
#ai-act-quiz-app .email-status.fehler  { color: #c53030; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
    #ai-act-quiz-app .karte {
        padding: 1.5rem;
    }

    #ai-act-quiz-app .startseite h1 {
        font-size: 1.5rem;
    }

    #ai-act-quiz-app .quiz-kopf h2 {
        font-size: 1.25rem;
    }

    #ai-act-quiz-app .btn-primaer,
    #ai-act-quiz-app .btn-sekundaer {
        width: 100%;
        text-align: center;
    }

    #ai-act-quiz-app .quiz-fuss {
        justify-content: stretch;
    }

    #ai-act-quiz-app .chart-container {
        max-width: 100%;
    }
}
