/* ==============================
   Basis-Excel-Styling
============================== */
:root {
  --excel-header-size: 28px;
  --excel-cell-width: 80px;
}

.excel-wrapper {
  overflow-x: auto;
  margin: 20px 0;
}

.excel, .excel-tabelle {
  border-collapse: collapse;
  min-width: 520px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.excel th, .excel td,
.excel-tabelle th, .excel-tabelle td {
  border: 1px solid #d9d9d9;
  height: 28px;
  padding: 4px 6px;
  vertical-align: middle;
  font-size: 14px;
}

/* Spaltenüberschriften */
.excel thead th, .excel-tabelle thead th {
  background: #f0f0f0;
  text-align: center;
  height: var(--excel-header-size);
}

/* Obere linke Ecke */
.corner {
  width: var(--excel-header-size);
  min-width: var(--excel-header-size);
  background: #f0f0f0;
}

/* Zeilen-Nummern */
.excel tbody th, .excel-tabelle tbody th {
  background: #f0f0f0;
  font-weight: normal;
  text-align: center;
  width: var(--excel-header-size);
  min-width: var(--excel-header-size);
  padding: 0;
}

/* Zahlen rechtsbündig */
.num, .zelle.ergebnis, .sum {
  text-align: right;
  font-weight: bold;
}

/* Formeltext */
.formula, .zelle.formel {
  font-family: Consolas, "Courier New", monospace;
  background: #f1f2f6;
}

/* Ergebnis hervorheben */
.sum, .zelle.ergebnis {
  background: #fef9e7;
}

/* Unterstrich für Beispiel */
.underline {
  border-bottom: 2px solid #000 !important;
}

/* Responsive Anpassung */
@media (max-width: 600px) {
  .excel th, .excel td, .excel-tabelle th, .excel-tabelle td {
    font-size: 12px;
    height: 24px;
  }
}

/* ==============================
   Interaktive Übungen
============================== */
.interaktive-uebung {
  background: #fff;
  padding: 18px 22px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

.interaktive-uebung h3 {
  margin-top: 0;
}

.interaktive-uebung ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.interaktive-uebung button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #3498db;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.interaktive-uebung button:hover {
  background: #2980b9;
}

.interaktive-uebung .feedback {
  margin-top: 10px;
  font-weight: bold;
  font-size: 1rem;
}

/* ==============================
   Sonstige Layout-Anpassungen
============================== */
.formel-seite h2 {
  margin-top: 30px;
  color: #2f3640;
}

.formel-code {
  display: block;
  background: #f1f2f6;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: Consolas, "Courier New", monospace;
  margin: 10px 0;
}
