:root {
  color-scheme: dark;
  --bg: #07090d;
  --surface: rgba(16, 20, 29, 0.78);
  --surface-solid: #10141d;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f7f8fb;
  --text-soft: #c9cfda;
  --muted: #8b95a7;
  --brand: #9b87f5;
  --cyan: #61dafb;
  --success: #45d6a0;
  --success-soft: rgba(69, 214, 160, 0.13);
  --warning: #f0bd55;
  --warning-soft: rgba(240, 189, 85, 0.13);
  --danger: #f1707f;
  --danger-soft: rgba(241, 112, 127, 0.13);
  --unknown: #8792a5;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% -10%, rgba(124, 103, 237, 0.12), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(97, 218, 251, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.page-glow {
  position: fixed;
  z-index: -1;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.14;
  pointer-events: none;
}
.page-glow-a { top: 8rem; left: -22rem; background: var(--brand); }
.page-glow-b { top: 42rem; right: -25rem; background: var(--cyan); }
.site-shell { width: min(calc(100% - 40px), var(--max-width)); margin: 0 auto; }
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 86px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
}
.brand-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
.brand-symbol svg, .feature-icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-copy { display: flex; align-items: baseline; gap: 8px; }
.brand-copy strong { font-size: 17px; font-weight: 700; letter-spacing: -.025em; }
.brand-copy span { color: var(--muted); font-size: 14px; }
.header-nav { display: flex; gap: 30px; }
.header-nav a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; transition: color 160ms ease; }
.header-nav a:hover { color: var(--text); }
.refresh-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.refresh-button:hover { border-color: var(--border-strong); background: rgba(255,255,255,.065); }
.refresh-button:active { transform: translateY(1px); }
.refresh-button.loading svg { animation: spin 800ms linear infinite; }
.refresh-button svg, .address-button svg, .empty-state-icon svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: end;
  min-height: 420px;
  padding: 92px 0 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.status-hero-copy { position: relative; z-index: 2; max-width: 760px; }
.status-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}
.live-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--unknown);
  box-shadow: 0 0 0 6px rgba(135,146,165,.09);
}
body[data-overall-status="operational"] .live-indicator {
  background: var(--success);
  box-shadow: 0 0 0 6px var(--success-soft), 0 0 24px rgba(69,214,160,.45);
}
body[data-overall-status="degraded"] .live-indicator,
body[data-overall-status="maintenance"] .live-indicator { background: var(--warning); box-shadow: 0 0 0 6px var(--warning-soft); }
body[data-overall-status="outage"] .live-indicator { background: var(--danger); box-shadow: 0 0 0 6px var(--danger-soft); }
.status-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 6.4vw, 78px);
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: .98;
}
.status-hero-copy > p {
  max-width: 660px;
  margin: 26px 0 0;
  color: var(--text-soft);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.8;
}
.status-hero-meta {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(112px,1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--border);
  backdrop-filter: blur(20px);
}
.status-hero-meta > div { min-width: 130px; padding: 18px; background: rgba(11,14,20,.9); }
.status-hero-meta span, .summary-item span, .feature-stat span, .address-button > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.status-hero-meta strong { display: block; font-size: 15px; font-weight: 650; }
.hero-orbit { position: absolute; top: 16px; right: 7%; width: 340px; height: 340px; opacity: .56; pointer-events: none; }
.orbit-ring, .orbit-core { position: absolute; inset: 50%; border-radius: 50%; transform: translate(-50%,-50%); }
.orbit-ring { border: 1px solid rgba(255,255,255,.08); }
.orbit-ring-a { width: 100%; height: 100%; animation: orbit 18s linear infinite; }
.orbit-ring-a::after, .orbit-ring-b::after {
  position: absolute;
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 20px var(--brand);
}
.orbit-ring-a::after { top: 14%; left: 18%; }
.orbit-ring-b { width: 68%; height: 68%; border-color: rgba(97,218,251,.11); animation: orbit-reverse 13s linear infinite; }
.orbit-ring-b::after { right: 8%; bottom: 24%; background: var(--cyan); box-shadow: 0 0 20px var(--cyan); }
.orbit-core {
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.22), rgba(155,135,245,.12) 45%, rgba(7,9,13,.6));
  box-shadow: 0 0 70px rgba(155,135,245,.22);
}
.orbit-core span { width: 14px; height: 14px; border-radius: 50%; background: var(--success); box-shadow: 0 0 28px rgba(69,214,160,.78); }
body[data-overall-status="degraded"] .orbit-core span,
body[data-overall-status="maintenance"] .orbit-core span { background: var(--warning); box-shadow: 0 0 28px rgba(240,189,85,.78); }
body[data-overall-status="outage"] .orbit-core span { background: var(--danger); box-shadow: 0 0 28px rgba(241,112,127,.78); }

.summary-strip { display: grid; grid-template-columns: repeat(3,1fr) 1.5fr; border-bottom: 1px solid var(--border); }
.summary-item { min-width: 0; padding: 28px 26px; border-right: 1px solid var(--border); }
.summary-item:first-child { padding-left: 0; }
.summary-item:last-child { border-right: 0; }
.summary-item strong { display: block; overflow: hidden; font-size: 24px; font-weight: 620; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.summary-item-wide strong { font-size: 16px; letter-spacing: -.01em; }
.section-block { padding: 92px 0; border-bottom: 1px solid var(--border); }
.section-heading { display: grid; grid-template-columns: 1fr minmax(280px,420px); gap: 40px; align-items: end; margin-bottom: 36px; }
.section-label { margin: 0 0 11px; color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.section-heading h2, .minecraft-feature h2 { margin: 0; font-size: clamp(30px,4vw,46px); font-weight: 620; letter-spacing: -.045em; }
.section-heading > p, .minecraft-feature-copy > div > p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.service-groups { display: grid; gap: 24px; }
.service-group { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(12,15,22,.72); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.service-group-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.018); }
.service-group-header h3 { margin: 0; font-size: 14px; font-weight: 700; }
.service-group-header span { color: var(--muted); font-size: 12px; }
.service-row { display: grid; grid-template-columns: minmax(210px,1.15fr) minmax(220px,1fr) auto; gap: 24px; align-items: center; padding: 24px; border-bottom: 1px solid var(--border); }
.service-row:last-child { border-bottom: 0; }
.service-identity { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.service-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
}
.service-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-identity strong { display: block; margin-bottom: 5px; font-size: 15px; font-weight: 650; }
.service-identity p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.uptime-block { min-width: 0; }
.uptime-bars { display: grid; grid-template-columns: repeat(24,minmax(2px,1fr)); gap: 3px; height: 28px; }
.uptime-bar { border-radius: 3px; background: rgba(135,146,165,.22); }
.uptime-bar.operational { background: var(--success); }
.uptime-bar.degraded, .uptime-bar.maintenance { background: var(--warning); }
.uptime-bar.outage { background: var(--danger); }
.uptime-caption { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 10px; }
.service-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}
.service-state::before { width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; content: ""; background: currentColor; box-shadow: 0 0 12px currentColor; }
.service-state.operational { background: var(--success-soft); color: var(--success); }
.service-state.degraded, .service-state.maintenance { background: var(--warning-soft); color: var(--warning); }
.service-state.outage { background: var(--danger-soft); color: var(--danger); }
.service-state.unknown { background: rgba(135,146,165,.12); color: var(--unknown); }

.minecraft-feature { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 46px 0; border-bottom: 1px solid var(--border); }
.minecraft-feature[hidden] { display: none; }
.minecraft-feature-copy { display: flex; gap: 20px; align-items: center; }
.feature-icon {
  display: grid;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(155,135,245,.15), rgba(97,218,251,.05)), var(--surface-solid);
  color: var(--text);
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
}
.feature-icon svg { width: 38px; }
.minecraft-feature-data { display: flex; gap: 18px; align-items: stretch; }
.feature-stat, .address-button { min-width: 150px; padding: 17px 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgba(255,255,255,.025); }
.feature-stat strong { font-size: 27px; font-weight: 620; letter-spacing: -.04em; }
.feature-stat small { color: var(--muted); font-size: 15px; }
.address-button { position: relative; min-width: 230px; color: var(--text); text-align: left; cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
.address-button:hover { border-color: var(--border-strong); background: rgba(255,255,255,.055); }
.address-button code { display: block; padding-right: 28px; color: var(--text); font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; }
.address-button svg { position: absolute; right: 18px; bottom: 18px; color: var(--muted); }
.incidents-section { border-bottom: 0; }
.incident-list { display: grid; gap: 16px; }
.empty-state, .incident-card { display: flex; gap: 18px; align-items: flex-start; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(12,15,22,.7); }
.empty-state-icon, .incident-icon { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: var(--success-soft); color: var(--success); }
.empty-state strong, .incident-card strong { display: block; margin-bottom: 6px; font-size: 15px; }
.empty-state p, .incident-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.incident-card { justify-content: space-between; }
.incident-card-main { display: flex; gap: 18px; }
.incident-card time { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.incident-card[data-impact="major"] .incident-icon, .incident-card[data-impact="critical"] .incident-icon { background: var(--danger-soft); color: var(--danger); }
.incident-card[data-impact="minor"] .incident-icon, .incident-card[data-impact="maintenance"] .incident-icon { background: var(--warning-soft); color: var(--warning); }
.loading-skeleton { display: grid; gap: 14px; }
.loading-skeleton span { display: block; height: 92px; border-radius: var(--radius-lg); background: linear-gradient(90deg,rgba(255,255,255,.035),rgba(255,255,255,.075),rgba(255,255,255,.035)); background-size: 200% 100%; animation: shimmer 1.5s ease infinite; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 116px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.site-footer > div { display: flex; gap: 10px; align-items: baseline; }
.site-footer strong { color: var(--text-soft); font-size: 14px; }
.site-footer p { margin: 0; }
.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  max-width: min(360px,calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(16,20,29,.96);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes orbit-reverse { to { transform: translate(-50%,-50%) rotate(-360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-nav { display: none; }
  .status-hero { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding: 78px 0 56px; }
  .status-hero-meta { width: min(100%,360px); }
  .hero-orbit { top: 20px; right: -110px; width: 300px; height: 300px; opacity: .34; }
  .summary-strip { grid-template-columns: repeat(2,1fr); }
  .summary-item { border-bottom: 1px solid var(--border); }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item:nth-child(3), .summary-item:nth-child(4) { border-bottom: 0; }
  .summary-item:nth-child(3) { padding-left: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .section-heading > p { max-width: 620px; }
  .service-row { grid-template-columns: 1fr auto; }
  .uptime-block { grid-column: 1 / -1; grid-row: 2; }
  .minecraft-feature { grid-template-columns: 1fr; }
  .minecraft-feature-data { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .site-shell { width: min(calc(100% - 28px),var(--max-width)); }
  .site-header { min-height: 74px; }
  .brand-copy span, .refresh-button span { display: none; }
  .refresh-button { width: 42px; padding: 0; justify-content: center; }
  .status-hero { padding: 62px 0 44px; }
  .status-hero h1 { font-size: clamp(38px,12vw,58px); }
  .status-hero-copy > p { margin-top: 20px; font-size: 15px; line-height: 1.75; }
  .status-kicker { margin-bottom: 22px; }
  .status-hero-meta { grid-template-columns: 1fr 1fr; }
  .status-hero-meta > div { min-width: 0; padding: 15px; }
  .hero-orbit { display: none; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-item, .summary-item:first-child, .summary-item:nth-child(3) { padding: 20px 14px; }
  .summary-item:nth-child(odd) { padding-left: 0; }
  .summary-item strong { font-size: 20px; }
  .summary-item-wide strong { font-size: 13px; }
  .section-block { padding: 68px 0; }
  .section-heading { margin-bottom: 26px; }
  .service-group-header { padding: 17px 18px; }
  .service-row { grid-template-columns: 1fr; gap: 18px; padding: 20px 18px; }
  .service-state { grid-row: 1; justify-self: start; min-width: 0; min-height: 32px; }
  .uptime-block { grid-column: 1; grid-row: auto; }
  .uptime-bars { gap: 2px; height: 24px; }
  .minecraft-feature { padding: 36px 0; }
  .minecraft-feature-copy { align-items: flex-start; }
  .feature-icon { width: 56px; height: 56px; border-radius: 17px; }
  .feature-icon svg { width: 29px; }
  .minecraft-feature h2 { font-size: 29px; }
  .minecraft-feature-data { display: grid; grid-template-columns: 1fr; }
  .feature-stat, .address-button { min-width: 0; width: 100%; }
  .empty-state, .incident-card { padding: 20px; }
  .incident-card { flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; min-height: 132px; }
  .site-footer > div { flex-direction: column; gap: 4px; }
  .toast { right: 14px; bottom: 14px; max-width: calc(100vw - 28px); }
}

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