/* === Aurora TDM Variables === */
:root {
    --bg: #060608;
    --surface: #161820;
    --surface-alt: #202430;
    --accent: #5A96FF;
    --accent-hover: #6EAAFF;
    --text-primary: #EBEBF0;
    --text-dim: #8C9BAF;
    --divider: #282C38;
    --card: #121218;
    --danger: #E14B4B;
    --success: #50C878;
    --font: 'Roboto', sans-serif;
}

body { margin: 0; font-family: var(--font); display: flex; height: 100vh; background: var(--bg); color: var(--text-primary); overflow: hidden; }

/* === Sidebar === */
.sidebar { width: 280px; background: var(--surface); border-right: 1px solid var(--divider); display: flex; flex-direction: column; overflow-y: auto;}
.logo { padding: 20px; display: flex; align-items: center; background: var(--surface-alt); border-bottom: 1px solid var(--divider); }
.logo h2 { margin: 0 0 0 10px; font-size: 1.2rem; color: var(--text-primary); }
nav { padding: 20px 0; }
.nav-section { padding: 10px 20px; font-size: 0.75rem; text-transform: uppercase; color: var(--text-dim); font-weight: bold; letter-spacing: 1px; }
nav ul { list-style: none; padding: 0; margin: 0 0 15px 0; }
nav ul li a { display: block; padding: 10px 20px; color: var(--text-primary); text-decoration: none; font-size: 0.95rem; border-left: 3px solid transparent; transition: all 0.2s; }
nav ul li a:hover { background: rgba(90, 150, 255, 0.1); color: var(--accent); border-left-color: var(--accent); }

/* === Main Content === */
.main-content { flex: 1; display: flex; flex-direction: column; background: var(--bg); position: relative; }
header { padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; background: var(--surface); border-bottom: 1px solid var(--divider); }

/* Buttons adaptiert an TDM */
.btn { padding: 10px 20px; background: var(--surface-alt); color: var(--text-primary); text-decoration: none; border-radius: 6px; font-size: 0.9rem; border: 1px solid var(--divider); cursor: pointer; transition: all 0.2s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); color: #fff; border: none; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(90, 150, 255, 0.3); }

/* Search Bar */
.search-container { position: relative; width: 350px; }
.search-bar { width: 100%; padding: 10px 15px; border-radius: 8px; border: 1px solid var(--divider); background: var(--card); color: var(--text-primary); outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.search-bar:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(90, 150, 255, 0.2); }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--divider); border-radius: 8px; margin-top: 5px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); display: none; z-index: 1000; overflow: hidden; }
.search-result-item { display: block; padding: 10px 15px; color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--divider); }
.search-result-item:hover { background: rgba(90, 150, 255, 0.1); color: var(--accent); }
.search-result-item:last-child { border-bottom: none; }

/* Content Area */
main { padding: 40px; overflow-y: auto; flex: 1; }
h1 { color: var(--text-primary); border-bottom: 1px solid var(--divider); padding-bottom: 10px; margin-top: 0; }
.content { color: var(--text-dim); line-height: 1.6; }
.content a { color: var(--accent); }

/* === Toasts === */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border-left: 4px solid var(--accent); color: var(--text-primary); padding: 15px 20px; border-radius: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); transform: translateX(120%); transition: transform 0.3s ease; display: flex; align-items: center; gap: 10px; }
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

/* === Neues Wiki 3-Spalten Layout === */
.wiki-wrapper {
    display: flex;
    flex: 1;
    overflow-y: auto;
}

.wiki-content-area {
    flex: 1;
    padding: 40px;
    max-width: 900px; /* Begrenzt die Textbreite für bessere Lesbarkeit */
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}
.breadcrumbs a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumbs a:hover {
    color: var(--accent);
}
.breadcrumbs .sep {
    margin: 0 8px;
    opacity: 0.5;
}

/* Rechte Sidebar (Page Contents) */
.wiki-right-sidebar {
    width: 260px;
    padding: 40px 20px;
    border-left: 1px solid var(--divider);
    background: var(--bg);
    flex-shrink: 0;
}

.sidebar-block {
    margin-bottom: 40px;
}

.sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Inhaltsverzeichnis (TOC) */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc-list li {
    margin-bottom: 8px;
}
.toc-list a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    line-height: 1.4;
    transition: color 0.2s;
}
.toc-list a:hover {
    color: var(--accent);
}
.toc-list .toc-h3 {
    padding-left: 15px; /* H3 leicht einrücken */
    font-size: 0.85rem;
}

/* Meta Block (Last Edited) */
.meta-info {
    background: var(--surface);
    border: 1px solid var(--divider);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.meta-date {
    color: var(--text-dim);
    font-size: 0.8rem;
    display: block;
    margin-top: 4px;
}