/* =========================================
 *  1. VARIABLEN & FARBSCHEMATA
 *  ========================================= */
:root {
    --bg-color: #fcfcfc;
    --text-color: #222222;
    --text-muted: #595959;
    --accent-color: #0056b3;
    --border-color: #e0e0e0;
    --header-bg: #ffffff;
    --footer-bg: #f5f5f5;
    --max-width: 800px;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent-color: #66b3ff;
    --border-color: #333333;
    --header-bg: #1a1a1a;
    --footer-bg: #181818;
}

/* =========================================
 *  2. BASIS-STYLING
 *  ========================================= */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typografie */
h1, h2, h3 {
    font-family: "Georgia", "Times New Roman", serif;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
}

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

p { margin-bottom: 1.5rem; }
.lead { font-size: 1.2rem; color: var(--text-muted); }

a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================================
 *  3. LAYOUT-KOMPONENTEN
 *  ========================================= */

.site-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-color);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.logo span { color: var(--accent-color); }

.logo-img {
    height: 28px;
    width: auto;
    display: block;
}

.content {
    flex: 1;
    padding-top: 3rem;
    padding-bottom: 5rem;
}

.theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.theme-btn:hover { background-color: var(--footer-bg); text-decoration: none; }

/* Kompakte Buttons für Header-Controls */
.ctrl-btn {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 10px;
    min-width: 36px;
}

/* Gruppierung der Buttons (nebeneinander) */
.controls {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

/* Steuerung der Icons */
[data-theme="dark"] .icon-light { display: inline; }
[data-theme="dark"] .icon-dark { display: none; }
[data-theme="light"] .icon-light { display: none; }
[data-theme="light"] .icon-dark { display: inline; }

.site-footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a { color: var(--text-muted); font-size: 0.95rem; }

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* =========================================
 *  4. ERROR-PAGE SPEZIFISCHE OVERRIDES
 *  ========================================= */

.error-page-body {
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.error-display-code {
    font-size: 10rem !important;
    font-family: -apple-system, sans-serif !important;
    border-bottom: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
}

.error-display-title {
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin-top: 0.5rem !important;
    font-family: -apple-system, sans-serif !important;
}

.error-bottom-divider {
    width: 60%;
    max-width: 400px;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem auto;
}
