:root {
    --primary-color: #1057fc;
    --secondary-color: #210f47;
    --green: #28a745;
    --orange: #ffc107;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #343a40;
    --border-color: #dee2e6;
}

body, html {
    min-height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    display: flex;
    align-items: safe center;
    justify-content: safe center;
    text-align: center;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 1rem;
    box-sizing: border-box;
}

.logo {
    margin-bottom: 2rem;
    padding: 10px 20px;
    display: inline-block;
}

.nav-buttons {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.btn {
    text-decoration: none;
    color: var(--primary-color);
    background-color: transparent;
    border: 2px solid var(--primary-color);
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.btn:hover {
    color: white;
    background-color: var(--primary-color);
}

.btn-subscribe {
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-subscribe:hover {
    color: white;
    background-color: var(--secondary-color);
}

.status-modal {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.main-status {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.main-status .status-bar {
    width: 100%;
    height: 15px;
    border-radius: 10px;
    background-color: var(--green);
    background-image: none;
}

.main-status .status-bar.notched {
    background-image: linear-gradient(
        to right,
        var(--notch-color-0, var(--green)) 0%,
        var(--notch-color-0, var(--green)) var(--notch-width, 25%)
    );
    background-size: var(--background-size, 100% 100%);
    background-repeat: no-repeat;
}

.main-status p {
    margin: 0 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.endpoint-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.endpoint-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
    gap: 5px;
}

.endpoint-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.endpoint-info {
    display: flex;
    align-items: center;
    width: 100%;
}

.endpoint-item .status-bar {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 12px;
}

.endpoint-name {
    font-weight: 500;
}

.endpoint-description {
    color: var(--gray);
    font-size: 0.9rem;
    text-align: left;
    margin-left: 22px;
}

.status-bar.active {
    background-color: var(--green);
}

.status-bar.degraded {
    background-color: var(--orange);
}

.description-modal {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.description-date {
    font-size: 1rem;
    color: var(--gray);
}

.description-title {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 1rem;
}

@media (max-width: 1024px) {
    .container {
        max-width: 576px;
    }
}
@media (max-width: 576px) {
    .container {
        width: 100%;
        max-width: 500px;
    }

    .nav-buttons {
        gap: 12px;
    }

    .btn {
        padding: 10px 16px;
        white-space: normal;
    }

    .endpoint-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .endpoint-description {
        margin-left: 0;
        text-align: right;
    }
}

.planned-outages-modal,
.past-events-modal {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 3rem;
    text-align: left;
    border-left: 4px solid var(--primary-color);
}

.past-events-modal {
    border-left-color: var(--gray);
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--dark-gray);
}

.section-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
    margin: 0 0 1.5rem 0;
}

.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-entry {
    padding: 1rem 0;
}

.event-entry:first-child {
    padding-top: 0;
}

.event-entry:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.event-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0 0 0.4rem 0;
    color: var(--dark-gray);
}

.event-meta {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0 0 0.4rem 0;
}

.event-affects {
    font-size: 0.95rem;
    margin: 0 0 0.6rem 0;
}

.event-affects-label {
    color: var(--gray);
    margin-right: 0.25rem;
}

.event-description {
    margin: 0;
    line-height: 1.5;
}

/* Contact fallback panel (shown when Report Issue probe fails) */
.contact-fallback {
    margin: -1rem auto 2rem auto;
    padding: 1rem 1.5rem;
    background-color: #fff8e1;
    border-left: 4px solid var(--orange);
    border-radius: 6px;
    text-align: left;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.contact-fallback-heading {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--dark-gray);
}

.contact-fallback-list {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.8;
}

.contact-fallback-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-fallback-list a:hover {
    text-decoration: underline;
}

/* 404 page */
.notfound-body {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1rem;
}

.notfound-logo {
    max-width: 150px;
    height: auto;
}

.notfound-heading {
    margin: 0;
    font-size: 2rem;
    text-decoration: underline;
}

.notfound-subheading {
    margin: 0;
    font-weight: 400;
    font-size: 1.25rem;
}

.notfound-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.notfound-btn {
    text-decoration: none;
    color: white;
    background-color: var(--secondary-color);
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: background-color 0.2s ease-in-out;
}

.notfound-btn:hover {
    background-color: #160a2e;
}

.site-footer {
    margin-top: 2rem;
    color: var(--gray);
    font-size: 0.5rem;
    text-align: center;
}
