/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Header */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Main content */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.no-data {
    color: #7f8c8d;
    font-style: italic;
    padding: 1rem;
}

/* Status table */
.status-table {
    width: 100%;
    border-collapse: collapse;
}

.status-table thead {
    background-color: #ecf0f1;
}

.status-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #bdc3c7;
}

.status-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #ecf0f1;
}

/* Server row */
.server-row {
    background-color: #f8f9fa;
}

.server-row:hover {
    background-color: #f0f0f0;
}

.server-name {
    font-size: 1.05rem;
}

/* Service row */
.service-row {
    transition: background-color 0.2s;
}

.service-row:hover {
    background-color: #f8f9fa;
}

.service-name {
    padding-left: 2rem;
    color: #555;
}

/* Status dots */
.status-dot {
    font-size: 1.2rem;
    display: inline-block;
}

.status-up {
    color: #22c55e;
}

.status-down {
    color: #ef4444;
}

.status-unknown {
    color: #95a5a6;
}

/* Domain link */
.domain-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.domain-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.no-domain {
    color: #95a5a6;
}

/* Response time */
.response-time {
    color: #27ae60;
    font-weight: 500;
}

/* Uptime */
.uptime {
    font-weight: 500;
}

/* Last checked */
.last-checked {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Error message */
.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
}

.no-error {
    color: #95a5a6;
}

/* Check button */
.check-btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.check-btn:hover {
    background-color: #2980b9;
}

.check-btn:active {
    background-color: #21618c;
}

/* Incidents section */
.incidents-list {
    list-style: none;
}

.incident-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #95a5a6;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

.incident-item:hover {
    background-color: #ecf0f1;
}

.incident-down {
    border-left-color: #ef4444;
}

.incident-recovered {
    border-left-color: #22c55e;
}

.incident-service {
    font-weight: 600;
    color: #2c3e50;
}

.incident-text {
    margin: 0 0.5rem;
}

.incident-time {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .status-table {
        font-size: 0.85rem;
    }

    .status-table th,
    .status-table td {
        padding: 0.5rem 0.3rem;
    }

    .service-name {
        padding-left: 1rem;
    }

    section {
        padding: 1rem;
    }

    /* Hide less critical columns on mobile */
    .status-table th:nth-child(3),
    .status-table td:nth-child(3),
    .status-table th:nth-child(4),
    .status-table td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    header {
        padding: 1.5rem 0.5rem;
    }

    main {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    /* Further simplify table on very small screens */
    .status-table th:nth-child(5),
    .status-table td:nth-child(5),
    .status-table th:nth-child(6),
    .status-table td:nth-child(6) {
        display: none;
    }
}
