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

:root {
  --bg:             #080E1A;
  --bg-card:        #0E1524;
  --bg-card-hover:  #151E30;
  --bg-surface:     #0B1220;

  --accent:         #E6B54A;
  --accent-hover:   #F2C766;
  --accent-dark:    #C9982F;
  --accent-dim:     rgba(230, 181, 74, 0.12);
  --accent-glow:    rgba(230, 181, 74, 0.25);

  --text:           #F5F7FA;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;

  --border:         rgba(255, 255, 255, 0.06);
  --border-hi:      rgba(255, 255, 255, 0.12);

  --success:        #4ADE80;
  --danger:         #F87171;

  --radius-sm:      12px;
  --radius:         16px;
  --radius-lg:      22px;
}

html, body {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(230, 181, 74, 0.10), transparent 65%),
    radial-gradient(ellipse 50% 55% at 0% 100%, rgba(124, 92, 255, 0.06), transparent 55%),
    radial-gradient(ellipse 40% 50% at 100% 100%, rgba(34, 211, 238, 0.04), transparent 55%),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.40) 100%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

.state {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.state-loading { padding: 24px; }

.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Full-screen state (error / paid) ──────────────────────────── */
/* Тематика: «попытка установить туннель» — пульсирующие кольца от центра.
   Это не копия 404 bos.tg, а свой visual: тихий, без сетки/scanline/glitch. */
.state-full {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.state-full::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 70% at 50% 45%, var(--state-glow, rgba(248,113,113,0.10)), transparent 65%),
    radial-gradient(ellipse 100% 50% at 50% 100%, rgba(0, 0, 0, 0.30), transparent 60%);
  pointer-events: none;
}
[data-state="error"] { --state-color: #F87171; --state-glow: rgba(248,113,113,0.10); }
[data-state="paid"]  { --state-color: #4ADE80; --state-glow: rgba(74,222,128,0.12); }

.state-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 460px;
  padding: 0 8px;
}

.pulse-mark {
  position: relative;
  width: 168px; height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--state-color);
  opacity: 0;
  animation: pulse-ring 3s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.pulse-ring-2 { animation-delay: 1s; }
.pulse-ring-3 { animation-delay: 2s; }
@keyframes pulse-ring {
  0%   { transform: scale(0.45); opacity: 0; }
  10%  { opacity: 0.55; }
  100% { transform: scale(1); opacity: 0; }
}

.pulse-core {
  position: relative;
  width: 96px; height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 30%, color-mix(in oklab, var(--state-color) 22%, transparent), color-mix(in oklab, var(--state-color) 6%, transparent) 70%);
  border: 1.5px solid color-mix(in oklab, var(--state-color) 40%, transparent);
  color: var(--state-color);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 60px -10px color-mix(in oklab, var(--state-color) 50%, transparent);
}
.pulse-core svg { width: 44px; height: 44px; }

@supports not (color: color-mix(in oklab, red, blue)) {
  [data-state="error"] .pulse-core {
    background: radial-gradient(circle at 50% 30%, rgba(248,113,113,0.22), rgba(248,113,113,0.06) 70%);
    border-color: rgba(248,113,113,0.40);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 60px -10px rgba(248,113,113,0.50);
  }
  [data-state="paid"] .pulse-core {
    background: radial-gradient(circle at 50% 30%, rgba(74,222,128,0.22), rgba(74,222,128,0.06) 70%);
    border-color: rgba(74,222,128,0.40);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 60px -10px rgba(74,222,128,0.50);
  }
}

.state-title {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.state-text {
  font-size: clamp(14px, 2.5vw, 15.5px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 380px;
}

.back-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 26px;
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 50%, var(--accent-dark) 100%);
  color: #07101A;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.12s, box-shadow 0.18s, filter 0.18s;
  box-shadow:
    0 8px 24px -4px rgba(230, 181, 74, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
  letter-spacing: -0.005em;
}
.back-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  text-decoration: none;
}
.back-cta:active { transform: translateY(0); }
.back-cta svg { width: 18px; height: 18px; transition: transform 0.15s; }
.back-cta:hover svg { transform: translateX(2px); }
[data-state="error"] .back-cta {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text);
  box-shadow: none;
}

@media (max-width: 480px) {
  .pulse-mark { width: 144px; height: 144px; margin-bottom: 22px; }
  .pulse-core { width: 84px; height: 84px; }
  .pulse-core svg { width: 38px; height: 38px; }
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 28px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 32px; height: 32px;
  display: block;
}
.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}
.secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(230, 181, 74, 0.25);
}
.secure svg { width: 14px; height: 14px; color: var(--accent); }

.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  text-align: center;
  color: var(--text);
}
.page-sub {
  display: none;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
  padding: 32px 24px 26px;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(230, 181, 74, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(230, 181, 74, 0.04), rgba(255, 255, 255, 0.015) 60%, transparent 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(230, 181, 74, 0.18), transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-rule {
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 12px auto 14px;
  border-radius: 2px;
}
.hero-eyebrow {
  font-size: 11.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 600;
  margin-bottom: 8px;
}
.hero-amount {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.028em;
  background: linear-gradient(135deg, #FFD380 0%, #F0C45E 35%, #E6B54A 65%, #C9982F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 28px rgba(230, 181, 74, 0.25));
}
.hero-plan {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.hero-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(14, 21, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chip svg { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

.col-form { min-width: 0; }
.col-summary { min-width: 0; }

.block { margin-bottom: 22px; }
.block-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0;
  margin-bottom: 10px;
}
.block-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  padding-left: 4px;
}

.email-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text);
  word-break: break-all;
  font-weight: 500;
  min-height: 60px;
}
.email-row svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }

.method {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1.5px solid transparent;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  cursor: pointer;
  transition: outline-color 0.2s, background 0.2s, border-color 0.2s, transform 0.12s;
  min-height: 72px;
}
.method:hover {
  outline-color: rgba(230, 181, 74, 0.22);
  background: var(--bg-card-hover);
}
.method:hover .method-icon { transform: scale(1.04); }
.method:active { transform: scale(0.985); }
.method:has(input:checked) {
  border-color: var(--accent);
  outline: none;
  background:
    linear-gradient(135deg, rgba(230, 181, 74, 0.10), rgba(230, 181, 74, 0.02) 70%),
    var(--bg-card-hover);
  box-shadow:
    0 0 24px -6px rgba(230, 181, 74, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.method-icon {
  transition: transform 0.18s;
}

.method-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.method-icon img { display: block; }
.method-icon-yookassa { background: #FFFFFF; }
.method-icon-paypal   { background: #003087; }
.method-icon-crypto   { background: linear-gradient(135deg, #F59E0B, #D97706); }
.method-body { flex: 1; min-width: 0; }
.method-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.method-sub   { font-size: 12.5px; color: var(--text-muted); }

.cta {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 50%, var(--accent-dark) 100%);
  border: none;
  border-radius: var(--radius);
  color: #1A0F00;
  font-size: 15.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s, filter 0.18s;
  box-shadow:
    0 12px 32px -6px rgba(230, 181, 74, 0.45),
    0 0 0 1px rgba(230, 181, 74, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
  margin-top: 8px;
  margin-bottom: 14px;
  min-height: 56px;
  letter-spacing: -0.005em;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}
.cta > * { position: relative; z-index: 1; }
.cta:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 40px -6px rgba(230, 181, 74, 0.60),
    0 0 0 1px rgba(230, 181, 74, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
  filter: brightness(1.05);
}
.cta:not(:disabled):active { transform: translateY(0); }
.cta:disabled {
  background: var(--bg-card);
  color: var(--text-muted);
  box-shadow: none;
  border: 1px solid var(--border);
  cursor: not-allowed;
}
.cta-arrow { width: 18px; height: 18px; transition: transform 0.15s; }
.cta:not(:disabled):hover .cta-arrow { transform: translateX(3px); }
.cta:disabled .cta-arrow { display: none; }

.legal {
  font-size: 12.5px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}
.legal a { color: var(--accent-hover); font-weight: 500; }

.summary-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 20px;
  box-shadow: 0 8px 32px -16px rgba(0, 0, 0, 0.6);
}
.summary-section + .summary-section { margin-top: 0; }
.summary-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.summary-pick-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.summary-pick-price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  background: linear-gradient(135deg, #F0C45E, #E6B54A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}
.summary-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0;
  margin-bottom: 12px;
}
.summary-features {
  list-style: none;
}
.summary-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
}
.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}
.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}
.summary-after { display: flex; flex-direction: column; gap: 10px; }
.after-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.after-icon {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.after-icon svg { width: 14px; height: 14px; }

.m-stickybar { display: none; }

@media (max-width: 1023px) {
  .grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
  }
  .hero-amount { font-size: 52px; }
  .page { padding: 20px 24px 56px; }
}

@media (max-width: 767px) {
  .page { padding: 12px 16px 96px; }
  .topbar { justify-content: center; margin-bottom: 10px; }
  .brand-logo { width: 28px; height: 28px; }
  .brand-name { display: none; }
  .brand { gap: 0; }
  .page-title { font-size: 19px; margin-bottom: 6px; }
  .page-sub { display: block; margin-bottom: 18px; font-size: 12.5px; }

  .hero {
    margin-bottom: 18px;
    padding: 22px 16px 18px;
  }
  .hero-eyebrow { font-size: 10.5px; margin-bottom: 6px; }
  .hero-amount { font-size: 42px; }
  .hero-rule { margin: 10px auto 12px; }
  .hero-plan { font-size: 13.5px; margin-bottom: 14px; }
  .chip { font-size: 10.5px; padding: 4px 8px; gap: 4px; }
  .chip svg { width: 11px; height: 11px; }
  .hero-chips { gap: 6px; }

  .grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .col-summary { margin-top: 24px; }
  .summary-card {
    position: static;
    top: auto;
    padding: 20px;
  }

  .cta-desk { display: none; }
  .legal { margin-bottom: 8px; }

  .block { margin-bottom: 18px; }
  .block-title { margin-bottom: 10px; }
  .email-row { padding: 14px 16px; min-height: 52px; }
  .method { padding: 14px 14px; gap: 12px; min-height: 60px; margin-bottom: 8px; }
  .method-title { font-size: 14.5px; }
  .method-icon { width: 40px; height: 40px; border-radius: 10px; }
  .method-icon-yookassa img { width: 30px; height: 30px; }

  .m-stickybar {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(8, 14, 26, 0.88);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-top: 1px solid var(--border);
    z-index: 50;
  }
  .cta-mobile {
    width: 100%;
    margin: 0;
    padding: 13px 16px;
    min-height: 48px;
    font-size: 14.5px;
  }
  .cta-mobile .cta-arrow { display: none; }
}

@media (max-width: 360px) {
  .page { padding: 12px 12px 92px; }
  .hero-amount { font-size: 38px; }
  .m-stickybar { padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
  .cta-mobile { padding: 12px 14px; min-height: 46px; font-size: 14px; }
}

@supports (-webkit-touch-callout: none) {
  body { -webkit-text-size-adjust: 100%; }
  .method, .cta { -webkit-tap-highlight-color: transparent; }
}

[dir="rtl"] .cta-arrow { transform: scaleX(-1); }
[dir="rtl"] .cta:not(:disabled):hover .cta-arrow { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .summary-pick { flex-direction: row-reverse; }
[dir="rtl"] .after-row { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .summary-features li { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .email-row { flex-direction: row-reverse; }
[dir="rtl"] .method { flex-direction: row-reverse; }
[dir="rtl"] .block-hint { padding-left: 0; padding-right: 4px; }
