:root,
[data-theme="light"] {
    --max: 1180px;
    --bg: #f3f3f3;
    --frame: #d5d5d5;
    --text: #171717;
    --muted: rgba(0, 0, 0, .65);
    --accent: #2f7dff;
    --border: rgba(0, 0, 0, .12);
    --shadow: 0 18px 50px rgba(0, 0, 0, .12);
    --page-top: #f8f8f8;
    --page-bottom: #ececec;
    --topbar-bg: rgba(255, 255, 255, .75);
    --panel-bg: rgba(255, 255, 255, .88);
    --panel-text: rgba(0, 0, 0, .78);
    --table-head-bg: rgba(0, 0, 0, .04);
    --table-head-text: #171717;
    --table-cell-text: rgba(0, 0, 0, .76);
    --code-bg: #f0f0f0;
    --code-border: rgba(0, 0, 0, .08);

    --card-bg: #ffffff;
    --card-2-bg: #f7f7f7;
    --card-border: rgba(0, 0, 0, .08);
    --help-text: #5f5f5f;
    --slider-track: #d8d8d8;
    --colorbox-border: #d6d6d6;
    --colorbox-bg1: #f5f5f5;
    --colorbox-bg2: #dddddd;
    --colorbox-bg3: #cfcfcf;
    --preview-sub-text: #666;
    --code-text: #0b5cad;

    --link: #1e63d6;
    --link-hover: #0f172a;
    --link-visited: #6d4fd1;

    --makerworld-icon: url("https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/maker-world.svg");
    --github-icon: url("https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/github.svg");
}

[data-theme="dark"] {
    --bg: #141414;
    --frame: #2b2b2b;
    --text: #f2f2f2;
    --muted: rgba(255, 255, 255, .65);
    --accent: #2f7dff;
    --border: rgba(255, 255, 255, .10);
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --page-top: #101010;
    --page-bottom: #121212;
    --topbar-bg: rgba(15, 15, 15, .75);
    --panel-bg: rgba(17, 17, 17, .92);
    --panel-text: rgba(255, 255, 255, .78);
    --table-head-bg: rgba(255, 255, 255, .04);
    --table-head-text: #fff;
    --table-cell-text: rgba(255, 255, 255, .76);
    --code-bg: #101010;
    --code-border: rgba(255, 255, 255, .08);

    --card-bg: #222;
    --card-2-bg: #1a1a1a;
    --card-border: #333;
    --help-text: #bbb;
    --slider-track: #333;
    --colorbox-border: #2f2f2f;
    --colorbox-bg1: #1a1a1a;
    --colorbox-bg2: #0d0d0d;
    --colorbox-bg3: #000000;
    --preview-sub-text: #999;
    --code-text: #d7f0ff;

    --link: #6ea8ff;
    --link-hover: #ffffff;
    --link-visited: #b08cff;    

    --makerworld-icon: url("https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/maker-world-dark.svg");
    --github-icon: url("https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/github-light.svg");
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(47, 125, 255, .12), transparent 30%),
        linear-gradient(180deg, var(--page-top) 0%, var(--page-bottom) 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Topbar / Navigation */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
}

.navwrap {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand img {
    width: 100px;
    height: 42px;
    object-fit: contain;
    filter: none;
}

[data-theme="dark"] .brand img {
    filter: brightness(0) invert(1);
}

.brand strong {
    font-size: 1rem;
    letter-spacing: .02em;
    white-space: nowrap;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.nav a {
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    font-size: .95rem;
    transition: 140ms ease;
}

.nav a:hover,
.nav a.active {
    color: var(--text);
    background: rgba(47, 125, 255, .12);
    border-color: rgba(47, 125, 255, .24);
}

/* Layout / Hauptbereich */

main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 24px 18px;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
}

section {
    margin: 0;
    scroll-margin-top: 88px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: 180ms ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: rgba(47, 125, 255, 0.12);
    border-color: rgba(47, 125, 255, 0.24);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.section-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .015));
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero {
    padding: 18px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    justify-items: center;
    width: 100%;
}

/* Uhr / Clock */

.clock-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.clock {
    width: min(80vw, 700px);
    aspect-ratio: 1 / 1;
    background: var(--bg);
    border: 2px solid var(--frame);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border-radius: 18px;

    display: grid;
    place-items: center;

    padding: 0;
}

.logo {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 128px;
    height: auto;
    z-index: 3;
    filter: brightness(0) invert(1);
    opacity: .95;
    pointer-events: none;
    user-select: none;
}

.grid {
    width: 88%;
    height: 88%;
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    grid-template-rows: repeat(10, 1fr);
    user-select: none;
    position: relative;
    z-index: 1;
    align-content: center;
    justify-content: center;
}

.cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: clamp(12px, 2.6vw, 42px);
    line-height: 1;
    color: var(--text);
    opacity: .92;
    transition: color 120ms linear, opacity 120ms linear, text-shadow 120ms linear;
}

.cell.on {
    color: var(--accent);
    opacity: 1;
    text-shadow: 0 0 8px rgba(47, 125, 255, .35), 0 0 2px rgba(47, 125, 255, .55);
}

.footer {
    position: absolute;
    right: 16px;
    bottom: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, .35);
    z-index: 3;
}

/* Sonstige Inhalte (Info-Boxen etc.) */

.info-box,
.tile {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
}

.info-box h2,
.info-box h3,
.tile h3 {
    margin-top: 0;
}

.info-box p,
.info-box li,
.tile p {
    color: var(--panel-text);
    line-height: 1.6;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.download-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
}

.codeblock {
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    color: var(--panel-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 16px;
}

.app-download-card {
    display: grid;
    gap: 12px;
}

.app-preview {
    width: 10%;
    max-width: 220px;
    margin: 0 auto;
    border-radius: 14px;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.store-links {
    display: grid;
    gap: 10px;
}

.store-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    background: var(--card-bg, rgba(255, 255, 255, 0.7));
    color: inherit;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12));
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.store-button:hover {
    transform: translateY(-1px);
}

.store-button img {
    width: 20px;
    height: 20px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--table-head-text);
    background: var(--table-head-bg);
}

td {
    color: var(--table-cell-text);
}

.step-image {
    display: block;
    width: 100%;
    max-width: 350px;
    margin: 12px auto 0;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.download-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 999px;
    box-sizing: border-box;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: 140ms ease;
}

.download-btn:hover,
.download-btn:focus-visible {
    color: var(--text);
    background: rgba(47, 125, 255, .12);
    border-color: rgba(47, 125, 255, .24);
    outline: none;
}

.download-btn:active {
    transform: translateY(1px);
}

.download-btn span:last-child {
    flex: 1;
}

.makerworld-mark {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-block;
    background-image: var(--makerworld-icon);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.github-mark {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-block;
    background-image: var(--github-icon);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card {
    background: var(--card-bg);
    padding: 20px;
    margin: 20px auto;
    border-radius: 15px;
    max-width: 900px;
    border: 1px solid var(--card-border);
}

.row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
}

.slider-wrap {
    width: min(700px, 80%);
    margin: 0 auto;
    text-align: left;
}

.labelrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 18px;
}

.help {
    color: var(--help-text);
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.6;
    text-align: left;
    max-width: 760px;
    margin-inline: auto;
}

.slider-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-icon {
    width: 28px;
    text-align: center;
    font-size: 20px;
    color: #ffd54a;
    flex: 0 0 28px;
}

.fake-slider {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--slider-track);
    position: relative;
    overflow: hidden;
}

.fake-slider::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--fill, 55%);
    border-radius: 999px;
}

.yellow::after {
    background: #ffd54a;
}

.red::after {
    background: #ff4d4d;
}

.green::after {
    background: #4cd964;
}

.blue::after {
    background: #4da3ff;
}

.colorbox {
    width: 260px;
    height: 140px;
    margin: 28px auto 6px auto;
    border-radius: 18px;
    border: 1px solid var(--colorbox-border);
    background: radial-gradient(circle at top, var(--colorbox-bg1) 0, var(--colorbox-bg2) 45%, var(--colorbox-bg3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -8px 18px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.12);
}

.preview-text {
    color: rgb(255, 180, 100);
    font-size: 60px;
    font-weight: 700;
    letter-spacing: 6px;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(255, 180, 100, 0.35), 0 0 14px rgba(255, 180, 100, 0.18);
}

.preview-sub {
    margin-top: 10px;
    font-size: 13px;
    color: var(--preview-sub-text);
    text-align: center;
}

.code {
    background: transparent;
    color: var(--code-text);
    border: none;
    border-radius: 0;
    padding: 0;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: none;
}

.grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    max-width: 760px;
    margin: 16px auto 0 auto;
    text-align: left;
}

.mini {
    background: var(--card-2-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px;
}

.parts-list {
    margin: 14px 0 0;
    padding-left: 1.2rem;
}

.parts-list li {
    color: var(--panel-text);
    margin: 0 0 10px;
    line-height: 1.6;
}

.text-link,
.text-link:link,
.text-link:visited {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
    transition: color 140ms ease, text-decoration-thickness 140ms ease;
}

.text-link:hover,
.text-link:focus-visible {
    color: var(--link-hover);
    text-decoration-thickness: 0.14em;
}

.external-link::after {
    content: " ↗";
    font-size: 0.95em;
    opacity: 0.8;
}

.zoomable-image {
    cursor: zoom-in;
}

.image-lightbox {
    border: none;
    padding: 0;
    background: transparent;
    max-width: none;
    max-height: none;
}

.image-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
}

.image-lightbox[open] {
    display: grid;
    place-items: center;
}

.lightbox-image {
    max-width: min(92vw, 1400px);
    max-height: 88vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.75);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    background: rgba(47, 125, 255, 0.22);
}




/* Mobile-Optimierung */

@media (max-width: 720px) {
    .navwrap {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .brand-group {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .theme-toggle {
        justify-self: auto;
    }

    .nav {
        justify-content: flex-start;
    }

    main {
        padding: 12px 8px;
        min-height: auto;
        display: block;
    }

    .hero {
        padding: 12px 0;
        margin: 0;
    }

    .hero-inner {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .clock {
        width: 78vw;
        margin: 0 auto;
    }

    .grid {
        width: 86%;
        height: 86%;
    }

    .cell {
        font-size: clamp(11px, 3vw, 20px);
    }

    .tile-grid {
        grid-template-columns: 1fr;
    }
}

/* Sprachumschalter unter der Uhr */
.language-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.language-switcher label {
  font: inherit;
}

.language-switcher select {
  font: inherit;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  padding: 0.35rem 0.65rem;
}