:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --background: #05070d;
  --surface: #0c101a;
  --surface-raised: #151a26;
  --text: #f3f5fa;
  --muted: #a4adbd;
  --cyan: #22c7f2;
  --magenta: #ee32c2;
  --green: #3ddc97;
  --red: #ff647c;
  --border: #2a3140;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  background: var(--background);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  margin: 0;
  background: var(--background);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--cyan);
}

.hero {
  background: #02030a;
  border-bottom: 1px solid var(--border);
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar h1 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 750;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 42px);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.language-switch button {
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  color: #03060a;
  background: var(--cyan);
}

.hero-artwork {
  display: block;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  aspect-ratio: 2051 / 767;
  overflow: hidden;
}

.hero-artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #02030a;
}

.connection {
  background: var(--surface);
}

.connection-inner {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 52px;
}

.status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot[data-state="online"] {
  background: var(--green);
  box-shadow: 0 0 12px rgb(61 220 151 / 55%);
}

.status-dot[data-state="offline"] {
  background: var(--red);
}

.status-dot[data-state="checking"] {
  background: var(--cyan);
  animation: status-pulse 1.4s ease-in-out infinite;
}

@keyframes status-pulse {
  50% { opacity: 0.35; }
}

.connection-copy {
  max-width: 700px;
  margin-top: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--magenta);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.connection-copy h2 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.12;
}

.connection-copy > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 28px 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
  font-size: 0.9rem;
  font-weight: 650;
}

.facts li:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 24px;
  vertical-align: 2px;
  border-radius: 50%;
  background: var(--border);
}

.address-block {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
}

.address-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

#server-address {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.1rem;
}

.actions {
  display: flex;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: #03060a;
  background: var(--cyan);
}

.button-secondary {
  color: var(--text);
  border-color: var(--border);
  background: #0d121d;
}

.button:hover {
  filter: brightness(1.12);
}

.button:focus-visible,
.language-switch button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

.client-link,
.copy-feedback {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.client-link a {
  margin-left: 4px;
  font-weight: 700;
}

.copy-feedback {
  min-height: 1.3em;
  color: var(--green);
}

footer {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #778195;
  font-size: 0.76rem;
  line-height: 1.55;
}

footer p {
  margin: 0;
}

footer p:first-child {
  max-width: 650px;
}

@media (max-width: 720px) {
  .connection-inner {
    padding-top: 34px;
  }

  .connection-copy h2 {
    font-size: 1.75rem;
  }

  .address-block {
    grid-template-columns: 1fr;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .topbar,
  .connection-inner,
  footer {
    width: min(100% - 24px, 960px);
  }

  .topbar {
    min-height: 58px;
  }

  .topbar h1 {
    font-size: 1.05rem;
  }

  .connection-copy h2 {
    font-size: 1.55rem;
  }

  .facts {
    display: grid;
    gap: 8px;
  }

  .facts li::after {
    display: none !important;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .status-dot[data-state="checking"] {
    animation: none;
  }
}
