:root {
  --bg: #070b17;
  --panel: rgba(9, 15, 31, 0.72);
  --panel-strong: rgba(9, 15, 31, 0.88);
  --line: rgba(255, 255, 255, 0.25);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --soft: rgba(255, 255, 255, 0.1);
  --accent: #6ee7f9;
  --accent-2: #c084fc;
  --ok: #34d399;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #070b17;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 7, 18, 0.28), rgba(4, 7, 18, 0.86) 72%, #060812),
    radial-gradient(circle at 50% 16%, rgba(192, 132, 252, 0.2), transparent 38%),
    url("assets/space-hero.png") center top / cover no-repeat;
}

a {
  color: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 22px 0 46px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
  text-decoration: none;
}

.top-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #111a30, #070b18);
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.18);
}

.top-logo img {
  display: block;
  width: 36px;
  height: 36px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  text-decoration: none;
}

.download-card {
  display: grid;
  gap: 22px;
  margin-top: 22px;
  border: 1px solid rgba(110, 231, 249, 0.22);
  border-radius: 12px;
  padding: clamp(22px, 4vw, 34px);
  background: linear-gradient(145deg, rgba(9, 15, 31, 0.92), rgba(9, 15, 31, 0.64));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.download-head {
  max-width: 680px;
}

.download-head h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.download-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  min-height: 100vh;
  padding: 28px 18px;
}

.hero {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  width: min(1100px, 100%);
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 13px;
  width: min(760px, 100%);
}

.brand img {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.brand h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 8px 36px rgba(0, 0, 0, 0.5);
}

.brand p {
  width: min(720px, 100%);
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 14px;
  width: min(820px, 100%);
  margin-top: 10px;
}

.platform-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: rgba(4, 8, 20, 0.64);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.platform-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(9, 15, 31, 0.86);
}

.platform-button svg {
  width: 36px;
  height: 36px;
}

.platform-button strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.platform-button span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.15;
}

.content-shell {
  display: grid;
  gap: 18px;
  width: min(940px, 100%);
  min-width: 0;
  max-width: 100%;
  margin: auto;
}

.top-link {
  justify-self: start;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.top-link:hover {
  color: #fff;
}

.guide-card {
  display: grid;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: clamp(22px, 4vw, 42px);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.guide-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.guide-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: var(--soft);
}

.guide-icon svg {
  width: 40px;
  height: 40px;
}

.guide-head h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.guide-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.guide-card h2 {
  margin: 4px 0 -6px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.download-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(110, 231, 249, 0.35);
  border-radius: 10px;
  padding: 13px 14px;
  background: rgba(13, 148, 136, 0.13);
  color: rgba(255, 255, 255, 0.9);
}

.download-status i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.14);
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: block;
  min-height: 34px;
  padding-left: 46px;
  counter-increment: step;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 900;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.payment-box,
.copy-box {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.payment-box label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.amount-row {
  display: grid;
  grid-template-columns: minmax(0, 180px) auto;
  gap: 10px;
  align-items: center;
}

.amount-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  font-weight: 850;
}

.amount-row span {
  color: var(--muted);
}

.copy-box textarea {
  width: 100%;
  min-width: 0;
  min-height: 96px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.32);
  font: 13px/1.45 Consolas, "SFMono-Regular", monospace;
  overflow-wrap: anywhere;
}

#iosRoutingConfig {
  min-height: 138px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
  text-decoration: none;
}

.button-reset {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.primary-action {
  color: #06111f;
  background: #ffffff;
}

.primary-action.disabled {
  pointer-events: none;
  opacity: .52;
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 740px) {
  .page {
    padding: 20px 12px;
  }

  .shell {
    width: min(100vw - 24px, 520px);
    padding: 20px 0 36px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .download-card {
    padding: 20px 14px;
  }

  .content-shell {
    justify-self: center;
    width: min(360px, 100%) !important;
    max-width: min(360px, 100%) !important;
    overflow-x: hidden;
  }

  .guide-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 14px;
    overflow-x: hidden;
  }

  .hero,
  .brand {
    width: 100%;
  }

  .brand p {
    max-width: calc(100vw - 32px);
    font-size: 16px;
  }

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

  .platform-button {
    min-height: 66px;
  }

  .guide-head {
    grid-template-columns: 1fr;
  }

  .guide-icon {
    width: 62px;
    height: 62px;
  }

  .payment-box,
  .copy-box {
    width: 100%;
  }

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

  .primary-action,
  .secondary-action {
    width: 100%;
    text-align: center;
  }
}
