:root {
  --bg: #0a0e1a;
  --surface: #121829;
  --surface2: #1a2236;
  --line: #232c44;
  --text: #eef2fb;
  --muted: #8b95ad;
  --blue: #2962ff;
  --blue-soft: #5b8cff;
  --blue-dark: #1b46c2;
  --green: #25c26e;
  --red: #ef4f5f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 1100px;
  background: radial-gradient(circle, rgba(41,98,255,0.28), rgba(41,98,255,0) 60%);
  pointer-events: none;
  z-index: 0;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 56px);
}

.brand { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(41,98,255,0.4);
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: .3px; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: .15s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.on {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(41,98,255,.35);
}

.ghost-btn {
  color: var(--text); text-decoration: none;
  border: 1px solid var(--line);
  padding: 9px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  transition: .2s;
}
.ghost-btn:hover { border-color: var(--blue-soft); background: rgba(41,98,255,.1); }

/* Большое центрированное лого в hero с эффектами */
.hero-logo {
  margin-bottom: 22px;
  display: flex;
  justify-content: center;
}
.hero-logo img {
  width: 116px; height: 116px;
  border-radius: 28px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 18px 50px rgba(41,98,255,.45),
    0 0 70px rgba(41,98,255,.35);
  animation: logoFloat 4.5s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 18px 50px rgba(41,98,255,.45), 0 0 60px rgba(41,98,255,.3); }
  50%      { transform: translateY(-10px); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 28px 60px rgba(41,98,255,.55), 0 0 90px rgba(41,98,255,.45); }
}
@media (max-width: 880px) {
  .hero-logo { justify-content: flex-start; }
  .hero-logo img { width: 92px; height: 92px; border-radius: 24px; }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 56px) 60px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: center;
  padding: clamp(24px, 6vw, 64px) 0;
}

.pill {
  display: inline-block;
  background: rgba(41,98,255,.14);
  border: 1px solid rgba(41,98,255,.4);
  color: var(--blue-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.5px;
}
.accent {
  background: linear-gradient(135deg, var(--blue-soft), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  margin-top: 14px;
  line-height: 1.5;
  max-width: 520px;
}

.code-card {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.code-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.code-row { display: flex; gap: 10px; }
#codeInput {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  outline: none;
  transition: .2s;
}
#codeInput:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41,98,255,.2); }
#codeInput::placeholder { letter-spacing: 1px; color: #56607a; }

.primary-btn {
  border: 0;
  border-radius: 13px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(41,98,255,.35);
  transition: .2s;
}
.primary-btn:hover { filter: brightness(1.07); }
.primary-btn:disabled { opacity: .6; cursor: default; }

.code-status {
  margin-top: 12px;
  font-size: 14px;
  min-height: 20px;
  font-weight: 600;
}
.code-status.ok { color: var(--green); }
.code-status.err { color: var(--red); }
.code-status.muted { color: var(--muted); font-weight: 500; }

.download-block {
  margin-top: 24px;
  animation: rise .4s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.dl-code-banner {
  background: rgba(37,194,110,.12);
  border: 1px solid rgba(37,194,110,.4);
  color: var(--green);
  border-radius: 13px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.dl-code-banner b { font-family: ui-monospace, monospace; letter-spacing: 1px; }

.dl-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 20px;
  flex: 1;
  min-width: 200px;
  transition: .2s;
}
.store-btn:hover { border-color: var(--blue-soft); transform: translateY(-2px); }
.store-ico { display: grid; place-items: center; color: var(--blue-soft); }
.store-ico svg { width: 26px; height: 26px; }
.store-text { display: flex; flex-direction: column; line-height: 1.2; }
.store-text small { color: var(--muted); font-size: 11px; }
.store-text b { font-size: 16px; }

.steps {
  margin-top: 20px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.steps b { color: var(--text); }
#stepCode { font-family: ui-monospace, monospace; color: var(--blue-soft); }

/* Phone art */
.hero-art { display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 250px;
  height: 510px;
  background: linear-gradient(160deg, #1c2338, #11172a);
  border: 2px solid #2a3450;
  border-radius: 40px;
  padding: 16px;
  box-shadow: 0 30px 70px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
}
.phone-notch {
  position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px;
  background: #0a0e1a; border-radius: 0 0 14px 14px;
}
.phone-screen {
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(41,98,255,.25), rgba(10,14,26,0) 70%), #0c1120;
  border-radius: 28px;
  padding: 46px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ps-logo {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(41,98,255,.5);
}
.ps-logo img { width: 100%; height: 100%; object-fit: contain; }
.ps-title { font-weight: 800; font-size: 22px; margin-top: 14px; }
.ps-sub { color: var(--muted); font-size: 13px; margin: 4px 0 22px; }
.ps-field {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.ps-field.highlight {
  border-color: var(--blue);
  color: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(41,98,255,.18);
}
.ps-btn {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  padding: 13px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(41,98,255,.35);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.f-ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  color: var(--blue-soft);
  background: rgba(41,98,255,.12);
  border: 1px solid rgba(41,98,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.f-ico svg { width: 26px; height: 26px; }
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 30px 20px 40px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .features { grid-template-columns: 1fr; }
}
