/**
 * chemie.css - gemeinsames Stylesheet aller Chemieseiten (Klasse 9, 10, GK 11, GK 12)
 *
 * Seit 01.12.2026 zusammengelegt aus chemie9/chemie10/chemiegk11.css und dem
 * gemeinsamen Teil von chemiegk12.css. Nur Bausteine einzelner GK-12-Seiten
 * (Analyselabor, Titrationslabor ...) stehen weiter in chemiegk12.css, die danach geladen wird.
 */

/* ===========================
   CSS VARIABLES (Farbschema)
   =========================== */
:root {
    /* Petrol: Hauptfarbe der Chemie (01.12.2026, vorher Blau wie Mathe).
       Weisse Schrift erst ab medium-1 (>= 4,5 : 1), auf light-* dunkle Schrift. */
    --petrol-light-1: #8ccad3;
    --petrol-light-2: #4fa9b8;
    --petrol-medium-1: #147f94;
    --petrol-medium-2: #0e6f84;
    --petrol-dark-1: #0b4a5a;
    --petrol-dark-2: #083844;
    --petrol-light-bg: #e6f4f5;
    --petrol-medium-bg: #d2eaed;
    --petrol-dark-bg: #a9d8de;

    /* Bisher nirgends definiert - Info-Kaesten hatten deshalb weder Grund noch Rand */
    --chem-blue-light: var(--petrol-light-bg);
    --chem-blue-1: var(--petrol-medium-1);
    --chem-blue-2: var(--petrol-medium-2);

    /* Seitenweite Blautoene aus style.css: auf Chemieseiten petrol */
    --primary-blue: var(--petrol-dark-1);
    --secondary-blue: var(--petrol-medium-2);
    --light-blue: var(--petrol-light-1);
    --lighter-blue: #c4e6ea;

    /* Grüne Töne (für spezielle Elemente) */
    --chem-green-1: #4CAF50;
    --chem-green-2: #45a049;
    --chem-green-3: #388e3c;
    --chem-green-bg: rgba(76, 175, 80, 0.1);

    /* Akzentfarben */
    --chem-orange-1: #ff9800;
    --chem-orange-2: #ef6c00;
    --chem-yellow-1: #ffc107;
    --chem-red-1: #f44336;
    --chem-red-2: #c62828;

    /* Neutrale Farben */
    --chem-gray-light: #f9f9f9;
    --chem-gray-medium: #f5f5f5;
    --chem-gray-border: #ddd;
    --chem-text-dark: #214147;
    --chem-text-medium: #666;
}

/* ===========================
   HERO-BEREICH
   =========================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 60px 30px;
    background: linear-gradient(135deg, #77cbdc 0%, #beeaf4 100%);
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.hero h1:not(.display-4) {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.hero h1 {
    color: #004352;
    position: relative;
    z-index: 2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

/* Hintergrund-Elemente für Hero */
.bg-element,
.chem-element-1,
.chem-element-2,
.chem-element-3 {
    position: absolute;
    opacity: 0.1;
    z-index: 1;
    font-size: 3.5rem; /* vorher 100-150 px, deutlich groesser als in Mathe (10.11.2026) */
    color: #004352;
    pointer-events: none;
}

.chem-element-1 {
    top: 20px;
    right: 50px;
    transform: rotate(15deg);
}

.chem-element-2 {
    bottom: 20px;
    left: 60px;
    transform: rotate(-10deg);
    font-size: 3rem;
}

.chem-element-3 {
    top: 70px;
    left: 30%;
    transform: rotate(5deg);
    font-size: 4rem;
    opacity: 0.07;
}

/* ===========================
   CONTENT SECTIONS
   =========================== */
.content-section {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.content-section h2 {
    color: var(--petrol-dark-1);
    margin-top: 30px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--petrol-medium-1);
    font-weight: 600;
}

.content-section h2:first-of-type {
    margin-top: 0;
}

.content-section h3 {
    color: var(--petrol-dark-1);
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.5rem;
}

.content-section h4 {
    color: var(--petrol-medium-2);
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.2rem;
}

.content-section p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ===========================
   MOLECULE CONTAINERS
   =========================== */
.molecule-container {
    display: flex;
    gap: 20px;
    margin: 20px 0 60px 0;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    width: 100%;
    clear: both;
}

.molecule-container::after {
    content: "";
    display: table;
    clear: both;
}

.molecule-item {
    border: 1px solid var(--chem-gray-border);
    padding: 15px 15px 60px 15px;
    border-radius: 5px;
    background-color: var(--chem-gray-light);
    width: 250px;
    min-height: 300px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.molecule-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.molecule-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--chem-text-dark);
}

.molecule-item p {
    color: var(--chem-text-medium);
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Molecule Groups */
.molecule-groups-container {
    margin: 30px 0;
}

.molecule-group {
    margin-bottom: 50px;
}

.molecule-group h3 {
    color: #004352;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Molecule Models */
.molecule-models {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0 60px 0;
    gap: 20px;
    width: 100%;
    clear: both;
}

.molecule-models::after {
    content: "";
    display: table;
    clear: both;
}

.molecule-model {
    text-align: center;
    margin: 15px;
    padding: 15px 15px 60px 15px;
    background-color: var(--chem-gray-medium);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 220px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.molecule-model:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.molecule-model h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    width: 100%;
    color: var(--chem-text-dark);
}

.molecule-name {
    font-weight: bold;
    margin-top: 10px;
    color: #004352;
}

/* ===========================
   CHEMDOODLE INTEGRATION
   =========================== */
/* Canvas-Stile */
.view-2d,
.view-3d {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px auto;
    display: block;
}

/* Canvas-Zentrierung in Taskcards */
.task-card .card-body canvas {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Molekül-Canvas-Container mit Rahmen */
.molecule-canvas-container {
    border: 2px solid var(--petrol-light-2);
    border-radius: 8px;
    padding: 15px;
    background: linear-gradient(135deg, #ffffff 0%, var(--petrol-light-bg) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin: 0 auto;
}

.view-3d {
    display: none;
}

.canvas-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    margin: 20px auto;
    clear: both;
    overflow-x: auto;
    overflow-y: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#reaktionsgeschwindigkeitAnimation,
#temperatureAnimation,
#reactionAnimation,
#calorimeterAnimation,
#protolyseAnimation,      /* GK-12-Animationen ergaenzt 10.11.2026: sie messen offsetWidth -   */
#protolysegradAnimation,  /* ohne diese Regel blieben sie 700 px breit und wurden auf dem     */
#redoxAnimation {         /* Handy links und rechts abgeschnitten                              */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    display: block;
}

/* Enthalpie-, Born-Haber-, Hess- und Biomolekül-Bindungsdiagramme zeichnen viel
   Text direkt ins Canvas; unter dieser Breite lieber horizontal scrollen lassen
   (.canvas-container bekommt overflow-x:auto in der Mobile-Media-Query) statt
   den Text bis zur Unlesbarkeit/Überlappung zu schrumpfen. */
#enthalpyAnimation,
#bornHaberAnimation,
#hessAnimation,
#cyclicAnimation,
#dnaAnimation,
#proteinAnimation,
#bindungsAnimation {
    width: 100%;
    max-width: 100%;
    min-width: 600px;
    height: auto;
    display: block;
}

.molecule-canvas {
    width: 220px;
    height: 220px;
    margin: 0 auto 15px auto;
    display: block;
}

/* Zeichenflaechen (800 px breit gezeichnet) passen sich an; unter 768 px
   bleiben sie wegen der Schrift im Canvas 800 px breit und scrollen (siehe unten). */
canvas#siedepunkt-canvas,
canvas#leitfaehigkeit-canvas {
    max-width: 100%;
    min-width: 0;
    height: auto;
}

/* 2D-Molekuele in schmalen Karten (ChemDoodle ersetzt die Klasse und setzt Breite/Hoehe im style) */
.card-body > canvas.ChemDoodleWebComponent {
    max-width: 100%;
    height: auto !important;
}

/* Toggle Button für 2D/3D Ansicht */
.btn-toggle {
    background-color: var(--petrol-medium-1);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px 15px;
    min-width: 150px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15px;
    z-index: 100;
    transition: background-color 0.3s;
}

.btn-toggle:hover {
    background-color: var(--petrol-medium-2);
}

/* ===========================
   NOMENKLATUR-BEISPIELE
   =========================== */
.nomenklatur-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 20px 0 40px 0;
    width: 100%;
}

.nomenklatur-examples::after {
    content: "";
    display: table;
    clear: both;
}

.nomenklatur-example {
    margin: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #ffffff 0%, var(--petrol-light-bg) 100%);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--petrol-light-2);
    width: 240px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.nomenklatur-example h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--petrol-dark-1);
    font-weight: 600;
}

.nomenklatur-example .formula {
    margin-bottom: 15px;
}

/* ===========================
   PROPERTIES & REACTIONS
   =========================== */
.properties-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 20px 0 40px 0;
    width: 100%;
}

.properties-examples::after {
    content: "";
    display: table;
    clear: both;
}

/* Reaction Examples */
.reaction-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0 40px 0;
    width: 100%;
}

.reaction-item {
    margin: 15px;
    padding: 15px 15px 60px 15px;
    background-color: #f8fff8;
    border: 1px solid var(--chem-gray-border);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 320px;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    float: left;
}

/* ===========================
   CONTENT BOXES
   =========================== */
/* Info Box */
.info-box {
    background-color: var(--chem-blue-light);
    border-left: 5px solid var(--chem-blue-1);
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.info-box h3,
.info-box h4 {
    color: var(--chem-blue-2);
    margin-top: 0;
    margin-bottom: 10px;
}

/* Example Box */
.example-box {
    background: linear-gradient(135deg, #ffffff 0%, var(--petrol-light-bg) 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 5px solid var(--petrol-medium-1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.example-box h4 {
    color: var(--petrol-dark-1);
    margin-top: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.example-title {
    color: var(--petrol-dark-1);
    margin-top: 0;
    font-size: 1.1em;
    font-weight: 600;
}

/* Hint Box (Dark Blue for Important Notes) */
.hint-box {
    /* fest dunkel: --petrol-dark-bg ist hell, weisse Schrift war darauf kaum lesbar */
    background: linear-gradient(135deg, #0c5566 0%, var(--petrol-dark-1) 100%);
    border-left: 4px solid var(--petrol-dark-1);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 67, 82, 0.2);
}

.hint-box h4 {
    margin-top: 0;
    color: #ffffff;
    font-weight: 600;
}

.hint-box strong {
    color: #ffffff;
}

.hint-box p {
    color: #e8f4f7;
    margin-bottom: 0;
}

.hint-box ul {
    margin-bottom: 0;
    color: #e8f4f7;
}

/* Warning/Attention Box */
.warning-box {
    background-color: #fff8e1;
    border-left: 5px solid var(--chem-yellow-1);
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.warning-box h3 {
    margin-top: 0;
    color: #a84300; /* vorher Orange #ef6c00, 2,9:1 auf dem gelben Grund */
}

/* Result Box */
.result-box {
    background-color: var(--petrol-light-bg);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--petrol-medium-1);
}

/* Exercise Box */
.exercise-box {
    background: linear-gradient(135deg, #ffffff 0%, var(--petrol-light-bg) 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--petrol-medium-1);
}

.exercise-box h3,
.exercise-box h4 {
    color: var(--petrol-dark-1);
    margin-top: 0;
}

/* DNA Base Boxes for Exercises */
.base-box {
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f4ecf7;
    border-radius: 6px;
    font-weight: bold;
    color: var(--petrol-dark-1);
    border: 1px solid var(--petrol-medium-1);
}

.base-input {
    width: 35px;
    height: 35px;
    text-align: center;
    font-weight: bold;
    border: 2px solid var(--chem-gray-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.base-input:focus {
    outline: none;
    border-color: var(--petrol-medium-1);
    box-shadow: 0 0 0 3px rgba(71, 156, 173, 0.1);
}

.dropzone {
    min-height: 110px;
    border: 2px dashed var(--chem-gray-border);
    border-radius: 8px;
    padding: 5px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.dropzone:hover {
    background-color: var(--petrol-light-bg);
    border-color: var(--petrol-medium-1);
}

/* ===========================
   FORMULA BOX & TABLES
   =========================== */
.formula-box {
    background-color: var(--petrol-light-bg);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    border-left: 4px solid var(--petrol-medium-1);
}

.formula-box h3,
.formula-box h4 {
    margin-top: 0;
    color: var(--petrol-dark-1);
    font-weight: 600;
}

.formula-box table {
    width: 100%;
    border-collapse: collapse;
}

.formula-box th,
.formula-box td {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--chem-gray-border);
}

.formula-box th {
    background-color: #f0f0f0;
}

.formula-box tr:nth-child(even) {
    background-color: var(--chem-gray-light);
}

.formula {
    font-size: 1.1em;
    text-align: center;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    margin: 20px 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid var(--chem-gray-border);
}

.comparison-table th {
    background-color: #dfedf1;
    color: #006373;
}

.comparison-table tr:nth-child(even) {
    background-color: var(--chem-gray-medium);
}

.comparison-table tr:hover {
    background-color: #f0f4c3;
}

/* ===========================
   INTERACTIVE ELEMENTS
   =========================== */
.interactive-section {
    background: linear-gradient(135deg, var(--petrol-light-bg) 0%, var(--petrol-medium-bg) 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border: 1px solid var(--petrol-light-2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.interactive-section h3 {
    margin-top: 0;
    color: var(--petrol-dark-1);
    font-weight: 600;
    border-bottom: 2px solid var(--petrol-medium-1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.controls-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.slider-container {
    max-width: 600px;
    margin: 0 auto;
}

.slider-container-row {
    max-width: none;
    margin: 0;
}

.reaction-grid {
    display: grid;
    grid-template-areas:
        "canvas"
        "stats"
        "explanation";
    gap: 1rem;
}

@media (min-width: 992px) {
    .reaction-grid {
        grid-template-areas:
            "canvas explanation"
            "stats stats";
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

.range-labels {
    font-size: 0.85em;
    color: var(--chem-text-medium);
    margin-top: 4px;
}

.stat-display {
    background: #fff;
    border: 1px solid var(--petrol-light-2);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.stat-label {
    color: var(--petrol-dark-1);
    font-weight: 600;
}

.stat-value {
    font-weight: 700;
}

.legend-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #343a40;
}

.legend-dot-a {
    background-color: #3498db;
}

.legend-dot-b {
    background-color: #e74c3c;
}

.legend-dot-product {
    background-color: #2ecc71;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid var(--chem-gray-border);
    border-radius: 4px;
    font-size: 14px;
    min-width: 0; /* vorher 150px: sprengte zweispaltige Formulare auf dem Handy (10.11.2026) */
}

.cta-button {
    background-color: var(--petrol-medium-1);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--petrol-medium-2);
}

/* ===========================
   CHALLENGE & QUIZ
   =========================== */
.challenge-section {
    background-color: #edf8fb;
    padding: 30px;
    border-radius: 10px;
    margin: 40px 0;
    border: 1px solid #77cbdc;
    text-align: center;
}

.challenge-section h3 {
    color: #004352;
    margin-top: 0;
    margin-bottom: 20px;
}

.challenge-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.challenge-area {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.challenge-question {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.question-number {
    flex: 0 0 30px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #004352;
}

.challenge-molecule {
    flex: 0 0 220px;
    margin: 0 20px;
}

.challenge-answer {
    flex: 1;
    text-align: left;
}

.answer-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #beeaf4;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.answer-input:focus {
    border-color: #004352;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 67, 82, 0.2);
}

.answer-input.correct {
    border-color: var(--chem-green-1);
    background-color: #f1f8e9;
}

.answer-input.incorrect {
    border-color: var(--chem-red-1);
    background-color: #ffebee;
}

.result-indicator {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    font-size: 1.2rem;
}

.result-indicator.correct {
    color: var(--chem-green-1);
}

.result-indicator.incorrect {
    color: var(--chem-red-1);
}

#challenge-results {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: #edf8fb;
    text-align: center;
}

#challenge-results h4 {
    color: #004352;
    margin-top: 0;
    margin-bottom: 10px;
}

/* Quiz Container */
.quiz-container {
    background: linear-gradient(135deg, var(--petrol-light-bg) 0%, #ffffff 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--petrol-light-2);
}

.quiz-question {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--petrol-medium-1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quiz-question h3 {
    font-size: 1.1rem;
    color: var(--petrol-dark-1);
    margin-bottom: 15px;
    font-weight: 600;
}

.quiz-options {
    margin-top: 10px;
    padding-left: 20px;
    margin-left: 20px;
}

.quiz-options label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.quiz-options input[type="radio"] {
    margin-right: 10px;
}

.quiz-results {
    display: none;
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.correct {
    color: var(--chem-green-1);
    font-weight: bold;
}

.incorrect {
    color: var(--chem-red-1);
    font-weight: bold;
}

/* ===========================
   DIFFICULTY FILTERS
   =========================== */
.difficulty-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.difficulty-filter {
    padding: 8px 15px;
    background-color: #edf8fb;
    border: 1px solid #77cbdc;
    color: #004352;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-filter:hover {
    background-color: #c6ebf3;
}

.difficulty-filter.active {
    background-color: #004352;
    color: white;
}

.difficulty-indicator {
    display: inline-block;
    margin-left: 15px;
    vertical-align: middle;
}

.difficulty-level {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: normal;
}

.difficulty-0 {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.difficulty-1 {
    background-color: #fff8e1;
    color: #a84300; /* Orange #ff9800 hatte nur 2,0 : 1 */
}

.difficulty-2 {
    background-color: #ffebee;
    color: var(--chem-red-2);
}

/* ===========================
   TOPIC CARDS
   =========================== */

.topic-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.hidden {
    display: none !important;
}

/* ===========================
   CARD STYLES (like mathe10)
   =========================== */
.task-card {
    background: white;
    border-radius: 12px;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: none;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 67, 82, 0.2);
}

.task-card .card-header {
    padding: 1rem 1.25rem;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

/* ===========================
   BUTTON STYLES (Petrol)
   =========================== */
.btn-mathe {
    /* etwas dunkler fuer weisse Schrift (vorher 3,2-4,0:1), 10.11.2026 */
    background: linear-gradient(135deg, var(--petrol-medium-2) 0%, #0b5c6e 100%) !important;
    color: white !important;
    border: none !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

.btn-mathe:hover {
    background: linear-gradient(135deg, var(--petrol-medium-2) 0%, var(--petrol-dark-1) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 156, 173, 0.4);
}

.btn-mathe-light {
    /* Kontrast (10.11.2026): weiss auf Hellblau hatte nur 2,5:1. Jetzt hellerer Grund, dunkle Schrift. */
    background: linear-gradient(135deg, var(--petrol-dark-bg) 0%, var(--petrol-light-1) 100%) !important;
    color: var(--petrol-dark-1) !important;
    border: none !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

.btn-mathe-light:hover {
    background: linear-gradient(135deg, var(--petrol-light-1) 0%, var(--petrol-light-2) 100%) !important;
    color: var(--petrol-dark-2) !important;
    transform: translateY(-2px);
}

.btn-mathe-dark {
    background: linear-gradient(135deg, var(--petrol-dark-1) 0%, var(--petrol-dark-2) 100%) !important;
    color: white !important;
    border: none !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

.btn-mathe-dark:hover {
    background: linear-gradient(135deg, var(--petrol-dark-2) 0%, #00242c 100%) !important;
    transform: translateY(-2px);
}

/* ===========================
   BADGE STYLES (Petrol)
   =========================== */
.badge-easy {
    background-color: var(--petrol-light-1) !important;
    color: var(--petrol-dark-2) !important;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-medium {
    background-color: var(--petrol-medium-1) !important;
    color: white !important;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===========================
   CARD HEADER GRADIENTS (Petrol)
   =========================== */
.card-header-light {
    background: linear-gradient(135deg, #b9e0e5 0%, #84c6d0 100%);
}

.card-header-medium {
    background: linear-gradient(135deg, var(--petrol-medium-1) 0%, var(--petrol-medium-2) 100%);
}

.card-header-dark {
    background: linear-gradient(135deg, var(--petrol-dark-1) 0%, var(--petrol-dark-2) 100%);
}

.card-header-neutral {
    background-color: var(--petrol-light-bg);
    color: var(--chem-text-dark);
    min-height: 3.5rem;
    display: flex;
    align-items: center;
}

/* H4-Überschriften in hellen Card-Headern dunkel */
.card-header-light h4 {
    color: var(--petrol-dark-2);
}

/* H4-Überschriften in mittleren Card-Headern weiss */
.card-header-medium h4 {
    /* weiss statt dunkelblau: Dunkelblau auf Mittelblau hatte Kontrast 2,4 (30.10.2026) */
    color: #ffffff !important;
}

/* H5-Überschriften im Content-Bereich dunkel */
h5 {
    color: var(--petrol-dark-2);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    /* Hero */
    .hero h1:not(.display-4) {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero {
        padding: 40px 20px;
    }

    /* Content Sections */
    .content-section {
        padding: 25px;
    }

    /* Molecule Containers */
    .molecule-container,
.molecule-models,
.nomenklatur-examples,
.properties-examples,
.reaction-examples {
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
    }

    .molecule-item,
.molecule-model,
.nomenklatur-example,
.reaction-item,
.topic-card {
        width: 90%;
        max-width: 300px;
        margin-bottom: 30px;
    }

    .reaction-item {
        width: 100%;
        float: none;
        margin: 15px 0;
    }

    /* Canvas & Buttons */
    .view-2d,
    .view-3d,
    .molecule-canvas {
        width: 180px;
        height: 180px;
    }

    .btn-toggle {
        width: 80%;
        min-width: unset;
    }

    /* Tables */
    table,
    .comparison-table,
    .formula-box {
        display: block;
        overflow-x: auto;
        width: 100%;
        font-size: 14px;
    }

    /* Controls */
    .controls-container {
        flex-direction: column;
        align-items: stretch;
    }

    .form-control,
    .cta-button {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Difficulty Filters */
    .difficulty-filters {
        flex-direction: column;
        align-items: center;
    }

    .difficulty-filter {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }

    /* Challenge */
    .challenge-question {
        flex-direction: column;
        align-items: flex-start;
    }

    .question-number {
        margin-bottom: 10px;
    }

    .challenge-molecule {
        margin: 0 0 15px 0;
        align-self: center;
    }

    .challenge-answer {
        width: 100%;
    }

    /* Quiz */
    .quiz-molecule {
        max-width: 100%;
        overflow-x: auto;
    }

    .quiz-options label {
        display: block;
        margin-bottom: 10px;
    }

    /* Canvas Container */
    .canvas-container {
        overflow-x: auto;
        padding-bottom: 20px;
    }

    canvas#siedepunkt-canvas,
    canvas#leitfaehigkeit-canvas {
        min-width: 800px;
        display: block;
        margin: 0 auto;
        max-width: 100%;
        height: auto;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    .hero {
        padding: 40px 20px;
    }

    .hero h1:not(.display-4) {
        font-size: 1.8rem;
    }

    .view-2d,
    .view-3d,
    .molecule-canvas {
        width: 160px;
        height: 160px;
    }

    .molecule-item,
.molecule-model,
.nomenklatur-example,
.reaction-item {
        padding: 10px 10px 60px 10px;
    }

    .btn-toggle {
        font-size: 13px;
        padding: 7px 12px;
    }

    .topic-card {
        flex-direction: column;
    }
}

/* ========================================
   Chemisches Gleichgewicht - Animationen
   ======================================== */

/* Animation Descriptions */
.animation-description {
    margin-top: 15px;
    font-size: 16px;
    line-height: 1.5;
}

/* Apple Animations */
.apple {
    transition: cx 1s, cy 1s;
}

/* Influence Factor Boxes */
.influence-factor-box {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.influence-factor-box h4 {
    color: #214147;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #479cad;
    padding-bottom: 0.5rem;
}

/* Responsive Anpassungen für Apfelkrieg Animation */
@media screen and (max-width: 768px) {
    #appleWarSVG text {
        font-size: 14px;
    }

    #appleWarSVG text[font-size="22"] {
        font-size: 18px;
    }

    #appleWarSVG text[font-size="16"] {
        font-size: 14px;
    }

    #appleWarSVG text[font-size="14"] {
        font-size: 12px;
    }

    #appleWarSVG text[font-size="12"] {
        font-size: 10px;
    }
}

@media screen and (max-width: 576px) {
    #appleWarSVG text {
        font-size: 12px;
    }

    #appleWarSVG text[font-size="22"] {
        font-size: 16px;
    }

    #appleWarSVG text[font-size="16"] {
        font-size: 12px;
    }

    #appleWarSVG text[font-size="14"] {
        font-size: 10px;
    }

    #appleWarSVG text[font-size="12"] {
        font-size: 8px;
    }

    #appleWarSVG circle.apple {
        r: 12;
    }
}

/* Responsive Anpassungen für Konzentrations-Animation */
@media screen and (max-width: 768px) {
    #concentrationSVG text {
        font-size: 14px;
    }

    #concentrationSVG text[font-size="22"] {
        font-size: 18px;
    }

    #concentrationSVG text[font-size="16"] {
        font-size: 14px;
    }

    #concentrationSVG text[font-size="14"] {
        font-size: 12px;
    }

    #concentrationSVG text[font-size="12"] {
        font-size: 10px;
    }
}

@media screen and (max-width: 576px) {
    #concentrationSVG text {
        font-size: 12px;
    }

    #concentrationSVG text[font-size="22"] {
        font-size: 16px;
    }

    #concentrationSVG text[font-size="16"] {
        font-size: 12px;
    }

    #concentrationSVG text[font-size="14"] {
        font-size: 10px;
    }

    #concentrationSVG text[font-size="12"] {
        font-size: 8px;
    }

    #startEquilibriumButton, #addGrandpaButton, #addGrandsonButton {
        transform: translate(-40px, 0);
    }

    #concResetButton {
        transform: translate(-120px, 0);
    }
}

/* Responsive Anpassungen für Druck-Animation */
@media screen and (max-width: 768px) {
    #pressureSVG text {
        font-size: 14px;
    }

    #pressureSVG text[font-size="22"] {
        font-size: 18px;
    }

    #pressureSVG text[font-size="16"] {
        font-size: 14px;
    }

    #pressureSVG text[font-size="14"] {
        font-size: 12px;
    }

    #pressureSVG text[font-size="12"] {
        font-size: 10px;
    }
}

@media screen and (max-width: 576px) {
    #pressureSVG text {
        font-size: 12px;
    }

    #pressureSVG text[font-size="22"] {
        font-size: 16px;
    }

    #pressureSVG text[font-size="16"] {
        font-size: 12px;
    }

    #pressureSVG text[font-size="14"] {
        font-size: 10px;
    }

    #pressureSVG text[font-size="12"] {
        font-size: 8px;
    }

    #pressureResetButton {
        transform: translate(-100px, 0);
    }

    #reactionChamber circle[cx="650"] {
        transform: translate(-50px, 0);
    }

    #manometerNeedle {
        transform: translate(-50px, 0) rotate(60deg);
        transform-origin: 600px 250px;
    }
}

/* Allgemeine Responsive Anpassungen für Equilibrium Diagrams */
@media screen and (max-width: 768px) {
    .equilibrium-diagrams svg {
        transform: scale(0.9);
        transform-origin: center top;
    }
}

@media screen and (max-width: 576px) {
    .equilibrium-diagrams svg {
        transform: scale(0.7);
        transform-origin: center top;
    }
}

/* Print Styles */
@media print {

    .animation-description {
        page-break-inside: avoid;
    }
}

/* iOS-spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    [cursor="pointer"] {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        touch-action: manipulation;
    }

    #startButton,
#tempIncreaseButton,
#resetButton,
#startEquilibriumButton,
#addGrandpaButton,
#addGrandsonButton,
#pressureResetButton {
        min-width: 44px;
        min-height: 44px;
    }

    [cursor="pointer"] text {
        pointer-events: none;
        user-select: none;
        -webkit-user-select: none;
    }
}

/* ================================================
   DUNKLE HINT-BOX
   ================================================ */

/* Hint-Box ist hier dunkel: alle Ueberschriften darin weiss (sonst greift
   z. B. ".content-section h3" mit Dunkelblau - unsichtbar). 30.10.2026 */
div.hint-box :is(h1, h2, h3, h4, h5, h6) {
    color: #ffffff !important; /* !important: einzelne Seiten haben spezifischere h3-Regeln */
}

/* Links im dunklen Kasten: Bootstrap-Blau war darauf kaum lesbar (Glossar GK 12) */
div.hint-box a {
    color: #92dbeb;
    text-decoration: underline;
}

/* ===========================
   Petrol fuer Bausteine aus style.css, glass.css und Bootstrap
   (body.fach-chemie, weil glass.css nach dieser Datei geladen wird)
   =========================== */
.fach-chemie .task-card .card-header.card-header-light  { background: linear-gradient(135deg, #b9e0e5 0%, #84c6d0 100%) !important; }
.fach-chemie .task-card .card-header.card-header-medium { background: linear-gradient(135deg, #147f94 0%, #0b5c6e 100%) !important; }
.fach-chemie .task-card .card-header.card-header-dark   { background: linear-gradient(135deg, #0e5a6b 0%, #073440 100%) !important; }

.fach-chemie .card { box-shadow: 0 8px 28px rgba(11, 74, 90, .12), inset 0 1px 0 rgba(255, 255, 255, .8); }
.fach-chemie .task-card:hover { box-shadow: 0 14px 30px rgba(11, 74, 90, .18); }

.fach-chemie .tipps-kasten { background: var(--petrol-light-bg); border-left-color: var(--petrol-medium-1); }
.fach-chemie .tipps-kasten h2 { color: var(--petrol-dark-1); }
.fach-chemie .tipps-kasten h2 .fas { color: var(--petrol-medium-2); }

.fach-chemie .formula-box { background-color: var(--petrol-light-bg); border-left-color: var(--petrol-medium-1); }
.fach-chemie .task-header { background: linear-gradient(135deg, var(--petrol-medium-1) 0%, var(--petrol-medium-2) 100%); }

.fach-chemie .btn-primary { box-shadow: 0 5px 15px rgba(11, 74, 90, .3); }
.fach-chemie .btn-primary:hover { background: linear-gradient(135deg, var(--petrol-medium-2) 0%, var(--petrol-medium-1) 100%); box-shadow: 0 8px 20px rgba(11, 74, 90, .4); }
.fach-chemie .btn-outline-primary {
    --bs-btn-color: var(--petrol-medium-2);
    --bs-btn-border-color: var(--petrol-medium-2);
    --bs-btn-hover-bg: var(--petrol-medium-2);
    --bs-btn-hover-border-color: var(--petrol-medium-2);
    --bs-btn-active-bg: var(--petrol-medium-2);
    --bs-btn-active-border-color: var(--petrol-medium-2);
}
.fach-chemie main .text-primary { color: var(--petrol-medium-2) !important; }
.fach-chemie main .bg-primary { background-color: var(--petrol-medium-2) !important; }
.fach-chemie main .alert-info { --bs-alert-color: var(--petrol-dark-2); --bs-alert-bg: var(--petrol-light-bg); --bs-alert-border-color: var(--petrol-light-1); }

/* Links, Tabellenkoepfe, Schalter (Bootstrap-Blau) */
.fach-chemie main { accent-color: var(--petrol-medium-2); --bs-link-color: #0e6f84; --bs-link-color-rgb: 14, 111, 132; --bs-link-hover-color: #0b4a5a; --bs-link-hover-color-rgb: 11, 74, 90; }
.fach-chemie main .table-primary,
.fach-chemie main .table-primary > th,
.fach-chemie main .table-primary > td { --bs-table-bg: var(--petrol-medium-bg); --bs-table-color: var(--petrol-dark-2); --bs-table-border-color: var(--petrol-dark-bg); }
.fach-chemie main .form-check-input:checked { background-color: var(--petrol-medium-2); border-color: var(--petrol-medium-2); }
.fach-chemie main .form-check-input:focus,
.fach-chemie main .form-select:focus,
.fach-chemie main .form-control:focus { border-color: var(--petrol-light-2); box-shadow: 0 0 0 .25rem rgba(14, 111, 132, .22); }
.fach-chemie main .form-range { accent-color: var(--petrol-medium-2); }
.fach-chemie main .form-range::-webkit-slider-thumb { background-color: var(--petrol-medium-2); }
.fach-chemie main .form-range::-moz-range-thumb { background-color: var(--petrol-medium-2); }
.fach-chemie .melden-knopf { color: var(--petrol-medium-2); border-color: rgba(14, 111, 132, .45); background: rgba(210, 234, 237, .92); }

/* ===========================
   EXPERIMENT NACHWEISREAKTIONEN (chemie10/alkanole, alkanole-nachweis.js)
   =========================== */
.nw-wahl { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.nw-wahl button,
.nw-vermutung button { border: 1.5px solid var(--petrol-medium-2); background: #fff; color: var(--petrol-medium-2); border-radius: 999px; font-weight: 600; }
.nw-wahl button { padding: .45rem 1.1rem; min-height: 2.75rem; }
.nw-wahl button[aria-pressed="true"],
.nw-vermutung button[aria-pressed="true"] { background: var(--petrol-medium-2); color: #fff; }
.nw-wahl button:focus-visible,
.nw-vermutung button:focus-visible { outline: 3px solid var(--petrol-dark-1); outline-offset: 2px; }
.nw-schritte { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; list-style: none; margin: 0 0 .75rem; padding: 0; }
.nw-schritte li { border-top: 4px solid #9fb9bf; padding-top: .35rem; margin: 0; font-size: .9rem; color: #38555d; }
.nw-schritte li span { font-weight: 700; }
.nw-schritte li b { font-weight: inherit; }
.nw-schritte li.nw-fertig { border-top-color: var(--petrol-medium-1); }
.nw-schritte li.nw-aktiv { border-top-color: var(--petrol-dark-1); color: var(--petrol-dark-2); font-weight: 700; }
.nw-zeile { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; min-height: 4.2rem; }
.nw-status { margin: 0; }
.nw-uhr { flex: none; background: var(--petrol-dark-1); color: #fff; border-radius: 8px; padding: .25rem .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.nw-glaeser { display: grid; grid-template-columns: repeat(var(--nw-anzahl, 3), minmax(0, 1fr)); gap: 1rem; }
.nw-karte { background: #fff; border-radius: 14px; overflow: hidden; text-align: center; padding-bottom: .75rem; box-shadow: 0 2px 8px rgba(11, 74, 90, .12); display: flex; flex-direction: column; }
.nw-bild { background: #4a7783; margin-bottom: .6rem; }
.nw-bild svg { display: block; width: 100%; height: 250px; }
.nw-karte p { margin: 0 .5rem; }
.nw-name { font-weight: 700; color: var(--petrol-dark-1); hyphens: manual; }
.nw-formel { font-size: .9rem; min-height: 2.9em; line-height: 1.45; overflow-wrap: anywhere; }
.nw-typ { font-size: .9rem; color: #38555d; }
.nw-vermutung { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; padding: .5rem .5rem 0; margin-top: auto; }
.nw-vermutung button { padding: .3rem .8rem; min-height: 2.5rem; font-size: .9rem; }
.nw-vermutung button:disabled:not([aria-pressed="true"]) { opacity: .45; }
.nw-karte .nw-urteil { min-height: 1.6em; margin-top: .4rem; font-weight: 700; }
.nw-ok { color: #1b6e2c; }
.nw-falsch { color: #b3261e; }
.nw-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.nw-knoepfe .btn:disabled { opacity: .5; }
.nw-ergebnis { background: #fff; }
.nw-klein { font-weight: 400; }
.nw-nb { white-space: nowrap; }
.nw-hinweis { margin: .6rem 0 0; color: #a84300; }
@media (max-width: 767.98px) {
    .nw-glaeser { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .nw-bild svg { height: 210px; }
    /* Nur der aktive Schritt zeigt seinen Namen, sonst brechen die Woerter um */
    .nw-schritte li { font-size: .85rem; white-space: nowrap; }
    .nw-schritte li:not(.nw-aktiv) b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .nw-schritte li.nw-aktiv:nth-child(n+4) { display: flex; justify-content: flex-end; gap: .3em; }
    .nw-knoepfe .btn { flex: 1 1 45%; padding-left: .5rem; padding-right: .5rem; }
    .nw-zeile { flex-direction: column; gap: .4rem; min-height: 8.5rem; margin-bottom: .5rem; }
    .nw-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .nw-tabelle tr { display: block; border-bottom: 2px solid var(--petrol-dark-bg); padding: .4rem 0; }
    .nw-tabelle th, .nw-tabelle td { display: block; border: 0; padding: .15rem .25rem; }
    .nw-tabelle td::before { content: attr(data-titel) ": "; font-weight: 600; }
}

/* Sprungziele (z. B. Link aus dem Escape-Room) nicht unter der festen Menueleiste verstecken */
main .example-box[id],
main .hint-box[id] {
    scroll-margin-top: 96px;
}
