:root {
  --background: #08060d;
  --surface: rgba(20, 15, 29, 0.92);
  --surface-strong: #181120;
  --surface-soft: #21172d;
  --border: rgba(194, 147, 255, 0.16);
  --border-strong: rgba(194, 147, 255, 0.28);
  --text: #f8f4ff;
  --muted: #aca1b9;
  --muted-strong: #cbc1d7;
  --purple: #a865f7;
  --purple-bright: #c78cff;
  --green: #35d07f;
  --green-soft: rgba(53, 208, 127, 0.14);
  --yellow: #f5b942;
  --yellow-soft: rgba(245, 185, 66, 0.14);
  --red: #f05b72;
  --red-soft: rgba(240, 91, 114, 0.14);
  --unknown: #332a3d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(114, 39, 186, 0.2), transparent 38rem),
    linear-gradient(180deg, #0b0711 0%, var(--background) 38%, #07050b 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.11;
  pointer-events: none;
}

.ambient-one {
  top: 18rem;
  left: -20rem;
  background: #8d38eb;
}

.ambient-two {
  right: -23rem;
  bottom: 6rem;
  background: #4c24a1;
}

.site-header,
main,
footer {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  transform: rotate(45deg);
  border: 1px solid rgba(199, 140, 255, 0.65);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(168, 101, 247, 0.32), rgba(54, 24, 78, 0.4));
  box-shadow: 0 0 28px rgba(168, 101, 247, 0.22);
}

.brand-mark span {
  transform: rotate(-45deg);
  color: var(--purple-bright);
  font-size: 19px;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 18px;
  letter-spacing: 0.01em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

nav .open-app {
  padding: 10px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(168, 101, 247, 0.1);
  color: var(--text);
}

main {
  padding: 68px 0 42px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 34px;
  padding: 31px 34px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background:
    linear-gradient(110deg, rgba(168, 101, 247, 0.13), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  top: -10rem;
  right: -7rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(123, 56, 189, 0.13);
  content: "";
  filter: blur(15px);
  pointer-events: none;
}

.overall-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(53, 208, 127, 0.3);
  border-radius: 50%;
  background: var(--green-soft);
  box-shadow: 0 0 28px rgba(53, 208, 127, 0.12);
}

.overall-icon span {
  width: 16px;
  height: 9px;
  transform: translateY(-2px) rotate(-45deg);
  border-bottom: 3px solid var(--green);
  border-left: 3px solid var(--green);
}

.overall-icon.degraded {
  border-color: rgba(245, 185, 66, 0.35);
  background: var(--yellow-soft);
}

.overall-icon.degraded span,
.overall-icon.outage span,
.overall-icon.unknown span {
  width: 4px;
  height: 20px;
  transform: none;
  border: 0;
  border-radius: 3px;
}

.overall-icon.degraded span {
  background: var(--yellow);
}

.overall-icon.outage {
  border-color: rgba(240, 91, 114, 0.35);
  background: var(--red-soft);
}

.overall-icon.outage span {
  background: var(--red);
}

.overall-icon.unknown {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.overall-icon.unknown span {
  background: var(--muted);
}

.hero-copy,
.hero-meta {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--purple-bright);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-size: clamp(25px, 4vw, 36px);
  letter-spacing: -0.035em;
}

.hero-copy > p:last-child {
  margin: 0;
  color: var(--muted-strong);
}

.hero-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  font-weight: 700;
}

.live-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(53, 208, 127, 0.09);
}

.status-panel,
.incident-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px;
  border-bottom: 1px solid var(--border);
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-ok {
  background: var(--green);
}

.legend-degraded {
  background: var(--yellow);
}

.legend-outage {
  background: var(--red);
}

.legend-unknown {
  background: var(--unknown);
}

.component {
  padding: 25px 28px 23px;
  border-bottom: 1px solid var(--border);
}

.component:last-child {
  border-bottom: 0;
}

.component-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 17px;
}

.component-name {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 16px;
  font-weight: 740;
}

.component-description {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.component-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 13px;
  font-weight: 760;
}

.component-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 12px currentColor;
}

.component-status.degraded {
  color: var(--yellow);
}

.component-status.outage {
  color: var(--red);
}

.component-status.unknown {
  color: var(--muted);
}

.history-bars {
  display: grid;
  grid-template-columns: repeat(90, minmax(2px, 1fr));
  gap: 3px;
  height: 35px;
}

.history-bar {
  min-width: 2px;
  border-radius: 2px;
  background: var(--unknown);
  transition: transform 120ms ease, filter 120ms ease;
}

.history-bar:hover {
  z-index: 2;
  transform: scaleY(1.16);
  filter: brightness(1.2);
}

.history-bar.operational {
  background: var(--green);
}

.history-bar.degraded {
  background: var(--yellow);
}

.history-bar.outage {
  background: var(--red);
}

.history-meta {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.history-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.13);
}

.uptime-value {
  color: var(--muted-strong);
  white-space: nowrap;
}

.component-stats {
  display: flex;
  gap: 16px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 11px;
}

.component-stats strong {
  color: var(--muted-strong);
}

.loading-card {
  height: 142px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.035) 40%, transparent 60%);
  background-size: 220% 100%;
  animation: loading 1.6s infinite linear;
}

@keyframes loading {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.incident-panel {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 30px;
  align-items: center;
  margin-top: 26px;
  padding: 27px 28px;
}

.incident-empty,
.incident-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid rgba(53, 208, 127, 0.15);
  border-radius: 12px;
  background: rgba(53, 208, 127, 0.055);
}

.incident-item {
  border-color: rgba(240, 91, 114, 0.2);
  background: rgba(240, 91, 114, 0.07);
}

.incident-check {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.incident-empty strong,
.incident-item strong {
  font-size: 13px;
}

.incident-empty p,
.incident-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 12px;
}

footer > div:first-child {
  display: grid;
  gap: 3px;
}

footer strong {
  color: var(--muted-strong);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1080px);
  }

  .site-header {
    min-height: 78px;
  }

  nav > a:first-child {
    display: none;
  }

  main {
    padding-top: 38px;
  }

  .hero {
    grid-template-columns: auto 1fr;
    padding: 24px 22px;
  }

  .hero-meta {
    grid-column: 1 / -1;
    justify-items: start;
    padding-top: 4px;
  }

  .panel-heading,
  .component-top,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading {
    display: flex;
    padding: 22px;
  }

  .legend {
    justify-content: flex-start;
  }

  .component {
    padding: 23px 20px 21px;
  }

  .component-top {
    display: flex;
    gap: 10px;
  }

  .history-bars {
    grid-template-columns: repeat(45, minmax(3px, 1fr));
  }

  .history-bar:nth-child(-n + 45) {
    display: none;
  }

  .history-meta {
    grid-template-columns: auto 1fr auto;
  }

  .history-meta .history-line:nth-of-type(2),
  .history-meta > span:nth-child(3) {
    display: none;
  }

  .incident-panel {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 23px 20px;
  }

  footer {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
