/* Color Variables for Theming */
:root {
    --bg-color: #f8fafc;
    --text-color: #1e2b3b;
    --text-color-light: #475569;
    --heading-color: #0f172a;
    --card-bg: white;
    --card-border: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.8);
    --raster-dot: #aebecd; /* Noch stärkerer Punkt */
    --raster-bg: #f2f5f8; /* Leicht dunklerer Hintergrund */
    --nav-dot-bg: #cbd5e1;
    --nav-dot-border: white;
    --tooltip-bg: #1e2b3b;
    --tooltip-text: white;
    --footer-bg: #f1f5f9;
}

.dark {
    --bg-color: #0f172a;
    --text-color: #cbd5e1;
    --text-color-light: #94a3b8;
    --heading-color: #f8fafc;
    --card-bg: #1e2b3b;
    --card-border: #334155;
    --header-bg: rgba(15, 23, 42, 0.8);
    --raster-dot: #64748b; /* Stärkerer Punkt im Dark Mode */
    --raster-bg: #1e2b3b;
    --nav-dot-bg: #475569;
    --nav-dot-border: #0f172a;
    --tooltip-bg: #f8fafc;
    --tooltip-text: #1e2b3b;
    --footer-bg: #1e2b3b;
}

/* General Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.75;
    transition: background-color 0.3s ease, color 0.3s ease;
}
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--heading-color);
    letter-spacing: -0.025em;
}

/* Background Pattern */
.raster-background {
    background-color: var(--raster-bg);
    background-image: radial-gradient(var(--raster-dot) 1px, transparent 1px);
    background-size: 2.5rem 2.5rem;
}

/* Card Styles */
.section-card {
    background-color: var(--card-bg);
    border-radius: 1.5rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.06);
    transition: all 0.3s ease;
}
.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);
}
.section-card.highlight {
    border-color: #f59e0b;
    box-shadow: 0 0 20px 5px rgb(245 158 11 / 0.3);
}

/* Farben für Quiz-Highlighting */
.text-f59e0b { color: #f59e0b !important; }
.border-f59e0b { border-color: #f59e0b !important; }
.text-8b5cf6 { color: #8b5cf6 !important; }
.border-8b5cf6 { border-color: #8b5cf6 !important; }
.text-10b981 { color: #10b981 !important; }
.border-10b981 { border-color: #10b981 !important; }
.icon-svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

/* Icon Colors */
#study-checklist .icon-svg { color: #0ea5e9; }
#media-fakenews-problems .icon-svg { color: #f59e0b; }
#cognitive-biases .icon-svg { color: #8b5cf6; }
#logical-fallacies .icon-svg { color: #10b981; }
#conspiracy-anatomy .icon-svg { color: #f43f5e; }
#discussion-tools .icon-svg { color: #14b8a6; }
#practical-resources .icon-svg { color: #64748b; }
footer .icon-svg { color: #64748b; }

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInAnimation 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes fadeInAnimation { to { opacity: 1; transform: translateY(0); } }
.scroll-reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }

/* Details/Accordion Component */
details > summary {
    list-style: none;
    cursor: pointer;
    padding: 1.5rem;
    border-radius: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s ease;
}
details[open] > summary {
    background-color: rgba(14, 165, 233, 0.1);
}
details > summary .icon::before {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
}
details[open] > summary .icon::before {
    transform: rotate(45deg);
}
details .details-content {
    padding: 0 1.5rem;
    overflow: hidden;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
details[open] .details-content {
    border-top: 1px solid var(--card-border);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    grid-template-rows: 1fr;
}
details .details-content > div {
    min-height: 0;
    overflow: hidden;
}

/* Header & Navigation */
.sticky-header {
    position: sticky; top: 0; z-index: 50;
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}
.dark .sticky-header {
    border-bottom-color: #334155;
}

/* Controls */
.control-btn {
    padding: 0.5rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: none;
    cursor: pointer;
}
.control-btn.active {
    border-color: #0ea5e9;
}
.control-btn:hover {
    background-color: rgba(0,0,0,0.05);
}
.dark .control-btn:hover {
    background-color: rgba(255,255,255,0.1);
}
.secondary-btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    border: 2px solid var(--card-border);
    color: var(--text-color-light);
    background-color: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}
.secondary-btn:hover:not(:disabled) {
    border-color: var(--text-color-light);
    background-color: var(--footer-bg);
}
.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* --- Quiz & Challenge Styles --- */

/* Inner Padding */
#challenge-container > div:first-child {
    padding: 2rem 1.5rem;
}
@media (min-width: 768px) {
    #challenge-container > div:first-child {
        padding: 2.5rem 2rem;
    }
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
/* Header im Quiz (Punkte/Zähler) hervorheben */
.quiz-header p#challenge-counter {
    font-size: 0.9rem;
    font-weight: 600;
}
.quiz-header #challenge-live-score {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-color);
}
.dark .quiz-header #challenge-live-score {
    color: var(--heading-color);
}


.quiz-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: var(--card-border);
    border-radius: 0;
    overflow: hidden;
}
#challenge-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #0ea5e9;
    transition: width 0.4s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}
#progress-bar-text {
    position: absolute;
    right: 0.5rem;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    line-height: 6px;
    white-space: nowrap;
    opacity: 0; /* Standardmäßig ausgeblendet */
    transition: opacity 0.3s ease; /* Weiche Einblendung */
}
/* CSS-Regel entfernt, die den Text bei 0% Breite explizit ausblendet: */
/* #challenge-progress-bar[style*="width: 0%"] #progress-bar-text {
    opacity: 0;
} */
#challenge-progress-bar:not([style*="width: 0%"]) #progress-bar-text {
     opacity: 1; /* Sicherstellen, dass es bei >0% sichtbar ist */
}

.quiz-live-score {
    font-weight: bold;
    color: var(--text-color-light);
    white-space: nowrap;
}
.quiz-streak {
    font-weight: bold;
    color: #f97316;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.quiz-btn {
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.quiz-btn:hover:not(:disabled) {
    transform: scale(1.05);
    filter: brightness(1.1);
}
.quiz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed; /* Cursor */
}

.quiz-btn.start-challenge {
    background-color: #f59e0b !important;
}
.quiz-btn.start-challenge:hover:not(:disabled) {
    filter: brightness(1.2);
}

/* Standard-Stil für Feedback/Anweisung */
.quiz-feedback {
    padding: 1rem 1.5rem;
    margin-top: 0;
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    min-height: 150px; /* Deutlich höhere Mindesthöhe */
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    opacity: 1;
    visibility: visible;
    border: 1px solid var(--card-border);
    background-color: var(--footer-bg); /* Grau */
    color: var(--text-color-light);
    font-weight: 500;
    text-align: center; /* Zentriert */
    font-size: 1rem; /* Kleinere Schrift */
    display: flex; /* Für vertikale Zentrierung */
    align-items: center;
    justify-content: center;
}
.quiz-feedback.hidden {
    display: none;
}
.quiz-feedback strong {
    display: block; font-size: 1.125rem; margin-bottom: 0.5rem;
}
/* Überschreibungen für Korrekt/Falsch */
.quiz-feedback.correct,
.quiz-feedback.incorrect {
    font-size: inherit; /* Normale Größe */
    text-align: left; /* Linksbündig */
    display: block; /* Flexbox aufheben */
    padding: 1rem;
    min-height: 150px; /* Dieselbe Mindesthöhe! */
}
.quiz-feedback.correct {
    background-color: #dcfce7; color: #166534;
    border-color: #a7f3d0;
}
.dark .quiz-feedback.correct {
    background-color: #14532d; color: #bbf7d0;
    border-color: #22c55e;
}
.quiz-feedback.incorrect {
    background-color: #ffe4e6; color: #9f1239;
    border-color: #fecdd3;
}
.dark .quiz-feedback.incorrect {
    background-color: #881337; color: #fecdd3;
    border-color: #f43f5e;
}

.quiz-feedback a { text-decoration: underline; font-weight: bold; opacity: 0.8; transition: opacity 0.2s ease; }
.quiz-feedback a:hover { opacity: 1; }
.quiz-feedback.correct a { color: #15803d; }
.dark .quiz-feedback.correct a { color: #a7f3d0; }
.quiz-feedback.incorrect a { color: #be123c; }
.dark .quiz-feedback.incorrect a { color: #fda4af; }

.quiz-medal { font-size: 5rem; margin-bottom: 1rem; animation: medal-pop 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
@keyframes medal-pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.quiz-summary-item { border: 1px solid var(--card-border); padding: 1rem; border-radius: 0.75rem; background-color: var(--bg-color); }
.quiz-summary-item strong { display: block; margin-bottom: 0.5rem; color: var(--heading-color); }
.quiz-summary-item .quiz-feedback-link {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background-color: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.2s ease;
}
.quiz-summary-item .quiz-feedback-link:hover {
    background-color: rgba(14, 165, 233, 0.2);
}

/* --- Tweet / Headline / Challenge Styles --- */
.tweet-card-ui,
#challenge-headline-card {
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: opacity 0.2s ease-out, visibility 0s linear 0.2s;
    opacity: 1;
    visibility: visible;
    min-height: 200px; /* Feste Mindesthöhe */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertikal zentrieren */
}
.dark .tweet-card-ui,
.dark #challenge-headline-card {
     box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.tweet-card-ui.fading-out,
#challenge-headline-card.fading-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out, visibility 0s linear 0.2s;
}

.tweet-card-ui {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background-color: var(--card-bg);
}
.dark .tweet-card-ui {
    background-color: #0f172a;
    border-color: #334155;
}

.tweet-avatar {
    text-align: center;
    font-size: 1.75rem;
    background-color: var(--card-border);
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.dark .tweet-avatar {
     background-color: #334155;
}

.tweet-author-line {
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}
.tweet-verified-badge {
    width: 1.1em;
    height: 1.1em;
    fill: #1d9bf0;
    margin-left: 2px;
}
.tweet-timestamp {
    font-size: 0.9em;
}

.tweet-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
}
#challenge-tweet-text span {
    background-color: transparent;
    border-radius: 0.25rem;
    padding: 0 0.05em;
    color: inherit;
}

.highlighted-text {
    background-color: rgba(253, 224, 71, 0.5);
    padding: 0.1em 0.2em;
    border-radius: 0.25rem;
    font-weight: 600;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.dark .highlighted-text {
    background-color: rgba(250, 204, 21, 0.6);
    color: #1f2937;
}

.tweet-actions {
    display: flex;
    gap: 1.5rem; /* Fester Abstand */
    align-items: center;
    margin-top: 1rem;
    color: var(--text-color-light);
    max-width: none;
    padding-left: 0.5rem;
}
.tweet-action-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
.tweet-action-item:hover {
    color: #0ea5e9;
    transform: scale(1.1);
}
.dark .tweet-action-item:hover {
    color: #38bdf8;
}
.tweet-action-item svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}
.action-count {
    font-weight: 500;
}
.tweet-action-item.single-icon {
    margin-left: auto;
}
.tweet-action-item:nth-child(2):hover { color: #16a34a; }
.dark .tweet-action-item:nth-child(2):hover { color: #4ade80; }
.tweet-action-item:nth-child(3):hover { color: #ef4444; }
.dark .tweet-action-item:nth-child(3):hover { color: #f87171; }


#challenge-headline-card {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
}
#challenge-headline-text {
    font-size: 1.75rem;
    line-height: 1.4;
    color: var(--heading-color);
}
#challenge-headline-text span {
    background-color: transparent;
    border-radius: 0.25rem;
    padding: 0 0.05em;
    color: inherit;
}

#stage-2-analysis {
    padding-top: 0;
}

#challenge-fallacy-options {
    gap: 0.75rem;
}

.fallacy-option-input { position: absolute; opacity: 0; width: 0; height: 0; }
.fallacy-option-label {
    position: relative;
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    background-color: var(--bg-color);
    transition: all 0.15s ease-in-out;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.dark .fallacy-option-label {
    background-color: var(--card-bg);
}

.fallacy-option-label:hover,
.fallacy-option-input:focus-visible + .fallacy-option-label {
    border-color: #38bdf8;
    background-color: rgba(14, 165, 233, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.fallacy-option-input:checked + .fallacy-option-label {
    border-color: #0ea5e9;
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--heading-color);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}
.dark .fallacy-option-input:checked + .fallacy-option-label {
    background-color: rgba(14, 165, 233, 0.2);
}

.fallacy-option-input:disabled + .fallacy-option-label {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}
.fallacy-option-input:disabled + .fallacy-option-label:hover,
.fallacy-option-input:disabled:focus-visible + .fallacy-option-label {
    border-color: var(--card-border);
    background-color: var(--bg-color);
    transform: none;
    box-shadow: none;
    outline: none;
}
.dark .fallacy-option-input:disabled + .fallacy-option-label:hover,
.dark .fallacy-option-input:disabled:focus-visible + .fallacy-option-label {
    background-color: var(--card-bg);
}
.fallacy-option-input:disabled + .fallacy-option-label:hover {
    background-color: inherit;
}

.fallacy-option-input:focus-visible + .fallacy-option-label {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.fallacy-option-label.correct {
     border-color: #22c55e !important;
     background-color: rgba(34, 197, 94, 0.1) !important;
     color: #166534 !important;
     opacity: 1;
     border-width: 2px !important;
}
.dark .fallacy-option-label.correct {
    background-color: rgba(34, 197, 94, 0.2) !important;
    color: #bbf7d0 !important;
    border-color: #4ade80 !important;
}
.fallacy-option-label.incorrect {
    border-color: #f43f5e !important;
    background-color: rgba(244, 63, 94, 0.1) !important;
    color: #9f1239 !important;
    text-decoration: line-through;
    opacity: 1;
     border-width: 2px !important;
}
.dark .fallacy-option-label.incorrect {
    background-color: rgba(244, 63, 94, 0.2) !important;
    color: #fecdd3 !important;
    border-color: #fb7185 !important;
}
.fallacy-option-label.missed {
    border-color: #22c55e !important;
    background-color: rgba(34, 197, 94, 0.05) !important;
    border-style: dashed !important;
    border-width: 2px !important;
    opacity: 1;
    box-shadow: none;
}
.dark .fallacy-option-label.missed {
    border-color: #4ade80 !important;
    background-color: rgba(74, 222, 128, 0.1) !important;
    box-shadow: none;
}

.info-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; background-color: #94a3b8; color: white; border-radius: 9999px; font-style: italic; font-family: 'Outfit', sans-serif; font-weight: bold; line-height: 1.5rem; margin-left: 0.75rem; cursor: pointer; flex-shrink: 0; opacity: 0; transition: all 0.3s ease; }
.info-icon:hover { background-color: #0ea5e9; transform: scale(1.1); }
.fallacy-option-label.correct .info-icon, .fallacy-option-label.missed .info-icon { background-color: #16a34a; }
.fallacy-option-label.incorrect .info-icon { background-color: #b91c1c; }

/* Buttons Container */
#challenge-container .text-center.mt-6 {
    margin-top: 2rem;
}

/* Example Text */
.example-text { margin-top: 1rem; padding: 1rem; border-top: 1px dashed var(--card-border); color: var(--text-color-light); border-radius: 0.5rem; }
.example-item { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.example-item.visible { opacity: 1; transform: translateY(0); }

/* Study Selector & Info Button */
.study-card-wrapper { position: relative; display: flex; }
.study-selector-card { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.info-btn { position: absolute; top: 0.5rem; right: 0.5rem; width: 2rem; height: 2rem; border-radius: 9999px; background-color: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-color-light); font-family: 'Outfit', sans-serif; font-weight: bold; font-style: italic; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; z-index: 10; }

/* <<< ERSETZT (Verbesserung 4) >>> */
/* Hebt den Button hervor, wenn die Karte (der Wrapper) oder der Button selbst gehovert wird */
.study-card-wrapper:hover .info-btn,
.info-btn:hover {
    background-color: #0ea5e9;
    color: white;
    transform: scale(1.1);
    border-color: #0ea5e9;
}
/* Verhindert, dass der Button beim Hover über die Karte "springt", falls er bereits aktiv ist */
.info-btn:hover {
    transform: scale(1.1); /* Stellt sicher, dass der Scale-Effekt konsistent ist */
}
/* <<< ENDE ERSETZT (Verbesserung 4) >>> */

.study-selector-card { cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; border: 2px solid var(--card-border); }
.study-selector-card.active { border-color: #0ea5e9; transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgb(14 165 233 / 0.2); }

/* Side Navigation */
#side-nav-wrapper { position: fixed; top: 50%; right: 1.5rem; transform: translateY(-50%); z-index: 40; display: none; flex-direction: row; align-items: flex-start; gap: 1rem; }
@media (min-width: 1024px) { #side-nav-wrapper { display: flex; } }
#side-nav-studies { display: flex; flex-direction: column; gap: 0.75rem; }
.side-study-pill { font-size: 1.5rem; cursor: pointer; transition: all 0.2s ease; opacity: 0.4; filter: grayscale(80%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background-color: var(--card-bg); border-radius: 99px; border: 2px solid var(--card-border); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.side-study-pill:hover { transform: scale(1.15); opacity: 0.7; }
.side-study-pill.active { opacity: 1; filter: grayscale(0%); border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3); transform: scale(1.1); }
#side-nav { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 4px; counter-reset: nav-counter -1; }
.nav-dot { width: 24px; height: 24px; background-color: var(--nav-dot-bg); border-radius: 99px; border: 2px solid var(--nav-dot-border); cursor: pointer; transition: all 0.3s ease; position: relative; display: flex; align-items: center; justify-content: center; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 12px; color: var(--bg-color); }
.dark .nav-dot { color: var(--text-color); }
.nav-dot::before { counter-increment: nav-counter; content: counter(nav-counter); }
.nav-dot:hover, .nav-dot.active { background-color: #0ea5e9; transform: scale(1.1); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2); color: white; }
.nav-tooltip { position: absolute; top: 50%; right: 150%; transform: translateY(-50%); background-color: var(--tooltip-bg); color: var(--tooltip-text); padding: 0.25rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; }
.nav-dot:hover .nav-tooltip { opacity: 1; visibility: visible; }

/* Share Popover */
.share-popover { position: absolute; background-color: var(--card-bg); border: 1px solid var(--card-border); border-radius: 0.75rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); z-index: 60; display: flex; padding: 0.5rem; gap: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s ease; }
.share-popover.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.share-popover a, .share-popover button { padding: 0.5rem; border-radius: 99px; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s ease; }
.share-popover a:hover, .share-popover button:hover { background-color: rgba(0,0,0,0.05); }
.dark .share-popover a:hover, .dark .share-popover button:hover { background-color: rgba(255,255,255,0.1); }

/* --- OTHER & FOOTER STYLES --- */
footer { background-color: var(--footer-bg); }
.feedback-textarea { width: 100%; background-color: var(--bg-color); border: 1px solid var(--card-border); border-radius: 0.75rem; padding: 0.75rem 1rem; color: var(--text-color); resize: vertical; }
.feedback-textarea:focus { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3); }
.pyramid-container { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.pyramid-level { padding: 0.75rem 1rem; border-radius: 0.5rem; text-align: center; font-weight: 600; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); transition: transform 0.2s ease; position: relative; color: #0f172a; }
.pyramid-level:hover { transform: scale(1.03); }
.pyramid-apex { width: 50%; background-color: #0ea5e9; color: white; font-weight: 900; border: 2px solid #0284c7; }
.pyramid-filter-3 { width: 65%; background-color: #7dd3fc; }
.pyramid-filter-2 { width: 80%; background-color: #bae6fd; }
.pyramid-filter-1 { width: 95%; background-color: #e0f2fe; }
.pyramid-base { width: 100%; background-color: #f0f9ff; }
.filter-arrows { font-size: 1.5rem; color: #94a3b8; line-height: 1; }
.flawed-study-dot { position: absolute; width: 10px; height: 10px; background-color: #ef4444; border-radius: 9999px; box-shadow: 0 0 5px 1px rgba(239, 68, 68, 0.7); }
.share-btn-container { position: relative; }
.share-btn { background: none; border: none; cursor: pointer; padding: 0.5rem; margin-left: 0.5rem; border-radius: 99px; color: #94a3b8; transition: background-color 0.2s, color 0.2s; }
.share-btn:hover { background-color: rgba(0,0,0,0.05); }
.dark .share-btn:hover { background-color: rgba(255,255,255,0.1); }
#toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(200%); background-color: #0f172a; color: white; padding: 1rem 2rem; border-radius: 0.75rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2); z-index: 100; transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
#toast.show { transform: translateX(-50%) translateY(0); }
.close-btn { position: absolute; top: 1rem; right: 1rem; background: var(--card-border); border: none; width: 2.5rem; height: 2.5rem; border-radius: 99px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; }

footer button.underline {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
}
footer button.underline:hover {
    color: #0ea5e9;
}

/* Mobile Navigation */
#mobile-nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.95); z-index: 98; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
#mobile-nav-overlay.show { opacity: 1; visibility: visible; }
#mobile-nav-content { display: flex; flex-direction: column; gap: 1.5rem; text-align: center; }
#mobile-nav-content a { color: white; font-size: 1.5rem; font-weight: bold; font-family: 'Outfit', sans-serif; opacity: 0; transform: translateY(15px); transition: opacity 0.3s ease, transform 0.3s ease; }
#mobile-nav-overlay.show #mobile-nav-content a { opacity: 1; transform: translateY(0); }
@media (max-width: 1023px) { #side-nav-wrapper { display: none; } }

/* Back to Top Button */
#back-to-top { position: fixed; bottom: 1.5rem; right: 1.5rem; background-color: var(--card-bg); color: #0ea5e9; border: 2px solid var(--card-border); width: 3.5rem; height: 3.5rem; border-radius: 9999px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s, background-color 0.3s; z-index: 99; }
#back-to-top.hidden { opacity: 0; transform: scale(0.5); pointer-events: none; }
#back-to-top:hover { background-color: #0ea5e9; border-color: #0ea5e9; color: white; transform: scale(1.1); }

/* --- Dopamine Boost Animations --- */
@keyframes shake-correct { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } }
@keyframes shake-incorrect { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px) rotate(-3deg); } 40% { transform: translateX(8px) rotate(3deg); } 60% { transform: translateX(-8px) rotate(-3deg); } 80% { transform: translateX(8px) rotate(-3deg); } }
.animate-shake-correct { animation: shake-correct 0.4s ease-in-out; }
.animate-shake-incorrect { animation: shake-incorrect 0.5s ease-in-out; }
@keyframes score-pop { 0% { transform: scale(1); } 50% { transform: scale(1.3); color: #0ea5e9; } 100% { transform: scale(1); } }
.animate-score-pop { animation: score-pop 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
@keyframes streak-pop { 0% { transform: scale(1) rotate(0); } 50% { transform: scale(1.4) rotate(-15deg); } 100% { transform: scale(1) rotate(0); } }
.animate-streak-pop { animation: streak-pop 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

@keyframes option-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
.fallacy-option-label.bounce-effect {
    animation: option-bounce 0.15s ease-out;
}

/* --- Modal Styles --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.85); z-index: 110; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content, .modal-content-lg { background-color: var(--card-bg); padding: 2rem; border-radius: 1.5rem; max-width: 600px; width: 100%; position: relative; transform: scale(0.95); transition: transform 0.3s ease; }
.modal-content-lg { max-width: 800px; max-height: 90vh; overflow-y: auto; }
.modal-overlay.show .modal-content, .modal-overlay.show .modal-content-lg { transform: scale(1); }

/* --- Case Study Selection Toast --- */
#selection-toast { position: fixed; bottom: 2rem; right: -100%; background-color: var(--card-bg); color: var(--text-color); padding: 1rem 1.5rem; border-radius: 0.75rem; border: 1px solid var(--card-border); box-shadow: 0 10px 20px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 0.75rem; z-index: 101; transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
#selection-toast.show { right: 2rem; }

/* --- Glossary Styles --- */
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.glossary-item dt { font-family: 'Outfit', sans-serif; font-weight: 600; color: var(--heading-color); margin-bottom: 0.25rem; }
.glossary-item dd { color: var(--text-color-light); font-size: 0.95rem; padding-left: 1rem; border-left: 2px solid var(--card-border); }


/* <<< NEU: Style Customization for Challenge Topic Checkboxes (Verbesserung 2) >>> */
/* Medien-Checkbox (Gelb/Amber) */
input[name="topicFocus"][value="media"]:checked {
    background-color: #f59e0b;
    border-color: #f59e0b;
}
input[name="topicFocus"][value="media"]:focus {
    --tw-ring-color: #f59e0b;
     box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--tw-ring-color);
}

/* Psychologie-Checkbox (Violett) */
input[name="topicFocus"][value="psychology"]:checked {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}
input[name="topicFocus"][value="psychology"]:focus {
    --tw-ring-color: #8b5cf6;
     box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--tw-ring-color);
}

/* Argumente-Checkbox (Grün/Emerald) */
input[name="topicFocus"][value="logic"]:checked {
    background-color: #10b981;
    border-color: #10b981;
}
input[name="topicFocus"][value="logic"]:focus {
    --tw-ring-color: #10b981;
     box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--tw-ring-color);
}
/* <<< ENDE NEU >>> */


/* <<< NEU: Barrierefreiheits-Verbesserungen für Modal-Fokus (Verbesserung 9) >>> */
/* Deutlicher Fokus für den Schließen-Button im Modal */
.modal-overlay .close-btn:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 2px;
    background-color: #e0f2fe; /* Heller Hintergrund bei Fokus */
}
.dark .modal-overlay .close-btn:focus-visible {
    background-color: #334155; /* Dunklerer Hintergrund bei Fokus */
}

/* Deutlicher Fokus für Links und Buttons innerhalb der Modals */
.modal-content a:focus-visible,
.modal-content button:focus-visible,
.modal-content-lg a:focus-visible,
.modal-content-lg button:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 2px;
    border-radius: 0.375rem; /* leichter Radius für den Fokus-Rahmen */
}

/* Sicherstellen, dass der Schließen-Button rund bleibt */
.modal-content .close-btn:focus-visible,
.modal-content-lg .close-btn:focus-visible {
     border-radius: 9999px;
}
/* <<< ENDE NEU >>> */