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

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    background: linear-gradient(160deg, #070b12 0%, #0c1822 48%, #062433 100%);
    color: #e8eef5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.page {
    width: 100%;
    max-width: 760px;
    margin: auto;
    animation: fadeIn 0.7s ease-out;
}

.card {
    background: #10161f;
    border: 1px solid rgba(0, 180, 255, 0.22);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 180, 255, 0.12);
    padding: 40px 36px;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 180, 255, 0.12);
    color: #00b4ff;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.2;
    color: #f4f8fb;
}

.lead {
    margin: 0 auto 24px;
    max-width: 560px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #b7c3d1;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.btn-primary {
    background: #00b4ff;
    color: #041018;
    box-shadow: 0 8px 20px rgba(0, 180, 255, 0.28);
}

.btn-primary:hover {
    background: #33c3ff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #1a2330;
    color: #e8eef5;
    border: 1px solid rgba(0, 180, 255, 0.28);
}

.btn-secondary:hover {
    background: #243044;
    transform: translateY(-1px);
}

.services-panel {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    text-align: left;
}

.info-panel {
    margin: 0 0 24px;
    border: 1px solid rgba(0, 180, 255, 0.22);
    border-radius: 14px;
    background: #0d141c;
    text-align: left;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.info-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(0, 180, 255, 0.16);
    background: #10161f;
}

.info-panel__header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #00b4ff;
}

.info-panel__meta {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #6b7280;
}

.info-panel__close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.info-panel__close:hover {
    background: #e5e7eb;
}

.info-panel__summary {
    display: flex;
    gap: 8px;
    padding: 12px 18px 0;
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.summary-pill--live {
    background: #dcfce7;
    color: #166534;
}

.summary-pill--offline {
    background: #fee2e2;
    color: #991b1b;
}

.info-panel__body {
    max-height: 360px;
    overflow-y: auto;
    padding: 14px 18px 18px;
}

.health-card {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.health-card.is-live {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.health-card.is-offline {
    border-color: #fecaca;
    background: #fef2f2;
}

.health-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.health-card__code {
    padding: 12px 14px;
    border-radius: 8px;
    background: #111827;
    color: #e5e7eb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.health-card__hint {
    margin: 10px 0 0;
    font-size: 0.88rem;
    color: #b7c3d1;
}

.services-panel h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #00b4ff;
}

.services-meta {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: #6b7280;
}

.services-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.status-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.status-item.is-live {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.status-item.is-offline {
    border-color: #fecaca;
    background: #fef2f2;
}

.status-loading {
    padding: 12px 14px;
    color: #6b7280;
    font-size: 0.95rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.is-live .status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.is-offline .status-dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.status-body {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-detail {
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.45;
    word-break: break-word;
}

.status-body strong {
    color: #111827;
    font-size: 0.98rem;
}

.status-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.is-live .status-label {
    color: #15803d;
}

.is-offline .status-label {
    color: #b91c1c;
}

.status-body small {
    color: #6b7280;
    font-size: 0.82rem;
    word-break: break-word;
}

.footer {
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 180, 255, 0.16);
    font-size: 0.95rem;
    color: #6b7280;
}

.footer a {
    color: #00b4ff;
    font-weight: 600;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.powered-by {
    margin: 14px 0 0;
    font-size: 0.82rem;
    color: #9ca3af;
    letter-spacing: 0.02em;
}

.powered-by strong {
    color: #6b7280;
    font-weight: 600;
}

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

@media (max-width: 480px) {
    .card {
        padding: 28px 22px;
    }

    .btn {
        width: 100%;
    }
}
