/* =========================================
   Globale Design-Variablen
   ========================================= */
:root {
    --bg-primary: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1e293b;       /* Etwas dunkler für besseren Kontrast */
    --text-heading: #0f172a;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    
    /* Code Variablen */
    --code-bg-inline: #f1f5f9;
    --code-text-inline: #be185d; /* Rötlicher Ton wie bei GitHub */
    --code-bg-block: #0f172a;    /* Edler, sehr dunkler Hintergrund für Blöcke */
    --code-text-block: #e2e8f0;  /* Helle Schrift für den Dark Mode */
    
    /* Schatten */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* =========================================
   Basis-Layout & Typografie
   ========================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.75;           /* Erhöht für einen extrem guten Lesefluss */
    font-size: 1.05rem;          /* Minimal größer für leichtere Lesbarkeit */
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    color: var(--text-heading);
    font-weight: 700;
    margin-top: 2.5rem;          /* Mehr Platz über Überschriften */
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

p, ul, ol {
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;       /* Mehr Platz zwischen Listenpunkten */
}

/* Optional: Beschränkt die Textbreite für perfektes Lesen (ca. 75-80 Zeichen pro Zeile) */
.content {
    max-width: 950px;
}


/* =========================================
   Premium Code-Fenster (Dark Mode)
   ========================================= */
pre {
    background-color: var(--code-bg-block);
    color: var(--code-text-block);
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    border: 1px solid #1e293b;
    font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2), var(--shadow-md);
    margin-bottom: 2rem;
    margin-top: 1rem;
}

/* Speziell gestaltete Scrollbar für die dunklen Code-Fenster */
pre::-webkit-scrollbar {
    height: 8px;
}
pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

code {
    background-color: var(--code-bg-inline);
    color: var(--code-text-inline);
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem;
    font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    font-weight: 500;
}

/* Entfernt das Inline-Styling, wenn der Code innerhalb eines <pre> Blocks steht */
pre code {
    padding: 0;
    background-color: transparent;
    color: inherit;
    font-weight: normal;
}


/* =========================================
   Seitenleiste (Sidebar)
   ========================================= */
nav.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    font-size: 0.95rem;
}

nav.sidebar .category-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 700;
}

nav.sidebar ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

nav.sidebar ul li {
    margin-bottom: 0.15rem;
}

nav.sidebar a {
    display: block;
    padding: 0.4rem 0.75rem;
    color: #475569;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

nav.sidebar a:hover {
    background-color: var(--code-bg-inline);
    color: var(--accent);
}

nav.sidebar a.active {
    background-color: #eff6ff;
    color: var(--accent);
    font-weight: 600;
}


/* =========================================
   Startseiten-Kacheln (Grid & Cards)
   ========================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.category-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 1.25rem;
}

.category-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}


/* =========================================
   UI-Komponenten (Boxen & Buttons)
   ========================================= */
.info-box {
    background-color: #eff6ff;
    border-left: 4px solid var(--accent);
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.info-box p {
    margin-bottom: 0;
    color: #1e40af;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0;
}

.btn-action {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-action:hover {
    background-color: var(--bg-primary);
    border-color: #cbd5e1;
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
