:root {
    --bg: #05030d;
    --glass-bg: rgba(20, 10, 40, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-dim: rgba(255, 255, 255, 0.4);
    --purple-200: #c4b5fd;
    --purple-300: #a78bfa;
    --purple-400: #8b5cf6;
    --blue-400: #60a5fa;
    --success: #34d399;
    --danger: #f87171;
    --warn: #fbbf24;
    --font: "Inter", system-ui, sans-serif;
    --font-display: "Space Grotesk", var(--font);
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --max: 72rem;
    --header-h: 6.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

[hidden] {
    display: none !important;
}

a {
    color: var(--purple-200);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
}

/* —— Achtergrond (swurfyy.com) —— */
.starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.nebula {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.65;
    background-color: #0a0618;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139, 92, 246, 0.35), transparent 55%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(96, 165, 250, 0.15), transparent 50%),
        url("https://swurfyy.com/assets/nebula-DSixOSTp.jpg");
    background-size: cover;
    background-position: center top;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 30%, transparent 78%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 30%, transparent 78%);
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 3, 13, 0.85) 100%);
}

/* —— Header —— */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 1rem 1rem 0;
}

.header-bar {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    padding: 0.65rem 0.85rem 0.65rem 1rem;
    border-radius: 999px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand:hover {
    color: var(--text);
}

.brand-icon {
    color: var(--purple-300);
    flex-shrink: 0;
}

.brand-dot {
    color: var(--purple-300);
}

.nav-glass {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.nav-glass a {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}

.nav-glass a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-header {
    flex-shrink: 0;
    padding: 0.45rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    color: #fff;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.25);
    border: 1px solid rgba(167, 139, 250, 0.35);
    transition: background 0.2s, border-color 0.2s;
}

.btn-header:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(167, 139, 250, 0.4);
    color: #fff;
}

@media (min-width: 900px) {
    :root {
        --header-h: 6rem;
    }

    .header-bar {
        flex-wrap: nowrap;
        padding: 0.5rem 0.6rem 0.5rem 1.1rem;
    }

    .nav-glass {
        flex: 0 1 auto;
        width: auto;
        order: unset;
    }

    .nav-glass a {
        padding: 0.45rem 1rem;
        font-size: 0.875rem;
    }

    .btn-header {
        width: auto;
        order: unset;
    }

    .brand {
        width: auto;
        justify-content: flex-start;
    }
}

/* —— Layout —— */
.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--header-h) + 2.5rem) clamp(1rem, 4vw, 1.5rem) 4rem;
}

.section-label {
    margin: 0 0 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(196, 181, 253, 0.8);
}

.hero {
    margin-bottom: 2.5rem;
}

.hero-title {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.gradient-text {
    color: transparent;
    background: linear-gradient(135deg, #c4b5fd, #a78bfa 40%, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-lead {
    margin: 0;
    max-width: 32rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.glass-panel {
    background: rgba(20, 10, 40, 0.55);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

/* —— Stats —— */
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-bottom: 3rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat {
    padding: 1.25rem 1.5rem;
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    min-width: 0;
}

.stat:nth-child(2n) {
    border-right: none;
}

.stat:nth-last-child(-n + 2) {
    border-bottom: none;
}

@media (min-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stat {
        border-bottom: none;
        border-right: 1px solid var(--glass-border);
    }

    .stat:nth-child(2n) {
        border-right: 1px solid var(--glass-border);
    }

    .stat:last-child {
        border-right: none;
    }

    .stat--wide .stat-num--sm {
        font-size: 0.8rem;
        line-height: 1.35;
        word-break: break-word;
    }
}

.stat-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.35rem;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.stat-num--sm {
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
}

/* —— Secties —— */
.block {
    margin-bottom: 3rem;
}

.block-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.block-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.block-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* —— Knoppen —— */
.btn-ghost {
    padding: 0.5rem 1.1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(167, 139, 250, 0.4);
}

.btn-ghost:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* —— Site cards —— */
.card-grid {
    display: none;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

.card-grid.is-visible,
.card-grid:not([hidden]) {
    display: grid;
}

@media (min-width: 640px) {
    .card-grid.is-visible,
    .card-grid:not([hidden]) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .card-grid.is-visible,
    .card-grid:not([hidden]) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.site-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 0;
    padding: 1rem 1.1rem;
    border-radius: 1.25rem;
    background: rgba(20, 10, 40, 0.55);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transition: transform 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.site-card::before {
    content: "";
    position: absolute;
    top: -4rem;
    right: -4rem;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
    pointer-events: none;
}

.site-card:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, 0.35);
}

.site-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.site-card__name {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
}

.site-card__url {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--purple-200);
    word-break: break-all;
    margin: 0;
}

.site-card__status {
    margin-top: 0.35rem;
}

.site-card__meta {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* —— Panel cards —— */
.panel-card {
    width: 100%;
    border-radius: 1.5rem;
    background: rgba(20, 10, 40, 0.55);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: border-color 0.2s;
}

.panel-card:hover {
    border-color: rgba(167, 139, 250, 0.3);
}

.panel-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--glass-border);
}

.panel-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.panel-card__host {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* —— Badges & status —— */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid transparent;
}

.badge--ok {
    color: var(--success);
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.35);
}

.badge--warn {
    color: var(--warn);
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.35);
}

.badge--bad {
    color: var(--danger);
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.35);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
    flex-wrap: wrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-pill--online {
    color: var(--success);
}

.status-pill--online .status-dot {
    background: var(--success);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
}

.status-pill--offline {
    color: var(--danger);
}

.status-pill--offline .status-dot {
    background: var(--danger);
}

.status-pill--warn {
    color: var(--warn);
}

.status-pill--warn .status-dot {
    background: var(--warn);
}

.status-pill--muted {
    color: var(--text-muted);
}

.status-pill--muted .status-dot {
    background: var(--text-dim);
}

/* —— Tabel —— */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    background: rgba(139, 92, 246, 0.12);
}

.data-table th {
    padding: 0.55rem 1.15rem;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(196, 181, 253, 0.85);
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 0.55rem 1.15rem;
    line-height: 1.35;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .col-num {
    width: 2.5rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.empty-msg {
    padding: 1.25rem 1.35rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.empty-msg.glass-panel {
    margin-top: 0;
}

/* —— Loading —— */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-muted);
}

.loading.is-active {
    display: flex;
}

.loading--compact {
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.loading--compact p {
    display: none;
}

.notice-banner {
    margin-bottom: 1rem;
    padding: 0.9rem 1.15rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 1rem;
}

.notice-banner code {
    font-family: var(--font-mono);
    font-size: 0.8em;
    color: var(--purple-200);
}

.notice-banner strong {
    color: var(--warn);
}

.stack.is-visible,
.stack:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeUp 0.35s ease both;
}

.card-grid.is-visible {
    animation: fadeUp 0.35s ease both;
}

.stack {
    display: none;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .stack,
    .card-grid {
        animation: none;
    }

    .loading-ring {
        animation: none;
    }
}

.loading-ring {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--purple-300);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.alert {
    margin: 1rem 0 0;
    padding: 1rem 1.25rem;
    color: #fecaca;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 1rem;
    font-size: 0.9rem;
}

/* —— Log —— */
.log {
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.5;
}

.log-empty {
    margin: 0;
    padding: 1rem 1.25rem;
    color: var(--text-dim);
}

.log-line {
    display: grid;
    grid-template-columns: 4.2rem 3.5rem 1fr;
    gap: 0.75rem;
    padding: 0.4rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    align-items: baseline;
}

.log-line:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--text-dim);
}

.log-level {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}

.log-level--info {
    color: var(--purple-300);
}

.log-level--warn {
    color: var(--warn);
}

.log-level--error {
    color: var(--danger);
}

.log-msg {
    color: rgba(255, 255, 255, 0.85);
    word-break: break-word;
}

/* —— Footer —— */
.site-footer {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.site-footer p {
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-dim);
}

.footer-links a:hover {
    color: var(--purple-200);
}

@media (max-width: 899px) {
    :root {
        --header-h: 9.5rem;
    }

    .header-bar {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand cta"
            "nav nav";
        gap: 0.65rem;
        border-radius: 1.15rem;
        padding: 0.75rem;
    }

    .brand {
        grid-area: brand;
        justify-self: start;
    }

    .btn-header {
        grid-area: cta;
        justify-self: end;
    }

    .nav-glass {
        grid-area: nav;
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 599px) {
    .log-line {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .header-bar {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "nav"
            "cta";
    }

    .brand,
    .btn-header {
        justify-self: stretch;
    }

    .btn-header {
        text-align: center;
    }

    .data-table th,
    .data-table td {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .status-pill {
        font-size: 0.78rem;
    }
}

/* Embed */
body.embed-body .starfield,
body.embed-body .nebula,
body.embed-body .vignette,
body.embed-body .site-header,
body.embed-body .site-footer,
body.embed-body .hero,
body.embed-body .stats-row,
body.embed-body .block-log,
body.embed-body #websitesBlock {
    display: none !important;
}

body.embed-body .page {
    padding-top: 1rem;
    max-width: 100%;
}
