* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 16px;
    opacity: 0.9;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 20px;
}

/* Status Section */
.status-section {
    margin-bottom: 40px;
}

.status-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.component-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Overall Status Banner */
.status-banner {
    padding: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-banner .status-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.status-banner .status-text {
    flex: 1;
}

.status-title {
    font-size: 24px;
    margin-bottom: 5px;
}

.status-description {
    font-size: 14px;
    opacity: 0.8;
}

.status-operational {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-left: 5px solid #4CAF50;
    color: #2E7D32;
}

.status-degraded {
    background: linear-gradient(135deg, #FFF3CD 0%, #FFE082 100%);
    border-left: 5px solid #FFC107;
    color: #997404;
}

.status-outage {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border-left: 5px solid #F44336;
    color: #C62828;
}

.status-checking {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-left: 5px solid #2196F3;
    color: #1565C0;
}

/* Component Cards */
.components-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.component-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.component-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.component-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.component-header {
    background: white;
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.component-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.component-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.critical-badge {
    padding: 4px 8px;
    background: #F44336;
    color: white;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator {
    font-size: 24px;
}

.status-indicator.status-operational {
    color: #4CAF50;
}

.status-indicator.status-degraded {
    color: #FFC107;
}

.status-indicator.status-outage {
    color: #F44336;
}

/* Region Rows */
.component-regions {
    padding: 12px;
}

.region-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: white;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.region-row:last-child {
    margin-bottom: 0;
}

.region-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateX(2px);
}

.region-row.status-operational {
    border-left-color: #4CAF50;
    background: #F1F8F4;
}

.region-row.status-degraded {
    border-left-color: #FFC107;
    background: #FFFBF0;
}

.region-row.status-outage {
    border-left-color: #F44336;
    background: #FFF5F5;
}

.region-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.region-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.region-badge {
    padding: 4px 8px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.region-status {
    display: flex;
    gap: 12px;
    align-items: center;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-badge-operational {
    background: #4CAF50;
    color: white;
}

.status-badge-degraded {
    background: #FFC107;
    color: #333;
}

.status-badge-outage {
    background: #F44336;
    color: white;
}

.latency {
    font-size: 13px;
    color: #666;
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.error-text {
    font-size: 12px;
    color: #F44336;
    font-weight: 600;
    font-style: italic;
}

.info-text {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    text-transform: capitalize;
}

/* Uptime Section */
.uptime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.uptime-card {
    padding: 24px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    text-align: center;
    transition: all 0.3s ease;
}

.uptime-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.uptime-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.uptime-value {
    font-size: 32px;
    font-weight: 700;
    color: #4CAF50;
    font-family: 'Courier New', monospace;
}

/* Incidents List */
.incidents-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.no-incidents {
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 12px;
    color: #2E7D32;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.success-icon {
    font-size: 48px;
}

.incident-item {
    padding: 20px;
    border-left: 4px solid #F44336;
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.incident-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.incident-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #C62828;
}

.incident-time {
    font-size: 12px;
    color: #999;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-card {
    padding: 24px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    font-family: 'Courier New', monospace;
}

/* Error Banner */
.error-banner {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border-top: 3px solid #F44336;
    padding: 20px;
    text-align: center;
    color: #C62828;
    font-weight: 600;
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.error-icon {
    font-size: 24px;
}

/* Footer */
footer {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 30px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.footer-secondary {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 15px;
    }

    header h1 {
        font-size: 28px;
    }

    main {
        padding: 20px 15px;
    }

    .status-section h2 {
        font-size: 20px;
    }

    .status-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .status-banner .status-icon {
        font-size: 36px;
    }

    .status-title {
        font-size: 20px;
    }

    .status-banner .status-text {
        width: 100%;
    }

    .components-container {
        grid-template-columns: 1fr;
    }

    .component-card {
        margin-bottom: 16px;
    }

    .region-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .region-status {
        width: 100%;
        justify-content: space-between;
    }

    .details-grid,
    .uptime-grid {
        grid-template-columns: 1fr;
    }

    .detail-value,
    .uptime-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 24px;
    }

    .tagline {
        font-size: 14px;
    }

    .status-section h2 {
        font-size: 18px;
    }

    .component-name {
        font-size: 16px;
    }

    .region-name {
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    header {
        background: #667eea;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .status-banner,
    .component-card,
    .detail-card,
    .uptime-card {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .error-banner {
        display: none !important;
    }
}
