*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #070b0f;
    --surface: #0c131c;
    --surface-2: #0e1826;
    --border: #17222f;
    --text: #c9d8e8;
    --muted: #56708c;
    --heading: #eef4fb;
    --accent: #4c9dff;
    --green: #22c55e;
    --green-glow: rgba(34, 197, 94, 0.15);
}

html { height: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem;
    overflow-x: hidden;
}

/* Atmospheric background — soft green glow rising from the bottom */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 50% 118%, rgba(34,197,94,0.10) 0%, transparent 65%),
        radial-gradient(ellipse 80% 50% at 15% 10%, rgba(76,157,255,0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle technical grid */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 190px 190px;
    opacity: 0.5;
    mask-image: radial-gradient(ellipse 90% 90% at 50% 45%, #000 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 45%, #000 30%, transparent 90%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 760px;
    animation: fadeIn 0.7s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.domain {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2.1rem, 8vw, 3.9rem);
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.03em;
    line-height: 1.05;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.domain span { color: var(--accent); }
.domain .tld { color: var(--muted); }

/* Blinking terminal cursor */
.cursor {
    display: inline-block;
    width: 0.5em;
    height: 1em;
    margin-left: 0.12em;
    background: #8fa6bf;
    transform: translateY(0.08em);
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

.tagline {
    margin-top: 0.75rem;
    font-size: clamp(0.8rem, 2.4vw, 0.95rem);
    color: var(--muted);
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.02em;
}

.tagline::before {
    content: '> ';
    color: var(--green);
}

/* Status badge */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
    padding: 0.35rem 0.9rem;
    background: var(--green-glow);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 99px;
    font-size: 0.75rem;
    font-family: 'Space Mono', monospace;
    color: var(--green);
    letter-spacing: 0.04em;
}

.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Nav grid */
.nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.nav-item {
    --c: var(--accent);
    --c-rgb: 76, 157, 255;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    background:
        linear-gradient(180deg, rgba(var(--c-rgb), 0.05), rgba(var(--c-rgb), 0.01)),
        var(--surface);
    border: 1px solid rgba(var(--c-rgb), 0.35);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 0 0 rgba(var(--c-rgb), 0);
    transition: border-color 0.2s, box-shadow 0.25s, transform 0.15s, background 0.2s;
}

.nav-item:hover {
    border-color: rgba(var(--c-rgb), 0.9);
    box-shadow: 0 0 22px rgba(var(--c-rgb), 0.28), inset 0 0 20px rgba(var(--c-rgb), 0.06);
    transform: translateY(-3px);
}

.nav-item:active { transform: translateY(-1px); }

/* Icon in a tinted rounded square */
.nav-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(var(--c-rgb), 0.12);
    border: 1px solid rgba(var(--c-rgb), 0.3);
    color: var(--c);
}

.nav-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.nav-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.nav-name {
    font-family: 'Space Mono', monospace;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-desc {
    font-size: 0.75rem;
    color: var(--muted);
    font-family: 'Space Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Per-tile status dot, top-right */
.nav-dot {
    position: absolute;
    top: 0.85rem;
    right: 0.9rem;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 7px var(--green);
}

/* Per-service accent colours */
.nav-item.c-nextcloud { --c: #4c9dff; --c-rgb: 76, 157, 255; }
.nav-item.c-immich    { --c: #b07cff; --c-rgb: 176, 124, 255; }
.nav-item.c-beszel    { --c: #22c55e; --c-rgb: 34, 197, 94; }
.nav-item.c-dokumenty { --c: #f0b429; --c-rgb: 240, 180, 41; }
.nav-item.c-zivotopis { --c: #2dd4d4; --c-rgb: 45, 212, 212; }
.nav-item.c-kgbau     { --c: #f0556b; --c-rgb: 240, 85, 107; }
.nav-item.c-diagnostika { --c: #2dd4d4; --c-rgb: 45, 212, 212; }

/* Stagger animation on items */
.nav-item:nth-child(1) { animation: fadeIn 0.6s 0.10s ease both; }
.nav-item:nth-child(2) { animation: fadeIn 0.6s 0.17s ease both; }
.nav-item:nth-child(3) { animation: fadeIn 0.6s 0.24s ease both; }
.nav-item:nth-child(4) { animation: fadeIn 0.6s 0.31s ease both; }
.nav-item:nth-child(5) { animation: fadeIn 0.6s 0.38s ease both; }
.nav-item:nth-child(6) { animation: fadeIn 0.6s 0.45s ease both; }

/* Footer */
.footer {
    margin-top: 2.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.03em;
}

/* Mobile: single column */
@media (max-width: 620px) {
    .nav { grid-template-columns: 1fr; }
    body { padding: 2.5rem 1rem; }
    .header { margin-bottom: 2.2rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; }
}
