﻿@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");

* { box-sizing: border-box; }

body.invite-page {
  --text: #f2f3f5;
  --muted: #b5bac1;
  --online: #43b581;
  --dot-offline: #b5bac1;

  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #1e1f22;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

body.invite-page::before {
  content: "";
  position: fixed;
  inset: -8%;
  z-index: -2;
  background-image: var(--banner-image, radial-gradient(circle at 20% 20%, #3f4147, #1e1f22 70%));
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: banner-pan 22s ease-in-out infinite alternate;
}

body.invite-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.65)),
    radial-gradient(circle at 50% 20%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.55));
}

@keyframes banner-pan {
  from {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
    background-position: 48% 45%;
  }
  to {
    transform: scale(1.16) translate3d(1.5%, 1%, 0);
    background-position: 55% 52%;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(470px, 100%);
  background: rgb(49, 51, 56);
  border: 1px solid #2b2d31;
  border-radius: 10px;
  text-align: center;
  padding: 28px 28px;
  backdrop-filter: blur(4px);
}

.loader-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.loader {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #ffffff;
  animation: spin 0.85s linear infinite;
}

.loader-text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.loader-wrap[hidden] {
  display: none;
}

.invite-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.invite-content[hidden] {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.layout-stack {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.guide-text {
  margin: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.top {
  position: fixed;
  top: 18px;
  right: 18px;
  overflow: visible;
  z-index: 3;
  pointer-events: none;
}

.top.bounce {
  animation: top-bounce 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes top-bounce {
  0% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-10px) scale(1.04);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.direction-arrow path,
.direction-arrow polyline {
  stroke: #ffffff;
  stroke-width: 7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  background: #2b2d31;
  margin: 0 auto 5px;
  display: block;
}

.invite-line {
  margin: 0;
  color: #dcdcdf;
  font-size: 16px;
  line-height: 20px;
}

.server-name {
  margin: 0;
  color: white;
  font-size: 26px;
  line-height: 30px;
  font-weight: 700;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
}

.dot.online {
  background: var(--online);
}

.dot.members {
  background: var(--dot-offline);
}

.inviter {
  font-weight: 700;
}

.error-box {
  text-align: left;
}

.error-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #2b2d31;
  color: #d1d5db;
  padding: 2px 6px;
  border-radius: 6px;
}

body.error-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #ecf3ff;
  background: linear-gradient(160deg, #0f172a, #1e293b);
}

body.error-page .box {
  max-width: 620px;
  width: calc(100% - 32px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(10, 14, 27, 0.75);
  padding: 20px;
}

body.error-page h1 { margin: 0 0 8px; }
body.error-page p { color: #bdc8e2; }
body.error-page code {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 6px;
}
