/* styles.css */

/* Grundlegendes Styling für Dark Mode */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #121212; /* Dunkler Hintergrund */
    color: #e0e0e0; /* Helle Textfarbe für Kontrast */
    line-height: 1.6;
    max-width: 1200px;
    margin: 20px auto; /* Zentriert den Inhalt und fügt Abstand zum Fensterrand hinzu */
    box-sizing: border-box;
}

#sidebar {
    position: fixed;
    top: 20px;

    left: 20px;
    width: 250px; /* Breite der Sidebar */
    height: calc(100vh - 40px); /* Gesamthöhe minus oberer und unterer Abstand */
    overflow-y: auto; /* Falls der Inhalt der Sidebar länger ist */
    background-color: #1e1e1e; /* Hintergrundfarbe passend zum bestehenden Design */
    padding: 20px;
    border: 1px solid #333333;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 1001;
}

#content {
    margin-left: 300px; /* Platz für Sidebar plus etwas Abstand */
    padding: 20px;
}

/* Überschriften */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff; /* Weiße Überschriften für bessere Sichtbarkeit */
    margin-top: 30px;
    margin-bottom: 10px;
    font-weight: 600;
}

h1 {
    font-size: 2.5em;
    text-align: center;
    border-bottom: 2px solid #333333; /* Dunkle Grenze für Trennung */
    padding-bottom: 10px;
}

h2 {
    font-size: 2em;
    border-bottom: 1px solid #333333;
    padding-bottom: 5px;
}

h3 {
    font-size: 1.75em;
    color: #1abc9c; /* Helle Farbe für Unterüberschriften */
}

h4 {
    font-size: 1.5em;
    color: #3498db;
}

h5 {
    font-size: 1.25em;
    color: #9b59b6;
}

h6 {
    font-size: 1em;
    color: #8e44ad;
}

/* Absätze */
p {
    margin-bottom: 15px;
}

/* Listen */
ul, ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* Hervorhebungen */
.property {
    font-weight: bold;
    color: #3498db; /* Blaue Farbe für Eigenschaften */
}

.value {
    color: #8e44ad; /* Violette Farbe für Werte */
    font-style: italic;
}

/* Links */
a {
    color: #1abc9c; /* Helle, auffällige Farbe für Links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Codeblöcke */
pre {
    background-color: #1e1e1e; /* Dunkler Hintergrund für Codeblöcke */
    color: #ecf0f1; /* Helle Textfarbe für Code */
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 20px;
}

code {
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

/* Beispiele und Notizen */
.example {
    padding: 15px;
    border-left: 4px solid #1abc9c;
    margin-bottom: 20px;
    border-radius: 4px;
}

.note {
    background-color: #f39c12; /* Orange Hintergrund für Notizen */
    padding: 15px;
    border-left: 4px solid #e67e22;
    margin-bottom: 20px;
    border-radius: 4px;
}

.important {
    background-color: #c0392b; /* Roter Hintergrund für wichtige Hinweise */
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

#toc ul {
    padding-left: 20px;
}

#toc li {
    margin-bottom: 5px;
}

#toc a {
    color: #1abc9c;
    text-decoration: none;
}

#toc a:hover {
    text-decoration: underline;
}

/* Verschachteltes Inhaltsverzeichnis */
#toc ul ul {
    padding-left: 20px;
    margin-top: 5px;
}

#toc ul ul li {
    margin-bottom: 3px;
}

/* "Nach oben"-Button Styling */
.back-to-top {
    position: fixed;
    bottom: 40px; /* Abstand vom unteren Rand */
    right: 40px;  /* Abstand vom rechten Rand */
    background-color: #1abc9c; /* Hintergrundfarbe */
    color: white; /* Textfarbe */
    padding: 10px 15px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000; /* Sicherstellen, dass der Button oben bleibt */
}

.back-to-top:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.back-to-top:active {
    transform: translateY(0);
}

/* Optional: Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Responsive Layout */
@media (max-width: 768px) {
    body {
        padding: 10px;
        margin: 10px auto;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.75em;
    }

    h3 {
        font-size: 1.5em;
    }

    h4 {
        font-size: 1.25em;
    }

    h5 {
        font-size: 1.1em;
    }

    h6 {
        font-size: 0.9em;
    }

    pre, code {
        font-size: 0.9em;
    }
}