/* CSS Variablen für Hell- und Dunkelmodus */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #ffffff;
}

/* Globaler Reset und Entfernung aller standardmäßigen Rahmen/Outlines */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

/* Das Flex-Layout sorgt dafür, dass die Seite exakt den Bildschirm füllt */
body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    block-size: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
    overflow: hidden; /* Verhindert Scrollbalken auf der Hauptseite */
}

/* HEADER: Feste Höhe von 22px und 3 Spalten (ohne Rahmen) */
header {
    block-size: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 0 20px;
    font-size: 12px;
}

.header-left {
    text-align: left;
    font-weight: bold;
}

.header-center {
    text-align: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Kompakter Switch für die 22px Headerhöhe */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    inline-size: 30px;
    block-size: 16px;
    position: relative;
    display: inline-block;
}

.theme-switch input {
    opacity: 0;
    inline-size: 0;
    block-size: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 16px;
}

.slider:before {
    position: absolute;
    content: "";
    block-size: 12px;
    inline-size: 12px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(14px);
}

/* MITTLERER BEREICH: 100% Breite & Höhe, keine Spalten */
.main-container {
    flex: 1;
    inline-size: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
}

/* Die 1024x1024 Grafik mittig positioniert (Rahmen explizit entfernt) */
.content-image {
    max-inline-size: 1024px;
    max-block-size: 1024px;
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: none !important; /* Erzwingt absolute Rahmenlosigkeit */
}

/* FOOTER: 3 Spalten mit fester Ausrichtung ganz unten (ohne Rahmen) */
footer {
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    font-size: 14px;
}

.footer-left {
    text-align: left;
}

.footer-center {
    text-align: center;
}

.footer-right {
    text-align: right;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}