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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #0d1117;
  color: #e6edf3;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

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

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e6edf3;
}

.header-meta {
  text-align: right;
  font-size: 0.875rem;
  color: #7d8590;
}

.overall-status {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  background: #161b22;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  border: 1px solid #30363d;
}

.overall-status .status-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #7d8590;
  flex-shrink: 0;
}

.overall-status.all-up .status-circle {
  background-color: #3fb950;
}

.overall-status.some-down .status-circle {
  background-color: #f85149;
}

.overall-status.some-paused .status-circle {
  background-color: #d29922;
}

.overall-status .status-text {
  font-size: 1.75rem;
  font-weight: 500;
}

.overall-status .status-text .highlight {
  color: #7d8590;
}

.overall-status.all-up .status-text .highlight {
  color: #3fb950;
}

.overall-status.some-down .status-text .highlight {
  color: #f85149;
}

.overall-status.some-paused .status-text .highlight {
  color: #d29922;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #e6edf3;
}

.monitors-list {
  background: #161b22;
  border-radius: 12px;
  border: 1px solid #30363d;
  overflow: hidden;
}

.loading, .error {
  text-align: center;
  padding: 3rem;
  color: #7d8590;
}

.error {
  color: #f85149;
}

.monitor-card {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #30363d;
}

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

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

.monitor-name-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.monitor-name {
  font-weight: 500;
  color: #e6edf3;
}

.monitor-link {
  color: #7d8590;
  text-decoration: none;
  font-size: 0.875rem;
}

.monitor-link:hover {
  color: #58a6ff;
}

.monitor-uptime {
  color: #3fb950;
  font-weight: 500;
  margin-left: 0.5rem;
}

.monitor-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #7d8590;
}

.status-dot.up {
  background-color: #3fb950;
}

.status-dot.down, .status-dot.seems_down {
  background-color: #f85149;
}

.status-dot.paused, .status-dot.not_checked {
  background-color: #d29922;
}

.status-label {
  color: #7d8590;
}

.status-label.up {
  color: #3fb950;
}

.status-label.down, .status-label.seems_down {
  color: #f85149;
}

.status-label.paused, .status-label.not_checked {
  color: #d29922;
}

.uptime-bar {
  display: flex;
  gap: 2px;
  height: 28px;
  align-items: stretch;
}

.uptime-day {
  flex: 1;
  min-width: 3px;
  border-radius: 2px;
  background-color: #3fb950;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.uptime-day:hover {
  transform: scaleY(1.15);
}

.uptime-day.degraded {
  background-color: #d29922;
}

.uptime-day.down {
  background-color: #f85149;
}

.uptime-day.no-data {
  background-color: #30363d;
}

.tooltip {
  position: fixed;
  background: #1f2937;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: #e6edf3;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
}

footer {
  text-align: center;
  margin-top: 2rem;
  color: #7d8590;
  font-size: 0.875rem;
}

footer a {
  color: #58a6ff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .header-meta {
    text-align: left;
  }

  .overall-status {
    padding: 1.5rem;
    gap: 1rem;
  }

  .overall-status .status-circle {
    width: 48px;
    height: 48px;
  }

  .overall-status .status-text {
    font-size: 1.25rem;
  }

  .monitor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .uptime-day {
    min-width: 2px;
  }
}
