:root {
  --bg: #101010;
  --topbar: #202020;
  --card: #212121;
  --card-border: rgba(255, 255, 255, 0.04);
  --text: #f2f2f2;
  --muted: #b9b9b9;
  --telegram: #2481cc;
  --telegram-strong: #229ed9;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 50% 0%, rgba(36,129,204,.08), transparent 34rem), var(--bg);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 76px 0 0;
  z-index: -2;
  background-color: #111;
  background-image: url("/assets/telegram-pattern.svg");
  background-size: 420px 420px;
  opacity: .42;
}
body::after {
  content: "";
  position: fixed;
  inset: 76px 0 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.36)), radial-gradient(circle at center 12rem, transparent, rgba(0,0,0,.28) 44rem);
  pointer-events: none;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px clamp(16px, 2.4vw, 32px);
  background: var(--topbar);
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 700;
  letter-spacing: 0;
}
.brand-icon { display: grid; width: 48px; height: 48px; place-items: center; flex: 0 0 auto; }
.brand-icon svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 8px 20px rgba(34,158,217,.22)); }
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #2b96df, #1f75c5);
  box-shadow: 0 12px 26px rgba(34,158,217,.22), inset 0 1px 0 rgba(255,255,255,.18);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 180ms ease, filter 180ms ease;
}
.download:hover { filter: brightness(1.06); transform: translateY(-1px); }
.page-shell {
  display: grid;
  min-height: calc(100dvh - 76px);
  place-items: start center;
  padding: clamp(52px, 7vw, 76px) 18px 48px;
}
.profile-card {
  width: min(100%, 610px);
  min-height: 430px;
  padding: clamp(30px, 5vw, 44px) clamp(24px, 5vw, 54px);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(39,39,39,.98), rgba(31,31,31,.98));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.03);
  text-align: center;
  animation: cardIn 360ms ease-out both;
}
.avatar {
  display: block;
  width: clamp(112px, 12vw, 148px);
  height: clamp(112px, 12vw, 148px);
  margin: 0 auto 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #151515;
  box-shadow: 0 18px 42px rgba(0,0,0,.24);
}
h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}
.members {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.35;
  font-weight: 500;
}
.description {
  margin: 22px auto 0;
  max-width: 27rem;
  color: #ededed;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.45;
  font-weight: 650;
}
.telegram-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 270px);
  min-height: 64px;
  margin-top: 28px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--telegram-strong), var(--telegram));
  box-shadow: 0 18px 34px rgba(36,129,204,.28), inset 0 1px 0 rgba(255,255,255,.22);
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  touch-action: manipulation;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.telegram-button:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 22px 42px rgba(36,129,204,.34), inset 0 1px 0 rgba(255,255,255,.24); }
.telegram-button:active { transform: translateY(1px) scale(.99); }
.telegram-button:focus-visible, .download:focus-visible { outline: 3px solid rgba(255,255,255,.86); outline-offset: 4px; }
.telegram-button.is-loading { pointer-events: none; }
.button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border: 2px solid rgba(255,255,255,.46);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.telegram-button.is-loading .button-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 640px) {
  .topbar { min-height: 64px; padding: 10px 12px; }
  .brand { gap: 10px; font-size: 22px; }
  .brand-icon { width: 40px; height: 40px; }
  .download { min-height: 40px; padding: 0 14px; font-size: 12px; }
  body::before, body::after { inset-top: 64px; }
  .page-shell { min-height: calc(100dvh - 64px); padding: 42px 14px 32px; }
  .profile-card { min-height: 380px; padding: 28px 20px 30px; border-radius: 9px; }
  .avatar { margin-bottom: 22px; }
  .telegram-button { width: 100%; min-width: 0; min-height: 58px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; scroll-behavior: auto !important; transition-duration: 1ms !important; }
}
