/* N7X4 Router-Late C64/Terminal Style */

:root {
    --bg: #050505;
    --fg: #f4f4f4;
    --muted: #bdbdbd;
    --line: #f4f4f4;
    --dim: #7d7d7d;
    --danger: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--fg);
    font-family: "Courier New", Courier, monospace;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.045), transparent 65%),
        var(--bg);
    color: var(--fg);
    letter-spacing: 0.03em;
}

.scanlines {
    pointer-events: none;
    position: fixed;
    inset: 0;
    opacity: 0.12;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.18),
        rgba(255,255,255,0.18) 1px,
        transparent 1px,
        transparent 4px
    );
    z-index: 10;
}

.site-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 18px 16px;
    text-align: center;
}

.bootline,
.subtitle {
    color: var(--muted);
    font-size: 0.95rem;
}

h1 {
    margin: 14px 0 8px;
    font-size: clamp(1.7rem, 5vw, 3.4rem);
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #555;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.nav a,
.button {
    color: var(--fg);
    text-decoration: none;
    border: 2px solid var(--fg);
    padding: 8px 12px;
    display: inline-block;
    background: var(--bg);
    box-shadow: 4px 4px 0 var(--fg);
    text-transform: uppercase;
}

.nav a:hover,
.button:hover {
    background: var(--fg);
    color: var(--bg);
}

.wrap {
    width: min(1100px, calc(100% - 24px));
    margin: 0 auto 40px;
}

.terminal-card {
    border: 2px solid var(--line);
    padding: 18px;
    margin: 18px 0;
    background: rgba(0,0,0,0.78);
    box-shadow: 8px 8px 0 rgba(255,255,255,0.18);
}

.card-title {
    margin-bottom: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px dashed var(--line);
    padding-bottom: 10px;
}

.hero {
    border-width: 3px;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: bold;
    margin: 16px 0 22px;
}

.status-dot {
    width: 22px;
    height: 22px;
    display: inline-block;
    border: 2px solid var(--fg);
    border-radius: 50%;
}

.status-dot.on {
    background: var(--fg);
    box-shadow: 0 0 18px var(--fg);
}

.status-dot.off {
    background: var(--bg);
}

.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.kv {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dotted rgba(255,255,255,0.35);
}

.kv .k::after {
    content: " :";
}

.kv .k {
    color: var(--muted);
    text-transform: uppercase;
}

.kv .v {
    word-break: break-word;
}

.note {
    color: var(--muted);
    border-left: 3px solid var(--muted);
    padding-left: 12px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.jsonbox {
    white-space: pre-wrap;
    overflow: auto;
    max-height: 420px;
    padding: 14px;
    border: 1px dashed var(--line);
    color: var(--fg);
    background: #000;
}

.mapbox {
    border: 2px solid var(--fg);
    margin-top: 20px;
    height: 420px;
}

.mapbox iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(1) contrast(1.15);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.gallery figure {
    margin: 0;
    border: 2px solid var(--fg);
    padding: 10px;
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(1) contrast(1.2);
}

.gallery figcaption {
    margin-top: 10px;
    color: var(--muted);
}

.footer {
    width: min(1100px, calc(100% - 24px));
    margin: 20px auto 35px;
    padding: 18px;
    border-top: 2px dashed var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

code {
    background: #111;
    color: var(--fg);
    padding: 2px 5px;
    border: 1px solid var(--dim);
}

@media (max-width: 760px) {
    .grid.two {
        grid-template-columns: 1fr;
    }

    .kv {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .nav a,
    .button {
        box-shadow: none;
    }
}


.gallery a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.gallery img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.45);
}

.gallery figure:hover img {
    filter: grayscale(1) contrast(1.2) brightness(1.12);
}


/* Galerie / Lightbox */
.gallery a {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: zoom-in;
}

.gallery img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.45);
}

.gallery figure:hover img {
    filter: grayscale(1) contrast(1.2) brightness(1.12);
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 56px 18px 34px;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
}

.lightbox.open {
    display: flex;
}

.lightbox-image {
    max-width: min(96vw, 1500px);
    max-height: 86vh;
    object-fit: contain;
    border: 2px solid var(--fg);
    background: #000;
    box-shadow: 8px 8px 0 rgba(255,255,255,0.20);
    filter: none;
}

.lightbox-title {
    position: fixed;
    left: 18px;
    bottom: 14px;
    right: 70px;
    color: var(--fg);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
    opacity: 0.9;
}

.lightbox-close {
    position: fixed;
    top: 14px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 2px solid var(--fg);
    background: #000;
    color: var(--fg);
    font-size: 32px;
    line-height: 36px;
    cursor: pointer;
    font-family: "Courier New", Courier, monospace;
}

.lightbox-close:hover {
    background: var(--fg);
    color: var(--bg);
}


/* Galerie-Zoom: echtes Overlay über der Seite */
.gallery-zoom {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
    font: inherit;
    text-align: inherit;
}

.gallery-zoom img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(255,255,255,0.45);
}

.gallery-zoom:hover img {
    filter: grayscale(1) contrast(1.2) brightness(1.12);
}

html.modal-open,
body.modal-open {
    overflow: hidden;
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 64px 18px 42px;
    background: rgba(0, 0, 0, 0.94);
}

.image-modal.is-open {
    display: flex;
}

.image-modal-stage {
    max-width: 96vw;
    max-height: 88vh;
    text-align: center;
}

.image-modal-stage img {
    max-width: 96vw;
    max-height: 82vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border: 2px solid var(--fg);
    background: #000;
    box-shadow: 8px 8px 0 rgba(255,255,255,0.22);
    filter: none !important;
}

.image-modal-title {
    margin-top: 12px;
    color: var(--fg);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
}

.image-modal-close {
    position: fixed;
    top: 14px;
    right: 18px;
    z-index: 2147483001;
    width: 46px;
    height: 46px;
    border: 2px solid var(--fg);
    background: #000;
    color: var(--fg);
    font-family: "Courier New", Courier, monospace;
    font-size: 34px;
    line-height: 38px;
    cursor: pointer;
}

.image-modal-close:hover {
    background: var(--fg);
    color: var(--bg);
}
