@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #121217;
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 15px;
}

h1 {
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 2.3rem;
    color: #f0f0f0;
    text-align: center;
    user-select: none;
    text-shadow: 0 0 6px #4a4a68;
}

h2.category-title {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.6rem;
    color: #a0a4b0;
    border-bottom: 2px solid #55596a;
    padding-bottom: 6px;
    user-select: none;
    max-width: 720px;
    width: 100%;
}

.status-container {
    width: 100%;
    max-width: 720px;
    background: #1e1e2f;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.85);
    padding: 30px;
    margin-bottom: 25px;
}

.service {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #30304a;
    cursor: default;
    user-select: none;
    transition: background-color 0.3s ease;
}

.service:last-child {
    border-bottom: none;
}

.service:hover {
    background-color: #2a2a40;
}

.service-info {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    user-select: text;
}

.service-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: #e0e0e0;
}

.service-ping {
    font-family: monospace;
    color: #9ea3b0;
    font-size: 0.95rem;
    white-space: nowrap;
    border-left: 1.5px solid #55596a;
    padding-left: 6px;
    user-select: text;
}

.service-url {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #888c9b;
    user-select: text;
    word-break: break-all;
}

.service-url a {
    color: #888c9b;
    text-decoration: none;
    transition: color 0.25s ease;
}

.service-url a:hover {
    color: #a0a4b0;
    text-decoration: underline;
}

.status-section {
    min-width: 170px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    position: relative;
}

.status-label {
    position: relative;
    padding: 7px 26px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    text-align: center;
    letter-spacing: 0.03em;
    z-index: 2;
    user-select: none;
}

.status-label::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 130%;
    border-radius: 30px;
    filter: blur(15px);
    opacity: 0.2;
    z-index: -1;
}

.operational {
    background-color: #28a745;
}
.operational::before {
    background-color: #28a745;
}

.degraded {
    background-color: #ff9800;
}
.degraded::before {
    background-color: #ff9800;
}

.outage {
    background-color: #dc3545;
}
.outage::before {
    background-color: #dc3545;
}

.footer {
    font-size: 0.9rem;
    color: #bbb;
    user-select: none;
    text-align: center;
}

@media (max-width: 768px) {
    .service {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .status-section {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 15px;
        margin-top: 6px;
    }
    .status-label {
        min-width: auto;
        padding: 7px 15px;
        flex: none;
        font-size: 0.95rem;
    }
    .service-info {
        max-width: 100%;
        gap: 8px;
    }
    .service-name-row {
        gap: 8px;
    }
    .service-url {
        margin-top: 0;
    }
}

#loader {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin: 20px;
}

.dot {
    animation: blink 1.5s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.3s;
}
.dot:nth-child(3) {
    animation-delay: 0.6s;
}

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