/* Standardmäßig starten wir im DARK MODE */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
}

/* Erst beim Umschalten wechseln wir in den LIGHT MODE */
[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #000000;
}

/* Globaler Reset und absolute Entfernung aller Rahmen, Linien und Outlines */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* 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 */
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: #fb5e02;
    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%;
    transform: translateX(14px);
}

input:checked + .slider {
    background-color: #ccc;
}

input:checked + .slider:before {
    transform: translateX(0px);
}

/* MITTLERER BEREICH: Nimmt 100% des restlichen Raums ein */
.main-container {
    flex: 1;
    inline-size: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden; /* Verhindert das Herausschneiden */
}

/* Die Grafik: Skaliert jetzt IMMER passend zum sichtbaren Fensterbereich */
.content-image {
    max-inline-size: 100%;  /* Darf nie breiter als der Bildschirm sein */
    max-block-size: 100%;   /* Darf nie höher als der verfügbare Platz zwischen Header/Footer sein */
    inline-size: auto;
    block-size: auto;
    object-fit: contain;    /* Behält die Proportionen bei, ohne zu verzerren oder abzuschneiden */
}

/* FOOTER: 3 Spalten mit fester Ausrichtung ganz unten */
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;
}


-------
/* Grundlayout calculator*/
    .calculator-container { display: flex; gap: 40px; color: white; font-family: sans-serif; }
    .calc-column { flex: 1; display: flex; flex-direction: column; gap: 20px; }
    .calc-row { display: flex; align-items: center; justify-content: space-between; }
    .calc-row label { width: 180px; font-size: 14px; }
    .calc-row input[type=range] { flex: 1; margin: 0 15px; -webkit-appearance: none; background: transparent; }
    
    /* Regler Design */
    input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 18px; width: 18px; border-radius: 50%; background: #ffffff; cursor: pointer; }
    input[type=range]::-webkit-slider-runnable-track { height: 4px; background: #fb5e02; border-radius: 2px; }
    
    /* Input Box */
    .val-box { width: 60px; padding: 10px; background: #1a1a1a; border-radius: 8px; text-align: center; border: none; color: white; }
</style>