:root {
    --bg: #121212;
    --surface: #1a1a1a;
    --surface-soft: #171717;
    --text: #d0d7d9;
    --text-soft: rgba(208, 215, 217, 0.72);
    --text-dim: rgba(208, 215, 217, 0.48);
    --good: #2ec7a2;
    --good-2: #22b892;
    --warn: #ff8a1f;
    --down: #ff6a3d;
    --empty: #4b4b4b;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    --container: 1320px;
    --status-points: 168;
    --status-gap: 1px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 30%),
        linear-gradient(180deg, #151515 0%, #121212 100%);
    color: var(--text);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.status-shell {
    min-height: 100vh;
}

.status-hero {
    padding: 28px 24px 88px;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.05), transparent 13%),
        radial-gradient(circle at 74% 12%, rgba(255, 255, 255, 0.04), transparent 14%),
        linear-gradient(180deg, #141414 0%, #121212 100%);
    text-align: center;
}

.status-topbar {
    width: min(100%, var(--container));
    margin: 0 auto 42px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.topbar-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.09);
}

.status-hero h1 {
    margin: 0 0 34px;
    font-size: clamp(42px, 6vw, 82px);
    font-weight: 700;
    letter-spacing: -0.05em;
    text-transform: none;
}

.status-banner {
    width: min(100%, 660px);
    margin: 0 auto;
    margin-top: 52px;
    padding: 22px 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025)),
        #1a1a1a;
    color: var(--text);
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.status-banner.is-warning .status-banner-icon {
    background: rgba(255, 106, 61, 0.14);
}

.status-banner.is-warning .status-banner-icon svg {
    fill: var(--down);
}

.status-banner.is-degraded .status-banner-icon {
    background: rgba(255, 138, 31, 0.14);
}

.status-banner.is-degraded .status-banner-icon svg {
    fill: var(--warn);
}

.status-banner.is-neutral .status-banner-icon {
    background: rgba(120, 120, 120, 0.16);
}

.status-banner.is-neutral .status-banner-icon svg {
    fill: #adadad;
}

.status-banner-copy {
    display: grid;
    gap: 4px;
    text-align: left;
}

.status-banner-copy small {
    color: var(--text-dim);
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
}

.status-banner strong {
    text-align: left;
    font-size: clamp(22px, 2.4vw, 28px);
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
}

.status-banner span {
    color: var(--text-dim);
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    white-space: nowrap;
}

.status-banner-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(46, 199, 162, 0.12);
}

.status-banner-icon svg,
.status-item-check svg {
    width: 28px;
    height: 28px;
    fill: var(--good);
}

.status-main {
    width: min(100%, var(--container));
    margin: 0 auto;
    padding: 56px 24px 72px;
}

.status-list-section h2 {
    margin: 0 0 30px;
    font-size: clamp(28px, 3vw, 44px);
    letter-spacing: -0.04em;
}

.status-list {
    display: grid;
    gap: 22px;
}

.status-item {
    padding: 22px 22px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015));
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.status-item.is-down .status-item-check svg {
    fill: var(--down);
}

.status-item.is-warning .status-item-check svg {
    fill: var(--warn);
}

.status-item.is-unknown .status-item-check svg {
    fill: #8d8d8d;
}

.status-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.status-item-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-size: 21px;
    line-height: 1.35;
}

.status-item-title span:last-child {
    overflow-wrap: anywhere;
}

.status-item-check {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.status-item-head strong {
    color: var(--text-soft);
    font-size: 20px;
    font-weight: 400;
    white-space: nowrap;
}

.status-detail {
    margin: 0 0 14px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: var(--status-gap);
    width: 100%;
    margin-bottom: 14px;
    overflow: visible;
}

.status-segment {
    position: relative;
    flex: 0 0 calc((100% - ((var(--status-points) - 1) * var(--status-gap))) / var(--status-points));
    width: calc((100% - ((var(--status-points) - 1) * var(--status-gap))) / var(--status-points));
    min-width: 0;
    height: 24px;
    background: linear-gradient(180deg, var(--good), var(--good-2));
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease;
}

.status-segment.is-marker:not(.is-empty) {
    background: linear-gradient(180deg, #ff9f43, var(--warn));
}

.status-segment.is-down {
    background: linear-gradient(180deg, #ff8c5a, var(--down));
}

.status-segment.is-empty {
    background: linear-gradient(180deg, #5c5c5c, var(--empty));
}

.status-segment::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%) translateY(6px);
    width: 10px;
    height: 10px;
    background: rgba(23, 23, 23, 0.98);
    opacity: 0;
    pointer-events: none;
    rotate: 45deg;
    transition: opacity 0.16s ease, transform 0.16s ease;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
    z-index: 4;
}

.status-segment::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(6px);
    padding: 10px 12px;
    min-width: max-content;
    background: rgba(23, 23, 23, 0.98);
    color: #f1f5f6;
    font-size: 12px;
    line-height: 1;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 5;
    white-space: nowrap;
}

.status-segment:hover,
.status-segment.is-preview-tooltip {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.status-segment:hover::before,
.status-segment:hover::after,
.status-segment.is-preview-tooltip::before,
.status-segment.is-preview-tooltip::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.status-timeline {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    color: var(--text-dim);
    font-size: 14px;
}

.status-timeline-center {
    display: grid;
    grid-template-columns: minmax(30px, 1fr) auto minmax(30px, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.status-timeline-center i {
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, 0.22);
}

.status-timeline-center strong {
    color: var(--text-soft);
    font-weight: 400;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .status-banner {
        grid-template-columns: 1fr;
        justify-items: start;
        text-align: left;
    }

    .status-banner strong,
    .status-banner span {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .status-hero {
        padding: 18px 16px 74px;
    }

    .status-main {
        padding: 42px 16px 56px;
    }

    .status-topbar {
        margin-bottom: 30px;
        flex-wrap: wrap;
    }

    .status-banner {
        margin-top: 34px;
        padding: 18px 18px 20px;
        gap: 12px;
    }

    .status-banner strong {
        font-size: 18px;
    }

    .status-item {
        padding: 18px 16px 16px;
    }

    .status-item-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .status-item-title {
        font-size: 17px;
    }

    .status-segment {
        height: 18px;
    }

    .status-timeline {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .status-timeline > span:last-child {
        text-align: right;
    }

    .status-timeline-center {
        order: 3;
        grid-template-columns: 1fr auto 1fr;
    }
}
