:root {
  --bg: #0c0c0c;
  --text: #ededed;
  --muted: #8a8a8a;
  --line: #1f1f1f;
  --red: #ff4d4d;
  --green: #3fb950;
  --yellow: #d29922;
  --blue: #58a6ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "JetBrains Mono", Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

@property --mx { syntax: "<length>"; inherits: true; initial-value: -999px; }
@property --my { syntax: "<length>"; inherits: true; initial-value: -999px; }

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.5px);
  background-size: 22px 22px;
}
body::before {
  --dot: rgba(255, 255, 255, .07);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent);
}
body::after {
  --dot: rgba(255, 255, 255, .35);
  -webkit-mask-image: radial-gradient(160px circle at var(--mx, -999px) var(--my, -999px), #000, transparent);
  mask-image: radial-gradient(160px circle at var(--mx, -999px) var(--my, -999px), #000, transparent);
}

@media (pointer: coarse) {
  body::before { --dot: rgba(255, 255, 255, .1); }
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 64px 16px;
}

/* header */

header { margin-bottom: 32px; }

#logo {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: transform .2s;
}
#logo:hover { transform: scale(1.04); }
#logo.spin { animation: spin .6s cubic-bezier(.3, 0, .2, 1); }

#logo img {
  display: block;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--red);
}
.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

/* links */

.tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
}

.tabs button {
  padding: 0 0 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color .15s;
}
.tabs button:hover,
.tabs button.active { color: var(--text); }

.tabs .indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--text);
}
.tabs .indicator.ready { transition: left .25s ease, width .25s ease; }

@media (max-width: 380px) {
  .tabs { gap: 12px; }
}

.panels { display: grid; grid-template-columns: minmax(0, 1fr); }
.panel {
  grid-area: 1 / 1;
  align-self: start;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.panel:not(.active) {
  opacity: 0;
  transform: translateY(4px);
  visibility: hidden;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

li { border-bottom: 1px solid var(--line); }

li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  color: var(--muted);
  transition: color .15s;
}
li a.is-live { color: var(--text); }

li a > * { transition: transform .2s; }
li a:hover > :not(.arrow) { transform: translateX(3px); }

li svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.arrow {
  margin-left: auto;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .15s, transform .15s;
}
li a:hover .arrow,
li a:focus-visible .arrow {
  opacity: 1;
  transform: none;
}

.count {
  font-size: 13px;
  color: var(--muted);
}

/* about */

#about { border-top: 1px solid var(--line); }

#about p {
  margin: 0;
  padding: 14px 0;
  font-size: 13px;
  line-height: 1.7;
}

#status-list { border-top: 1px solid var(--line); }

.service { flex: none; }

.dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.bars {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  height: 14px;
  overflow: hidden;
}
.bars i {
  flex: none;
  width: 3px;
  border-radius: 1px;
  background: currentColor;
}

.uptime {
  min-width: 7ch;
  font-size: 13px;
  text-align: right;
}

.operational { color: var(--green); }
.degraded, .partial_outage { color: var(--yellow); }
.major_outage { color: var(--red); }
.maintenance { color: var(--blue); }
.nodata, .unknown { color: var(--line); }

.status-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.flag {
  display: inline-block;
  vertical-align: -1px;
  border-radius: 2px;
}

/* footer */

footer {
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
footer p { margin: 0 0 6px; }
.heart { color: var(--red); }

footer details {
  max-width: 400px;
  margin: 0 auto;
  font-size: 11px;
}
footer summary {
  display: inline;
  cursor: pointer;
  list-style: none;
  transition: color .15s;
}
footer summary::-webkit-details-marker { display: none; }
footer summary:hover { color: var(--text); }
footer summary::after { content: " +"; }
footer details[open] summary::after { content: " −"; }
footer details p { margin-top: 6px; }

/* easter egg */

#secret {
  position: fixed;
  bottom: 24px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141414;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
#secret.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* animations */

header, .tabs, .panels { animation: fade-in .5s both; }
.tabs, .panels { animation-delay: .06s; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  50% { opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
