/* Globale Initialisierung des Zählers */
body {
    counter-reset: section; /* Initialisiert den section-Zähler auf der gesamten Seite */
}

/* Titel des Dokuments */
.title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
/* Stil für das Startbild in Markdown */
img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    display: block;
}
/* Initialisierung der Zähler für Überschriften */
h1 {
    counter-reset: subsection; /* Reset für subsections bei neuer h1 */
}

h2 {
    counter-reset: subsubsection; /* Reset für subsubsections bei neuer h2 */
}

h1::before {
    counter-increment: section; /* Erhöht den section-Zähler */
    content: counter(section) ". "; /* Zeigt den aktuellen Wert von section */
}

h2::before {
    counter-increment: subsection; /* Erhöht den subsection-Zähler */
    content: counter(section) "." counter(subsection) " "; /* Zeigt section und subsection */
}

h3::before {
    counter-increment: subsubsection; /* Erhöht den subsubsection-Zähler */
    content: counter(section) "." counter(subsection) "." counter(subsubsection) " "; /* Zeigt section, subsection und subsubsection */
}

h4::before {
    counter-increment: subsubsubsection; /* Erhöht den subsubsubsection-Zähler */
    content: counter(section) "." counter(subsection) "." counter(subsubsection) "." counter(subsubsubsection) " "; /* Zeigt alle vier Zähler */
}

/* Grundlegendes Styling für eine moderne Optik */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Wrapper für den Inhalt */
.wrapper {
    max-width: 800px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Stil für das Inhaltsverzeichnis (TOC) */
#markdown-toc {
    counter-reset: item;
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 40px;
}

#markdown-toc li {
    counter-increment: item;
    margin: 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

#markdown-toc li a::before {
    content: counters(item, ".") ". "; /* Zählt und fügt die Nummer zum Link hinzu */
    color: #3498db;
}

#markdown-toc ul {
    counter-reset: item;
    margin-left: 20px;
}

#markdown-toc a {
    text-decoration: none;
    color: #3498db;
    transition: color 0.2s;
}

#markdown-toc a:hover {
    color: #2980b9;
}

/* Überschriftenstil */
h1, h2, h3, h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.2;
}

h1 {
    font-size: 28px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 40px;
}

h2 {
    font-size: 25px;
    margin-top: 30px;
}

h3 {
    font-size: 22px;
    margin-top: 20px;
}

h4 {
    font-size: 20px;
    margin-top: 15px;
}

/* Absatzstil */
p {
    margin: 0 0 20px;
    font-size: 18px;
    line-height: 1.5;
}

/* Links im Fließtext */
a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid #3498db;
}

a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* Tabellenstil */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #3498db;
    color: white;
}

/* Schattierungen für die Tabelle */
tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Verbesserte Abstände für den Seiteninhalt */
ul, ol {
    margin: 0 0 20px 1px;
}

li {
    margin-bottom: 10px;
}

#back-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: #3498db;
            color: white;
            padding: 10px 15px;
            border-radius: 5px;
            text-decoration: none;
            font-size: 14px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            display: none; /* Der Button wird standardmäßig ausgeblendet */
            transition: background-color 0.3s ease;
        }

#back-to-top:hover {
            background-color: #2980b9;
        }
