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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #18181b;
    color: #e4e4e7;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fafafa;
    margin-bottom: 10px;
    letter-spacing: -0.025em;
}

.subtitle {
    color: #a1a1aa;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Status Banner */
.status-banner {
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-indicator {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.status-banner.operational .status-indicator {
    background-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.status-banner.degraded .status-indicator {
    background-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.status-banner.partial-outage .status-indicator {
    background-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.status-banner.major-outage .status-indicator {
    background-color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.status-text h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fafafa;
}

#last-updated {
    color: #a1a1aa;
    font-size: 0.9rem;
}

/* Sections */
section {
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
}

section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fafafa;
}

/* Incidents */
.incident-card {
    border-left: 4px solid #ef4444;
    padding: 20px;
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
}

.incident-card.resolved {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.incident-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fafafa;
}

.incident-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.incident-status.investigating {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.incident-status.identified {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.incident-status.monitoring {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.incident-status.resolved {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.incident-update {
    padding: 15px 0;
    border-top: 1px solid #3f3f46;
}

.incident-update:first-child {
    border-top: none;
}

.incident-update-time {
    color: #71717a;
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-family: 'Roboto Mono', monospace;
}

.incident-update-message {
    color: #d4d4d8;
}

/* Components */
.component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #3f3f46;
}

.component-item:last-child {
    border-bottom: none;
}

.component-name {
    font-weight: 500;
    font-size: 1rem;
    color: #e4e4e7;
}

.component-description {
    color: #71717a;
    font-size: 0.85rem;
    margin-top: 4px;
}

.component-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.component-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.component-status.operational .component-status-dot {
    background-color: #10b981;
}

.component-status.operational {
    color: #34d399;
}

.component-status.degraded .component-status-dot {
    background-color: #f59e0b;
}

.component-status.degraded {
    color: #fbbf24;
}

.component-status.partial-outage .component-status-dot {
    background-color: #ef4444;
}

.component-status.partial-outage {
    color: #f87171;
}

.component-status.major-outage .component-status-dot {
    background-color: #dc2626;
}

.component-status.major-outage {
    color: #ef4444;
}

/* Uptime Controls */
.uptime-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Time Range Selector */
.time-range-selector {
    display: flex;
    gap: 4px;
    background: #18181b;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #3f3f46;
}

.time-range-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #a1a1aa;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.time-range-btn:hover {
    color: #e4e4e7;
    background: #3f3f46;
}

.time-range-btn.active {
    background: #6366f1;
    color: #fff;
}

/* Threshold Control */
.threshold-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 280px;
}

.threshold-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.threshold-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #a1a1aa;
}

.threshold-values {
    display: flex;
    gap: 6px;
}

.threshold-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    font-family: 'Roboto Mono', monospace;
}

.threshold-badge.error-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.threshold-badge.warning-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #71717a;
    width: 50px;
    flex-shrink: 0;
}

.threshold-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #27272a;
}

.critical-slider {
    background: linear-gradient(to right, #ef4444 0%, #3f3f46 100%);
}

.critical-slider::-webkit-slider-thumb {
    background: #ef4444;
}

.critical-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #27272a;
    cursor: pointer;
}

.warning-slider {
    background: linear-gradient(to right, #f59e0b 0%, #3f3f46 100%);
}

.warning-slider::-webkit-slider-thumb {
    background: #f59e0b;
}

.warning-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f59e0b;
    border: 2px solid #27272a;
    cursor: pointer;
}

/* Uptime Charts */
.uptime-item {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.uptime-item.clickable {
    cursor: pointer;
}

.uptime-item.clickable:hover {
    background-color: rgba(99, 102, 241, 0.05);
    border-color: #4f46e5;
}

.uptime-item:last-child {
    margin-bottom: 0;
}

.uptime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.uptime-name {
    font-weight: 500;
    font-size: 1rem;
    color: #e4e4e7;
}

.uptime-percentage {
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Roboto Mono', monospace;
}

.uptime-percentage.good {
    color: #34d399;
}

.uptime-percentage.degraded {
    color: #fbbf24;
}

.uptime-percentage.bad {
    color: #f87171;
}

.uptime-chart {
    display: flex;
    gap: 2px;
    height: 36px;
    align-items: flex-end;
}

.uptime-bar {
    flex: 1;
    border-radius: 2px;
    min-width: 3px;
    transition: opacity 0.15s ease;
    cursor: pointer;
    position: relative;
    background-color: #10b981;
}

.uptime-bar.partial {
    background-color: #f59e0b;
}

.uptime-bar.down {
    background-color: #ef4444;
}

.uptime-bar:hover {
    opacity: 0.75;
}

.uptime-bar-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #09090b;
    color: #e4e4e7;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 10;
    text-align: left;
    line-height: 1.5;
    border: 1px solid #3f3f46;
    font-family: 'Roboto Mono', monospace;
}

.uptime-bar:hover .uptime-bar-tooltip {
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0 20px;
    color: #71717a;
    font-size: 0.85rem;
}

footer p {
    margin: 5px 0;
}

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

    header h1 {
        font-size: 1.8rem;
    }

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

    .status-text h2 {
        font-size: 1.3rem;
    }

    .component-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .uptime-controls {
        flex-direction: column;
    }

    .threshold-control {
        min-width: unset;
        width: 100%;
    }

    .uptime-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .time-range-selector {
        flex-wrap: wrap;
    }

    .time-range-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #71717a;
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}
