:root {
  --bg: #030b14;
  --text: #f4f8fc;
  --muted: #9eb0c4;
  --soft: #c8d6e4;
  --line: rgba(148, 176, 204, 0.14);
  --cyan: #19d7ea;
  --cyan-dim: rgba(25, 215, 234, 0.14);
  --gold: #f4c64f;
  --gold-dim: rgba(244, 198, 79, 0.12);
  --danger: #ff8a82;
  --danger-bg: rgba(255, 120, 110, 0.1);
  --panel: rgba(10, 24, 40, 0.72);
  --radius: 20px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select {
  font: inherit;
}

.page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
      background:
    radial-gradient(900px 520px at 12% 8%, rgba(25, 215, 234, 0.16), transparent 62%),
    radial-gradient(700px 480px at 88% 12%, rgba(244, 198, 79, 0.1), transparent 58%),
    linear-gradient(180deg, #05111f 0%, #020912 100%);
}

.join-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.join-glow-a {
  width: 420px;
  height: 420px;
  top: -80px;
  left: -60px;
  background: rgba(25, 215, 234, 0.22);
}

.join-glow-b {
  width: 360px;
  height: 360px;
  right: -40px;
  top: 35%;
  background: rgba(244, 198, 79, 0.14);
}

/* Header */
.join-header {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
  padding: 22px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-coin {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 15px;
  font-weight: 900;
  background: radial-gradient(circle at 30% 28%, rgba(255, 245, 193, 0.2), transparent 40%),
    rgba(4, 16, 29, 0.6);
  box-shadow: 0 0 24px rgba(244, 198, 79, 0.12);
}

.brand-copy strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.brand-copy small {
  display: block;
  color: var(--gold);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.join-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-link {
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.18s ease;
}

.header-link:hover {
  color: var(--cyan);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: rgba(25, 215, 234, 0.45);
  background: rgba(25, 215, 234, 0.06);
}

.btn-primary {
  color: #00141c;
  background: linear-gradient(135deg, #22e0f2 0%, #12c4de 55%, #0eb5d4 100%);
  box-shadow: 0 14px 36px rgba(18, 196, 222, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 18px 44px rgba(18, 196, 222, 0.38);
}

.btn-block {
  width: 100%;
}

.btn-cta {
  min-height: 56px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.btn-cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.btn-cta:hover svg {
  transform: translateX(3px);
}

/* Main layout */
.join-main {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

/* Story column */
.join-story {
  padding-top: 12px;
}

.story-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(25, 215, 234, 0.22);
  margin-bottom: 22px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(25, 215, 234, 0.5);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(25, 215, 234, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(25, 215, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(25, 215, 234, 0);
  }
}

.join-story h1 {
  margin: 0 0 18px;
  font-size: clamp(2.35rem, 4.5vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  max-width: 14ch;
}

.headline-gradient {
  display: block;
  background: linear-gradient(120deg, var(--cyan) 0%, #7ef0ff 45%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.story-lead {
  margin: 0 0 24px;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--soft);
}

.referral-chip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 24px;
  max-width: 480px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--soft);
  background: var(--gold-dim);
  border: 1px solid rgba(244, 198, 79, 0.28);
}

.referral-chip svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--gold);
  margin-top: 1px;
}

.referral-chip strong {
  color: var(--gold);
}

.join-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.stat {
  padding: 16px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.stat strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.stat span {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.join-perks {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.join-perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--soft);
}

.perk-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #00141c;
  background: linear-gradient(135deg, #22e0f2, #12c4de);
  flex-shrink: 0;
}

.join-social-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
}

.proof-avatars {
  display: flex;
  flex-shrink: 0;
}

.proof-avatars span {
  width: 36px;
  height: 36px;
  margin-left: -10px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  background: linear-gradient(145deg, #14304a, #0a1c2e);
}

.proof-avatars span:first-child {
  margin-left: 0;
}

.proof-avatars span:last-child {
  background: linear-gradient(135deg, rgba(25, 215, 234, 0.35), rgba(244, 198, 79, 0.25));
  color: var(--cyan);
}

.join-social-proof p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 280px;
}

/* Form panel */
.join-form-panel {
  position: sticky;
  top: 20px;
}

.form-alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.form-alert-error {
  color: #ffd4d0;
  background: var(--danger-bg);
  border: 1px solid rgba(255, 120, 110, 0.35);
}

.form-alert ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.form-panel-inner {
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 32px 80px rgba(0, 0, 0, 0.35);
}

.form-panel-head {
  margin-bottom: 22px;
}

.form-panel-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.form-panel-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.closed-state {
  padding: 8px 0;
}

.closed-state p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--soft);
}

.join-form {
  display: grid;
  gap: 20px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-block {
  display: grid;
  gap: 12px;
}

.form-block-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
}

.field input,
.select-wrap select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(3, 12, 22, 0.55);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder {
  color: #6f8499;
}

.field input:focus,
.select-wrap select:focus {
  border-color: rgba(25, 215, 234, 0.55);
  background: rgba(3, 12, 22, 0.85);
  box-shadow: 0 0 0 3px rgba(25, 215, 234, 0.12);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  cursor: pointer;
  padding-right: 36px;
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 12px;
}

.form-agreements {
  display: grid;
  gap: 10px;
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}

.agree-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.agree-row input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 5px;
  border: 1px solid rgba(192, 216, 232, 0.35);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.agree-row input:checked {
  border-color: var(--cyan);
  background: linear-gradient(135deg, #22e0f2, #12c4de);
}

.agree-row input:checked::after {
  content: "";
  display: block;
  width: 8px;
  height: 4px;
  margin: 5px auto 0;
  border-left: 2px solid #00141c;
  border-bottom: 2px solid #00141c;
  transform: rotate(-45deg);
}

.agree-row strong {
  color: var(--text);
  font-weight: 700;
}

.agree-row a {
  color: var(--cyan);
  font-weight: 700;
}

.form-footer-note {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.form-footer-note a {
  color: var(--cyan);
  font-weight: 800;
}

.fair-play-details {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.fair-play-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--soft);
  list-style: none;
}

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

.fair-play-details summary::after {
  content: " +";
  color: var(--cyan);
}

.fair-play-details[open] summary::after {
  content: " −";
}

.fair-play-details ul {
  margin: 10px 0 0;
  padding-left: 18px;
  line-height: 1.55;
}

.join-footer {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
  padding: 0 0 28px;
  text-align: center;
}

.join-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.join-footer a {
  color: var(--soft);
  font-weight: 600;
}

.join-footer a:hover {
  color: var(--cyan);
}

@media (max-width: 1024px) {
  .join-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .join-form-panel {
    position: static;
  }

  .join-story h1 {
    max-width: none;
  }

  .join-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .join-header,
  .join-main,
  .join-footer {
    width: min(calc(100% - 28px), var(--container));
  }

  .join-header {
    flex-wrap: wrap;
    padding-top: 16px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .join-social-proof {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-panel-inner {
    padding: 20px 18px;
    border-radius: 18px;
  }

  .story-lead {
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .join-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .btn-ghost {
    flex: 1;
  }
}
