/* ================================
   Grundlayout für Content-Seiten
   (wird im iframe verwendet)
   ================================ */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #e5e7eb;            /* helles Grau */
    color: #111827;                 /* dunkler Text */
}

/* "Karte" für den eigentlichen Inhalt */
.section {
    max-width: 900px;
    margin: 1.5rem auto 2.5rem;
    padding: 1.75rem 1.5rem;
    background: #ffffff;
    color: #111827;
    border-radius: 0.9rem;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
}

/* Überschriften und Listen */

.section h1 {
    font-size: 1.8rem;
    margin-bottom: 0.7rem;
    color: #0f172a;
}

.section h2 {
    font-size: 1.3rem;
    margin-top: 1.4rem;
    margin-bottom: 0.4rem;
    color: #111827;
}

.section h3 {
    font-size: 1.1rem;
    margin-top: 1.1rem;
    margin-bottom: 0.35rem;
    color: #111827;
}

.section p {
    margin: 0.35rem 0;
    font-size: 0.97rem;
    color: #1f2933;
}

.section ul,
.section ol {
    margin: 0.4rem 0 0.6rem 1.2rem;
    font-size: 0.97rem;
    color: #1f2933;
}

.section li + li {
    margin-top: 0.2rem;
}

/* Links im Content */

.section a {
    color: #2563eb;
    text-decoration: none;
}

.section a:hover {
    text-decoration: underline;
}

/* ================================
   Inline-Code (im Fließtext)
   ================================ */

code,
.code-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
                 "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    background: #f3f4f6;
    color: #111827;
    padding: 0.05rem 0.25rem;
    border-radius: 0.25rem;
    border: 1px solid #e5e7eb;
}

/* ================================
   Level-Indikator
   ================================ */

.level-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    margin-bottom: 0.9rem;
    background: #f9fafb;
    color: #111827;
}

.level-indicator .dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
}

/* Level-Farben */
.level-indicator.level-1 .dot { background: #22c55e; }
.level-indicator.level-2 .dot { background: #eab308; }
.level-indicator.level-3 .dot { background: #f97316; }
.level-indicator.level-4 .dot { background: #ef4444; }

/* ================================
   Didaktik-Box
   ================================ */

.didaktik-box {
    margin: 0.9rem 0;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
    color: #0f172a;
    font-size: 0.9rem;
}

.didaktik-box-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* ================================
   Code-Blöcke mit Copy-Button
   ================================ */

.code-block {
    position: relative;
    margin: 0.9rem 0 1.2rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #1f2937;
    background: #020617;          /* sehr dunkles Blau/Schwarz */
}

/* Header oben im Code-Block */
.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    background: #020617;
    color: #e5e7eb;
    border-bottom: 1px solid #1f2937;
}

.copy-button {
    border: none;
    background: rgba(148, 163, 184, 0.35);
    color: #e5e7eb;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.copy-button:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* eigentlicher Code-Bereich */

.code-block pre {
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    line-height: 1.5;
    overflow-x: auto;
    background: #020617;
}

/* Text im Code-Block: hell & monospaced */
.code-block pre code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
                 "Liberation Mono", "Courier New", monospace;
    color: #e5e7eb;            /* sehr hell auf dunklem Hintergrund */
    background: none;          /* Inline-Code-Styles hier neutralisieren */
    border: none;
    padding: 0;
    border-radius: 0;
}

/* ================================
   Kleinere Bildschirme
   ================================ */

@media (max-width: 640px) {
    .section {
        margin: 1rem auto 2rem;
        padding: 1.25rem 1rem;
        border-radius: 0.75rem;
    }
}


/* ================================
   Tabellen für API-Referenzen
   ================================ */

.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8rem 0 1.2rem;
    font-size: 0.92rem;
}

.api-table th,
.api-table td {
    border: 1px solid #d1d5db;
    padding: 0.4rem 0.6rem;
    text-align: left;
    vertical-align: top;
}

.api-table th {
    background: #f3f4f6;
    font-weight: 600;
    color: #111827;
}

.api-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Inline-Code in Tabellen ein bisschen kleiner lassen */
.api-table code {
    font-size: 0.9em;
}
