/* Styles für interaktive Übungen */
.interactive-exercises {
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.exercise-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.exercise-btn {
  padding: 8px 15px;
  background-color: #e0e0e0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.exercise-btn:hover {
  background-color: #d0d0d0;
}

.exercise-btn.active {
  background-color: #4285f4;
  color: white;
}

.exercise-item {
  display: none;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.exercise-item.active {
  display: block;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Gemeinsame Basis-Stile für beide Buttons */
.check-btn, .reset-btn {
  flex: 1; /* Beide Buttons nehmen gleich viel Platz ein */
  padding: 8px 20px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  min-width: 120px; /* Minimale Breite für beide Buttons */
}

/* Spezifische Farben für den Überprüfen-Button */
.check-btn {
  background-color: #4caf50;
}

.check-btn:hover {
  background-color: #388e3c;
}

/* Spezifische Farben für den Zurücksetzen-Button */
.reset-btn {
  background-color: #f44336;
}

.reset-btn:hover {
  background-color: #d32f2f;
}

.feedback {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  display: none;
}

.feedback.success {
  display: block;
  background-color: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
}

.feedback.error {
  display: block;
  background-color: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
}

/* Anpassungen für den GeoGebra-Container */
.geogebra-container {
  width: 100%;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  padding-bottom: 20px;
}

.geogebra-iframe {
  display: block;
  width: 100% !important; /* Wichtig: Überschreibt inline-Styles des iframes */
  min-height: 600px !important; /* Größere minimale Höhe setzen */
  border: 1px solid #ddd !important;
  box-sizing: border-box;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Neue Styles für die Parameter-Grid mit 2x2 Layout */
.parameter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  margin: 20px 0;
}

.parameter-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.parameter-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.parameter-card h3 {
  color: #4285f4;
  margin-top: 0;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

/* Für responsives Verhalten */
@media (max-width: 768px) {
  .geogebra-iframe {
    min-height: 500px !important;
  }
  
  .parameter-grid {
    grid-template-columns: 1fr; /* Auf kleineren Bildschirmen eine Spalte */
  }
}

/* Stellen Sie sicher, dass andere Elemente dem Container nicht im Weg stehen */
.section {
  width: 100%;
  box-sizing: border-box;
}

/* Falls notwendig, können wir versuchen, das iFrame durch Javascript anzupassen */
/* Dafür müssten wir ein zusätzliches JavaScript-Skript erstellen */

/* Ergänzungen für die mobile Ansicht - fügen Sie diese am Ende der sinus-styles.css ein */

/* Verbesserte GeoGebra responsive Einbindung */
.geogebra-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* Aspect Ratio 4:3 */
  margin: 20px 0;
  overflow: hidden;
}

.geogebra-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 1px solid #ddd;
  box-sizing: border-box;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Anpassungen für die Übungsaufgaben */
@media (max-width: 767px) {
  /* Anpassen der Container für mobile Geräte */
  .interactive-exercises {
    padding: 15px;
    margin: 15px 0;
  }
  
  .exercise-item {
    padding: 15px;
  }
  
  /* GeoGebra-Container für kleine Bildschirme */
  .geogebra-container {
    padding-bottom: 100%; /* Quadratisches Format auf kleinen Bildschirmen */
  }
  
  /* Größere Buttons für Touch-Geräte */
  .button-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .check-btn, .reset-btn {
    min-height: 44px;
    padding: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
  }
  
  /* Optimierung der Aufgabenauswahl */
  .exercise-selector {
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
  }
  
  /* Verbesserte Darstellung von Feedback */
  .feedback {
    margin-top: 15px;
    padding: 12px;
    font-size: 14px;
  }
}

/* Anpassungen für sehr kleine Bildschirme */
@media (max-width: 480px) {
  .interactive-exercises {
    padding: 10px;
    margin: 10px 0;
  }
  
  .exercise-item {
    padding: 10px;
  }
  
  .exercise-btn {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  /* Daten-Tabellen für sehr kleine Bildschirme */
  .data-table-container {
    font-size: 12px;
  }
  
  .data-table th, .data-table td {
    padding: 5px 3px;
  }
  
  /* Feedback-Text auf kleinen Bildschirmen */
  .feedback {
    font-size: 13px;
    padding: 10px;
  }
}

/* Optimierungen für Touch-Geräte */
@media (pointer: coarse) {
  /* Größere Berührungsflächen */
  .exercise-btn {
    padding: 10px 15px;
    margin-bottom: 5px;
  }
  
  /* Verbessern der Tastatur-Eingabe auf mobilen Geräten */
  input[type="text"] {
    font-size: 16px; /* Verhindert Zoom auf iOS */
    padding: 10px;
  }
  
  /* Sicherstellen, dass numerische Tastatur bei numerischen Eingaben erscheint */
  input[type="text"][placeholder*="Zahl"] {
    inputmode: "numeric";
  }
}