:root {
  --bg: #1b1d2a;
  --bg-elevated: #232635;
  --bg-soft: #2a2d3f;
  --bg-deep: #141622;
  --text: #f2f3f7;
  --text-muted: #9aa3b5;
  --accent: #c9b0ff;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --online: #23a559;
  --warn: #e0b24a;
  --danger: #ed4245;
  --radius: 12px;
  --font-display: 'Montserrat', 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.5;
  background:
    radial-gradient(90% 55% at 50% -8%, rgba(201, 176, 255, 0.08), transparent 55%),
    radial-gradient(70% 40% at 100% 0%, rgba(88, 101, 242, 0.06), transparent 45%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.75rem;
  flex: 1 0 auto;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.brand:hover span {
  color: var(--accent);
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.muted {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.lang-toggle {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.lang-toggle:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.overall {
  margin: 0 0 1.5rem;
  padding: 1.35rem 1.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.overall h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: clamp(1.45rem, 3.6vw, 1.95rem);
  line-height: 1.15;
}

.overall.operational h1 {
  color: var(--online);
}

.overall.degraded h1 {
  color: var(--warn);
}

.overall.outage h1 {
  color: var(--danger);
}

.overall.unknown h1 {
  color: var(--text);
}

.overall-sub {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 38rem;
  line-height: 1.45;
}

.monitors {
  display: grid;
  gap: 0.85rem;
}

.card {
  padding: 1.1rem 1.2rem 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card-copy {
  min-width: 0;
  flex: 1;
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 1rem;
}

.card-msg {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 42rem;
  line-height: 1.4;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.up {
  color: var(--online);
}

.badge.down {
  color: var(--danger);
}

.badge.degraded {
  color: var(--warn);
}

.badge.disabled,
.badge.unknown {
  color: var(--text-muted);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.meta-row strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bars {
  display: flex;
  align-items: stretch;
  gap: 3px;
  margin-top: 0.95rem;
  width: 100%;
  min-width: 0;
  height: 18px;
  overflow: hidden;
}

.bar {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  height: 100%;
}

.bar.up {
  background: var(--online);
}

.bar.down {
  background: var(--danger);
}

.bar.degraded {
  background: var(--warn);
}

.bar.disabled {
  background: #5a6172;
}

/* Footer 1:1 wie Homepage */
.site-footer {
  position: relative;
  margin-top: auto;
  padding: 2.25rem 0 1.75rem;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  overflow: hidden;
  width: 100%;
}

.footer-mascot {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(320px, 58vw);
  height: auto;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  mix-blend-mode: lighten;
}

.site-footer > .container {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  container-name: footer;
}

.footer-brand {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1.35rem auto 1.15rem;
  overflow: visible;
  color: inherit;
}

.footer-brand-text {
  fill: currentColor;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 92px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-anchor: middle;
}

.footer-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 1rem;
  margin: 0 0 1.15rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.footer-status[hidden] {
  display: none;
}

.footer-status p {
  margin: 0;
  color: #e8ecf5;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.footer-status .footer-link {
  margin: 0;
  font-size: 0.88rem;
}

.footer-status--maintenance {
  border-color: rgba(201, 176, 255, 0.35);
  background: rgba(201, 176, 255, 0.08);
}

.footer-status--degraded {
  border-color: rgba(255, 193, 94, 0.35);
  background: rgba(255, 193, 94, 0.08);
}

.footer-status--outage,
.footer-status--unknown {
  border-color: rgba(255, 139, 141, 0.35);
  background: rgba(255, 139, 141, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 1.4rem 2.6rem;
}

.footer-grid h4 {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-grid a {
  display: block;
  color: #ffffff;
  margin: 0.3rem 0;
}

.footer-grid .about {
  display: block;
  margin-top: 40px;
  margin-left: -0.65rem;
  padding-right: 0.5rem;
}

.footer-about-text {
  color: var(--text-muted);
  margin: 0;
}

.footer-grid .f-navi {
  margin-left: 1.35rem;
  padding-left: 0.35rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  width: fit-content;
  max-width: 100%;
  color: #d7dceb;
  margin: 0.3rem 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: #fff;
}

.footer-link-icon {
  flex-shrink: 0;
  opacity: 0;
  transform: translate(-4px, 4px) scale(0.85);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  color: var(--accent);
}

.footer-link:hover .footer-link-icon,
.footer-link:focus-visible .footer-link-icon {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.footer-copy {
  margin-top: 1.35rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid .about,
  .footer-grid .f-navi {
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(920px, calc(100% - 1.25rem));
    padding: 1.1rem 0 2rem;
  }

  .container {
    width: min(1100px, calc(100% - 1.25rem));
  }

  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .top-meta {
    width: 100%;
    justify-content: space-between;
  }

  .overall {
    padding: 1.15rem 1.05rem;
  }

  .overall h1 {
    font-size: clamp(1.3rem, 6.5vw, 1.7rem);
  }

  .card {
    padding: 1rem 0.95rem 1.05rem;
  }

  .meta-row {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .bars {
    height: 20px;
    gap: 2px;
  }

  .footer-brand {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-inline: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  .footer-mascot {
    left: auto;
    right: 0;
    width: min(150px, 38vw);
    transform: scaleX(-1);
  }

  .footer-brand-text {
    font-size: 72px;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 400px) {
  .footer-brand-text {
    font-size: 56px;
    letter-spacing: 0.03em;
  }
}
