:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --brand: #e11d48;
  --brand-dark: #be123c;
  --code: #00559f;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Outfit, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 16px;
  text-align: center;
}

.language-switch {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.language-switch button {
  min-width: 44px;
  height: 31px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.language-switch button.active {
  background: var(--brand);
  color: #fff;
}

.brand-heading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.brand-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 4px solid var(--brand);
  border-radius: 5px;
}

.brand-icon::before,
.brand-icon::after {
  position: absolute;
  content: "";
  inset: -8px 5px;
  border-top: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
}

.brand-icon::after {
  inset: 5px -8px;
  border: 0;
  border-left: 2px solid var(--brand);
  border-right: 2px solid var(--brand);
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.site-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

main {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 32px 16px;
}

.card {
  margin: 0 0 32px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0;
}

.description {
  margin-bottom: 24px;
  color: var(--muted);
}

.server-details {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.server-details summary {
  min-height: 50px;
  padding: 13px 16px;
  color: var(--brand);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.server-details summary::-webkit-details-marker {
  display: none;
}

.server-details summary::before {
  content: "▸";
  margin-right: 6px;
  font-size: 12px;
}

.server-details[open] summary::before {
  content: "▾";
}

.details-body {
  padding: 0 16px 16px;
  color: var(--muted);
}

.details-body h3 {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 14px;
}

.details-body ul {
  margin: 0;
  padding-left: 20px;
}

.details-body li + li {
  margin-top: 6px;
}

.install-block {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.install-block > div {
  min-width: 0;
  flex: 1;
}

.block-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.install-block p {
  margin-bottom: 16px;
  color: var(--muted);
}

code {
  color: var(--code);
  font-family: "Fira Code", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  font-size: 13.6px;
  word-break: break-word;
}

pre {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: var(--code);
  white-space: pre;
}

pre code {
  display: block;
  min-width: max-content;
}

.copy-btn {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.copy-btn:hover {
  border-color: #cbd5e1;
  background: #fff;
  color: var(--text);
}

.install-tabs {
  margin-top: 24px;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  min-height: 34px;
  padding: 8px 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.tab-btn:hover {
  background: #fff;
  color: var(--text);
}

.tab-btn.active {
  background: var(--brand);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.install-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 700;
}

.install-link:hover {
  background: #1e293b;
}

.status-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(900px, 100%);
  min-height: 108px;
  margin: -8px auto 0;
  padding: 28px 16px 18px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.status-pill span:not(.status-dot) {
  color: var(--brand);
  font-weight: 500;
}

.status-pill strong {
  font-size: 13px;
}

.status-panel p {
  margin: 0;
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 0 16px 32px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

footer p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(16px);
  opacity: 0;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  transition: 0.18s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 64px;
  }

  .language-switch {
    left: 16px;
    right: auto;
  }

  .brand-heading {
    gap: 12px;
  }

  h1 {
    font-size: 26px;
  }

  main {
    padding-top: 24px;
  }

  .card {
    padding: 24px;
  }

  .install-block {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-btn {
    align-self: flex-end;
  }

  .tab-list {
    gap: 6px;
  }

  .tab-btn {
    padding-inline: 12px;
  }

  footer {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 20px;
    border-radius: 12px;
  }

  .card h2 {
    font-size: 22px;
  }

  .brand-heading {
    align-items: flex-start;
  }
}
