:root {
  color-scheme: dark;
  --bg: #090d16;
  --card: rgba(20, 27, 43, 0.82);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #f7f8fb;
  --muted: #9ba6bb;
  --accent: #8cffbf;
  --accent-deep: #56eaa0;
  --danger: #ff9b9b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255,255,255,.25) .55px, transparent .55px);
  background-size: 5px 5px;
}

.ambient {
  position: fixed;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.14;
  pointer-events: none;
}
.ambient-one { background: #2bff9d; top: -20rem; right: -12rem; }
.ambient-two { background: #3a6cff; bottom: -24rem; left: -18rem; }

.shell {
  position: relative;
  width: min(100% - 32px, 680px);
  margin: 0 auto;
  padding: 38px 0 32px;
}

.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; letter-spacing: -.02em; }
.brand strong { color: var(--accent); font-weight: 650; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  color: #07120d; background: var(--accent); font-weight: 900; box-shadow: 0 0 28px rgba(140,255,191,.25);
}

.hero { padding: 68px 0 32px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(42px, 9vw, 68px); line-height: .98; letter-spacing: -.055em; font-weight: 720; }
h1 span { color: var(--muted); }
.lead { max-width: 570px; margin: 24px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }

.card {
  padding: 28px;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

label, h3 { display: block; margin: 0 0 10px; font-size: 14px; font-weight: 650; }
.input-wrap { position: relative; }
input {
  width: 100%; padding: 16px 48px 16px 16px; border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px; outline: none; color: var(--text); background: rgba(5,9,16,.72); font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(140,255,191,.1); }
.input-icon { position: absolute; right: 17px; top: 15px; color: var(--muted); }
.hint { margin: 9px 0 20px; color: var(--muted); font-size: 12px; }

button, .link-button { font: inherit; }
.primary {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
  border: 0; border-radius: 14px; color: #07120d; background: var(--accent); font-weight: 750;
  cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, opacity .15s;
}
.primary:hover:not(:disabled) { background: var(--accent-deep); transform: translateY(-1px); }
.primary:disabled { opacity: .4; cursor: not-allowed; }
.text-button { display: block; margin: 18px auto 0; border: 0; color: var(--muted); background: none; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--text); }

.subscription-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
h2 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.status-pill { padding: 7px 10px; border-radius: 999px; color: var(--accent); background: rgba(140,255,191,.09); font-size: 11px; font-weight: 750; }
.expiry { margin: 14px 0 0; color: var(--muted); }
.divider { height: 1px; margin: 24px 0; background: var(--card-border); }
.offers { display: grid; gap: 10px; margin-bottom: 18px; }
.offer {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; width: 100%;
  padding: 15px 16px; border: 1px solid var(--card-border); border-radius: 14px;
  color: var(--text); background: rgba(5,9,16,.46); text-align: left; cursor: pointer;
}
.offer:hover { border-color: rgba(140,255,191,.4); }
.offer.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.offer-duration { font-weight: 700; }
.offer-gateway { margin-top: 4px; color: var(--muted); font-size: 12px; }
.offer-price-wrap { display: grid; justify-items: end; gap: 3px; }
.offer-price { color: var(--accent); font-weight: 750; }
.offer-original-price { color: var(--muted); font-size: 11px; text-decoration: line-through; }
.offer-discount { padding: 3px 6px; border-radius: 999px; color: var(--accent); background: rgba(140,255,191,.1); font-size: 10px; font-weight: 800; }

.payment-state { text-align: center; }
.payment-state p { color: var(--muted); line-height: 1.55; }
.spinner { width: 50px; height: 50px; margin: 0 auto 20px; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
.success-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 20px; border-radius: 50%; color: #07120d; background: var(--accent); font-size: 28px; font-weight: 900; }
.link-button { margin-top: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }

.error { margin: 14px 2px 0; padding: 13px 15px; border: 1px solid rgba(255,155,155,.22); border-radius: 12px; color: var(--danger); background: rgba(255,90,90,.08); font-size: 14px; }
footer { margin-top: 24px; color: #687287; font-size: 12px; text-align: center; }
.hidden { display: none !important; }

dialog { width: min(100% - 32px, 680px); max-height: min(88vh, 820px); padding: 26px; border: 1px solid var(--card-border); border-radius: 22px; color: var(--text); background: #151b29; box-shadow: var(--shadow); overflow-x: hidden; }
dialog::backdrop { background: rgba(2,5,10,.78); backdrop-filter: blur(5px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head .eyebrow { margin-bottom: 7px; }
.close { border: 0; color: var(--muted); background: none; font-size: 30px; cursor: pointer; }
.client-picker { margin-top: 26px; }
.client-picker > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.client-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.client-button {
  display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; min-width: 0;
  padding: 12px; border: 1px solid var(--card-border); border-radius: 16px; color: var(--text);
  background: rgba(5,9,16,.46); font-weight: 750; text-align: left; cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
}
.client-button:hover { border-color: rgba(140,255,191,.55); background: rgba(140,255,191,.05); transform: translateY(-1px); }
.client-button img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.client-arrow { color: var(--accent); font-size: 20px; }
.client-guide { margin-top: 20px; }
.guide-back { padding: 0; border: 0; color: var(--muted); background: none; cursor: pointer; }
.guide-back:hover { color: var(--text); }
.guide-title { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.guide-title img { width: 48px; height: 48px; border-radius: 13px; object-fit: cover; }
.guide-title span { color: var(--muted); font-size: 12px; }
.guide-title h3 { margin: 2px 0 0; font-size: 20px; }
.guide-steps { margin: 0; padding: 0; list-style: none; }
.guide-steps li {
  position: relative; margin: 0 0 14px; padding: 16px 16px 16px 52px; border: 1px solid var(--card-border);
  border-radius: 16px; color: var(--muted); background: rgba(5,9,16,.32); line-height: 1.55;
}
.guide-steps li::before {
  content: attr(data-step); position: absolute; top: 14px; left: 14px; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; color: #07120d; background: var(--accent); font-size: 12px; font-weight: 850;
}
.guide-steps p { margin: 0; }
.guide-shot { display: block; width: 100%; max-height: 480px; aspect-ratio: 4 / 5; margin-top: 14px; border-radius: 12px; object-fit: cover; object-position: bottom; }
.url-example { color: var(--accent); white-space: nowrap; }

@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 680px); padding-top: 22px; }
  .hero { padding: 52px 4px 26px; }
  .card { padding: 20px; border-radius: 20px; }
  .subscription-head { align-items: center; }
  dialog { width: calc(100% - 22px); padding: 20px; border-radius: 20px; }
  .client-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
