body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--link-color);
}

a:hover {
    color: var(--link-hover-color);
    cursor: pointer;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    background-color: var(--sidebar-bg);
    padding: 10px;
    overflow-y: auto;
    display: inline-block;
    white-space: nowrap;
    height: 100%;
    box-sizing: border-box;
    max-width: fit-content; /* Dynamische Breite basierend auf dem Inhalt */
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/** Navigation Styles **/
ul {
    list-style-type: none;
    padding-left: 20px;
    margin: 0;
}

li.folder > a {
    color: var(--link-color);
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

li.file > a {
    color: var(--text-color);
    text-decoration: none;
}

li.folder > a:hover,
li.file > a:hover {
    color: var(--link-hover-color);
    cursor: pointer;
}

.collapsed {
    display: none;
}

/** Markdown Content **/
pre {
    background: var(--pre-bg);
    padding: 1em;
    overflow: auto;
    color: var(--pre-text);
    border-radius: 5px;
    position: relative;
}

code {
    background: var(--pre-bg);
    padding: 2px 4px;
    color: var(--pre-text);
}

/** Flash Messages **/
.flash {
    padding: 10px;
    margin: 10px 0;
    background-color: #444;
    border-radius: 5px;
}

/** Sidebar Button Section **/
.sidebar div {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

button {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: 1px solid var(--btn-hover-bg);
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 3px;
}

button:hover {
    background-color: var(--btn-hover-bg);
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --link-color: #0066cc;
    --link-hover-color: #ff6600;
    --sidebar-bg: #f8f9fa;
    --pre-bg: #f4f4f4;
    --pre-text: #333333;
    --btn-bg: #007bff;
    --btn-hover-bg: #0056b3;
    --btn-text: white;
}

[data-theme="dark"] {
    --bg-color: #1e1e1e;
    --text-color: #f0c674;
    --link-color: #d197d9;
    --link-hover-color: #ffd700;
    --sidebar-bg: #2c2c2c;
    --pre-bg: #3c3c3c;
    --pre-text: #e6db74;
    --btn-bg: #444;
    --btn-hover-bg: #666;
    --btn-text: white;
}

/* Nutze die Variablen */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

a {
    color: var(--link-color);
}

a:hover {
    color: var(--link-hover-color);
}

button {
    background-color: var(--btn-bg);
    color: var(--btn-text);
}

button:hover {
    background-color: var(--btn-hover-bg);
}



/* Stil für den rechten ToDo-Bereich */
.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.todo-list li {
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.todo-list li:last-child {
    border-bottom: none;
}

.todo-list button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.todo-list button:hover {
    background-color: #cc0000;
}

/* Modal Hintergrund */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Halbtransparenter Hintergrund */
    backdrop-filter: blur(6px); /* Weicher Glas-Effekt */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal-Inhalt */
.modal-content {
    background: rgba(30, 30, 30, 0.8); /* Dunkles, semi-transparentes Schwarz */
    backdrop-filter: blur(10px); /* Glas-Effekt */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtiler, heller Rand */
    border-radius: 16px;
    width: 450px;
    padding: 30px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    color: #f0f0f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    animation: fadeIn 0.4s ease-out, slideIn 0.4s ease-out;
}

/* Input-Felder (allgemein) */
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content textarea,
.modal-content input[type="date"],
.modal-content input[type="time"] {
    width: 100%;
    padding: 10px 15px;
    margin: 15px 0;
    background: rgba(50, 50, 50, 0.8); /* Dunkler Glas-Look */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtiler Rand */
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    outline: none;
    transition: border 0.3s ease, background 0.3s ease;
}

/* Input-Felder Fokus */
.modal-content input[type="text"]:focus,
.modal-content input[type="email"]:focus,
.modal-content input[type="password"]:focus,
.modal-content textarea:focus,
.modal-content input[type="date"]:focus,
.modal-content input[type="time"]:focus {
    background: rgba(70, 70, 70, 0.9); /* Etwas heller beim Fokus */
    border: 1px solid rgba(255, 255, 255, 0.4); /* Deutlicherer Rand */
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4); /* Weiches Leuchten */
}

/* Placeholder-Text */
input::placeholder {
    color: rgba(255, 255, 255, 0.5); /* Heller, transparenter Text */
}

/* Labels */
.modal-content label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #f0f0f0;
    text-align: left;
}

/* Schließen-Button */
.close-btn, .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    cursor: pointer;
    color: #f0f0f0;
    transition: transform 0.2s ease, color 0.2s ease;
    background: none;
    border: none;
    padding: 5px;
}

.close-btn:hover, .close-button:hover {
    transform: scale(1.2);
    color: #e57373; /* Dezentes Rot beim Hover */
}

/* Animierte Effekte beim Öffnen */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
    }
    to {
        transform: translateY(0);
    }
}
