:root {
  --bg-color: #09090b;
  --card-bg: #09090b;
  --border-color: #27272a;
  
  --text-main: #fafafa;
  --text-muted: #a1a1aa;
  
  --color-operational: #10b981;
  --color-degraded: #eab308;
  --color-outage: #ef4444;
  --color-nodata: #27272a;
  
  --color-operational-bg: rgba(16, 185, 129, 0.1);
  --color-degraded-bg: rgba(234, 179, 8, 0.1);
  --color-outage-bg: rgba(239, 68, 68, 0.1);

  --font-family: 'Inter', -apple-system, sans-serif;
  --max-width: 896px;
}

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

html {
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 24px;
  height: 24px;
  background-color: var(--text-main);
  border-radius: 4px;
}

.header h1 {
  font-size: 1.125rem;
  font-weight: 500;
}

.subscribe-btn {
  background: var(--text-main);
  color: var(--bg-color);
  border: none;
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.subscribe-btn:hover {
  opacity: 0.9;
}

/* Status Banner */
.status-banner {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 3rem;
  background: var(--color-operational-bg);
  border-color: rgba(16, 185, 129, 0.2);
}

.status-banner.degraded {
  background: var(--color-degraded-bg);
  border-color: rgba(234, 179, 8, 0.2);
}

.status-banner.outage {
  background: var(--color-outage-bg);
  border-color: rgba(239, 68, 68, 0.2);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.banner-content h2 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-operational);
}

.status-banner.degraded h2 { color: var(--color-degraded); }
.status-banner.outage h2 { color: var(--color-outage); }

.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-operational);
}

.status-banner.degraded .status-icon { color: var(--color-degraded); }
.status-banner.outage .status-icon { color: var(--color-outage); }

/* Card wrapper for services list */
.services-wrapper {
  margin-bottom: 4rem;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg);
}

.service-item {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

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

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.service-name {
  font-weight: 500;
  font-size: 1rem;
}

.service-status-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.service-item.operational .service-status-text { color: var(--color-operational); }
.service-item.degraded .service-status-text { color: var(--color-degraded); }
.service-item.outage .service-status-text { color: var(--color-outage); }

/* Component Uptime Chart (OpenStatus style) */
.component-chart {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.blocks-row {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  width: 100%;
}

.bar {
  flex: 1;
  background: var(--color-operational);
  border-radius: 2px;
  min-width: 2px;
  height: 100%;
  cursor: crosshair;
  transition: opacity 0.2s;
}

.bar:hover {
  opacity: 0.7;
}

.bar.degraded { background: var(--color-degraded); }
.bar.outage { background: var(--color-outage); }
.bar.nodata { background: var(--color-nodata); }

.chart-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Incidents Section */
.events-wrapper h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.incident-card {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.incident-card:last-child {
  border-bottom: none;
}

.incident-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.incident-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.update-row {
  margin-bottom: 1.25rem;
}

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

.update-status {
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.update-time {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-weight: 400;
}

.update-message {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.no-incidents {
  color: var(--text-muted);
  font-size: 0.9375rem;
  padding: 2rem 0;
}

/* Tooltip */
.tooltip {
  position: absolute;
  background: var(--text-main);
  color: var(--bg-color);
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: var(--text-main) transparent transparent transparent;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  font-size: 0.875rem;
  color: var(--text-muted);
}
