/**
 * Ergänzende Styles für die mit ChemDoodle umgesetzte Alkene-Alkine-Seite
 * Erstellt für Klasse 10 Chemieunterricht
 */

/* Moleküldarstellung */
.molecule-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 30px 0;
    gap: 20px;
    width: 100%;
    clear: both;
}

.molecule-item {
    border: 1px solid #ccc;
    padding: 15px 15px 55px 15px; /* Erhöhter Padding am unteren Rand für Button */
    border-radius: 5px;
    background-color: #f9f9f9;
    width: 250px;
    min-height: 300px;
    text-align: center;
    position: relative; /* Wichtig für Button-Positionierung */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px; /* Abstand zwischen Items */
}

.molecule-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

.molecule-item p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.canvas-wrapper {
    width: 100%;
    position: relative;
}

/* Verbesserte Button-Gestaltung */
.btn-toggle {
    background-color: #4CAF50;
    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;
    
    /* Bessere Positionierung innerhalb des Containers */
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 15px !important;
    z-index: 10 !important;
    
    /* Übergang für Hover-Effekt */
    transition: background-color 0.3s;
}

.btn-toggle:hover {
    background-color: #45a049;
}

/* Canvas-Stile mit konstanten Größen */
.view-2d, .view-3d {
    width: 100%;
    margin: 0 auto 15px auto;
    display: block;
}

.view-3d {
    display: none; /* 3D-Ansicht standardmäßig ausblenden */
}

/* Verbesserte Molekül-Modelle Sektion */
.molecule-models {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0 60px 0; /* Erhöhter Abstand nach unten */
    gap: 20px;
    width: 100%;
    clear: both;
}

.molecule-model {
    text-align: center;
    margin: 15px;
    padding: 15px 15px 55px 15px; /* Erhöhter Padding am unteren Rand für Button */
    background-color: #f5f5f5;
    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 h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    width: 100%;
}

/* Verbesserte Nomenklatur-Beispiele */
.nomenklatur-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 20px 0 40px 0; /* Verbesserter vertikaler Abstand */
    width: 100%;
}

.nomenklatur-example {
    margin: 10px;
    padding: 15px 15px 55px 15px; /* Platz für den Button */
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 240px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.nomenklatur-example h4 {
    margin-top: 0;
    color: #2c3e50;
}

/* Moleküldisplay für Erklärungen */
.molecule-display {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.molecule-display .molecule-image {
    margin: 0 auto;
    max-width: 400px;
}

.molecule-caption {
    font-style: italic;
    margin-top: 10px;
    color: #666;
}

/* Info-Box */
.info-box {
    background-color: #e3f2fd;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2196f3;
}

.info-box h3, .info-box h4 {
    color: #1565c0;
    margin-top: 0;
}

/* Schlüsselpunkte-Liste */
.key-points {
    background-color: #f9fbe7;
    padding: 15px 15px 15px 35px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #cddc39;
}

.key-points li {
    margin-bottom: 10px;
}

.key-points li:last-child {
    margin-bottom: 0;
}

/* Vergleichstabelle */
.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 #ddd;
}

.comparison-table th {
    background-color: #e8eaf6;
    color: #3f51b5;
}

.comparison-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

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

/* Formel-Box */
.formula-box {
    background-color: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.formula-box h4 {
    margin-top: 0;
    color: #ff8f00;
}

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

.formula-box th,
.formula-box td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
/* Themen-Karten */
.topic-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 25px 0;
    gap: 20px;
}

/* Aufmerksamkeits-Box */
.attention {
    background-color: #fff3e0;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #ff9800;
}

.attention h3 {
    margin-top: 0;
    color: #ef6c00;
}

.attention i {
    margin-right: 8px;
}

/* Reaktionsbeispiele */
.reaction-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 20px 0;
}

.reaction-example {
    margin: 15px;
    padding: 20px;
    background-color: #f0f8ff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;  /* Volle Breite nutzen */
    max-width: 450px; /* Maximale Breite begrenzen */
    box-sizing: border-box; /* Padding innen statt außen */
}
.reaction-example h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.reaction-example .formula {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    text-align: center;
    width: 100%;
    overflow-x: auto;  /* Ermöglicht horizontales Scrollen wenn nötig */
    white-space: nowrap; /* Verhindert Zeilenumbrüche in Formeln */
    display: block;
    min-height: 50px; /* Mindesthöhe hinzufügen */
}

.reaction-example {
    margin: 15px;
    padding: 20px;
    background-color: #f0f8ff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;  /* Volle Breite nutzen */
    max-width: 450px; /* Maximale Breite begrenzen */
    box-sizing: border-box; /* Padding innen statt außen */
}

/* Bei engen Bildschirmen */
@media (max-width: 768px) {
    .reaction-examples {
        flex-direction: column;
        align-items: center;
    }
    
    .reaction-example {
        width: 90%;
        max-width: none;
    }

/* Interaktive Sektionen */
.interactive-section {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.interactive-section h3 {
    margin-top: 0;
    color: #2c3e50;
}

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

.form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.cta-button {
    background-color: #3f51b5;
    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: #303f9f;
}

.canvas-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Quiz-Container */
.quiz-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quiz-question {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.quiz-question h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.quiz-options {
    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: #4caf50;
    font-weight: bold;
}

.incorrect {
    color: #f44336;
    font-weight: bold;
}

/* Highlight Links */
.highlight-link {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin: 30px 0;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.highlight-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.highlight-link i {
    font-size: 36px;
    color: #3f51b5;
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.highlight-link-content {
    flex: 1;
}

.highlight-link-content h3 {
    margin-top: 0;
    color: #2c3e50;
}

.highlight-link-content a {
    display: inline-block;
    margin-top: 10px;
    color: #3f51b5;
    text-decoration: none;
    font-weight: bold;
}

.highlight-link-content a:hover {
    text-decoration: underline;
}

/* Für mobile Geräte */
@media (max-width: 768px) {
    .molecule-container,
    .molecule-models,
    .nomenklatur-examples,
    .topic-cards,
    .reaction-examples {
        flex-direction: column;
        align-items: center;
    }
    
    .molecule-item,
    .molecule-model,
    .nomenklatur-example,
    .topic-card,
    .reaction-example {
        width: 90%;
        max-width: 300px;
    }
    
    .comparison-table {
        font-size: 14px;
    }
    
    .btn-toggle {
        width: 80%;
        min-width: unset;
    }
    
    .controls-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-control,
    .cta-button {
        width: 100%;
    }
    
    .highlight-link {
        flex-direction: column;
        text-align: center;
    }
    
    .highlight-link i {
        margin: 0 0 15px 0;
        justify-content: center;
    }
}

/* Für sehr kleine Bildschirme */
@media (max-width: 480px) {
    .molecule-item,
    .molecule-model,
    .nomenklatur-example {
        padding: 10px 10px 60px 10px;
    }
    
    .view-2d, .view-3d {
        width: 160px;
        height: 160px;
    }
    
    .btn-toggle {
        font-size: 13px;
        padding: 7px 12px;
    }
    
    .topic-card {
        flex-direction: column;
    }
    
    .card-icon {
        width: 100%;
        padding: 15px 0;
    }
}

/* Clearfix-Helfer */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
/* MathJax-spezifische Anpassungen */
.MathJax_Display {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.MathJax {
    display: inline-block !important;
}