:root {
    --bg: #09121f;
    --bg-soft: #10233a;
    --ink: #f3f7ff;
    --muted: #a9bdd8;
    --line: rgba(183, 207, 239, 0.24);
    --card: rgba(12, 24, 42, 0.72);
    --up: #2cd98f;
    --warn: #f8b84a;
    --down: #ff5f6d;
    --pending: #77a7ff;
    --paused: #9aa4b5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background:
        radial-gradient(60rem 60rem at 6% 12%, rgba(58, 155, 255, 0.22), transparent 58%),
        radial-gradient(40rem 40rem at 92% 22%, rgba(44, 217, 143, 0.17), transparent 62%),
        linear-gradient(180deg, #07101b 0%, var(--bg) 40%, #070f18 100%);
    min-height: 100vh;
}

.page {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}

.top-menu {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 0.35rem;
    transition: color 0.25s ease;
}

.nav-icon-link svg {
    width: 24px;
    height: 24px;
    display: block;
}

.nav-icon-link:hover {
    color: #ff69b4;
}

.nav-icon-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: -2.15rem;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background-color: #ff69b4;
    color: #0d0d0d;
    font-weight: 700;
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
    border-radius: 0.25rem;
    padding: 0.2rem 0.6rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-icon-link:hover .nav-icon-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    color: #ffffff;
    text-decoration: none;
    font-family: "Nunito", "Segoe UI", sans-serif;
    font-weight: 400;
    font-size: 1.18rem;
    line-height: 1;
}

@media (min-width: 640px) {
    .brand-link {
        font-size: 1.5rem;
    }
}

.brand-link img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(118, 149, 255, 0.45));
}

.brand-link .brand-pink {
    color: #ff69b4;
}

.brand-link:hover {
    opacity: 0.92;
}

.header {
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.1rem;
    background: linear-gradient(135deg, rgba(17, 31, 55, 0.78), rgba(8, 20, 36, 0.86));
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.title {
    margin: 0;
    font-size: clamp(1.3rem, 4vw, 2.2rem);
    letter-spacing: 0.01em;
}

.subtitle {
    margin: 0.5rem 0 0;
    color: var(--muted);
}

.meta {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.36rem 0.72rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.btn {
    border: 1px solid rgba(84, 157, 255, 0.5);
    color: #ffffff;
    background: linear-gradient(120deg, #1f5fba, #2f77db);
    border-radius: 0.72rem;
    padding: 0.56rem 0.95rem;
    font: inherit;
    cursor: pointer;
}

.btn:hover {
    filter: brightness(1.08);
}

.grid {
    margin-top: 1rem;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 1fr;
}

.card {
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--card);
    padding: 0.86rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(136, 189, 255, 0.45);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 0.85rem;
    align-items: stretch;
}

.card-main {
    min-width: 0;
}

.card-media {
    display: flex;
    align-items: stretch;
}

.name {
    margin: 0;
    font-size: 1.03rem;
    line-height: 1.2;
}

.url {
    margin-top: 0.3rem;
    font-size: 0.83rem;
    color: var(--muted);
    word-break: break-word;
}

a.url-link {
    display: block;
    text-decoration: none;
    transition: color 0.18s;
}

a.url-link:hover,
a.url-link:focus-visible {
    color: var(--accent, #60a5fa);
    text-decoration: underline;
}

.badge {
    border-radius: 999px;
    padding: 0.26rem 0.58rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge.up {
    color: #062416;
    background: var(--up);
}

.badge.warning {
    color: #261600;
    background: var(--warn);
}

.badge.down {
    color: #34020a;
    background: var(--down);
}

.badge.pending {
    color: #001437;
    background: var(--pending);
}

.badge.paused,
.badge.unknown {
    color: #111827;
    background: var(--paused);
}

.screenshot-wrap {
    border: 1px solid rgba(196, 217, 246, 0.18);
    border-radius: 0.65rem;
    overflow: hidden;
    background: rgba(8, 18, 33, 0.55);
    width: 100%;
}

.screenshot-link {
    display: block;
    cursor: pointer;
    position: relative;
}

.screenshot-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(96, 165, 250, 0.12);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.screenshot-link:hover::after,
.screenshot-link:focus-visible::after {
    opacity: 1;
}

.screenshot {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.metrics {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.44rem;
}

.availability-block {
    margin-top: 0.6rem;
}

.availability-strip {
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.32rem;
    min-height: 12px;
}

.day-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-block;
}

.day-dot.up {
    background: var(--up);
}

.day-dot.warning {
    background: var(--warn);
}

.day-dot.down {
    background: var(--down);
}

.availability-empty {
    font-size: 0.85rem;
    color: var(--muted);
}

.metric {
    border: 1px solid rgba(196, 217, 246, 0.18);
    border-radius: 0.65rem;
    padding: 0.44rem;
    background: rgba(8, 18, 33, 0.55);
}

.metric-label {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.metric-value {
    margin: 0.15rem 0 0;
    font-size: 0.96rem;
    font-weight: 600;
}

.empty,
.error-box {
    margin-top: 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--line);
    padding: 0.85rem;
    background: rgba(13, 28, 48, 0.78);
    color: var(--muted);
}

.error-box {
    border-color: rgba(255, 95, 109, 0.45);
    color: #ffdbe0;
}

@media (max-width: 640px) {
    .page {
        padding: 0.9rem 0.65rem 1.3rem;
    }

    .top-menu {
        top: 62px;
        right: 14px;
    }

    .brand-link {
        font-size: 1.02rem;
    }

    .metrics {
        grid-template-columns: 1fr;
    }

    .card-layout {
        grid-template-columns: 1fr;
    }

    .card-media {
        order: 2;
    }
}
