@font-face {
  font-family: "Luckiest Guy";
  src: url("./fonts/LuckiestGuy-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Rubik One";
  src: url("./fonts/RubikOne-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Poetsen One";
  src: url("./fonts/PoetsenOne-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --brand-green: #0b8744;
  --brand-green-dark: #095932;
  --brand-green-soft: rgba(11, 135, 68, 0.15);
  --page-gray: #f4f6fa;
  --ink: #111111;
  --muted: #a2a2a2;
  --white: #ffffff;
  --panel-radius: 24px;
  --control-radius: 10px;
  --page-gutter: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --panel-shadow: 0 2px 16px rgba(0, 42, 19, 0.03),
    0 -2px 16px rgba(0, 42, 19, 0.03);
  color: var(--ink);
  font-family: "PingFang SC", "Noto Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-gray);
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: inherit;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@supports (min-height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

button,
input {
  margin: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  -webkit-appearance: none;
  appearance: none;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
blockquote,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button:focus-visible {
  outline: 3px solid rgba(54, 111, 255, 0.55);
  outline-offset: 2px;
}

/* Registration */

body.register-page {
  background: var(--brand-green);
}

.register-shell {
  width: 100%;
  max-width: 375px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--brand-green);
}

@supports (min-height: 100dvh) {
  .register-shell {
    min-height: 100dvh;
  }
}

.register-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: calc(231px + var(--safe-top));
  overflow: visible;
  background: linear-gradient(180deg, #13b643 0%, #b6f276 100%);
}

.register-hero__curve {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -39px;
  width: 116%;
  min-width: 390px;
  height: 76px;
  max-width: none;
  transform: translateX(-50%);
}

.register-hero__speech {
  position: absolute;
  z-index: 7;
  top: calc(10.5px + var(--safe-top));
  left: 13px;
  width: 171px;
  height: 63px;
}

.register-hero__speech img {
  position: absolute;
  top: 5px;
  left: 1.5px;
  width: 168px;
  height: 53px;
  transform: rotate(-3.44deg);
  transform-origin: center;
}

.register-hero__speech span {
  position: absolute;
  top: 5px;
  left: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 44px;
  color: #3cc03d;
  font-family: "Luckiest Guy", sans-serif;
  font-size: 17px;
  line-height: normal;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1.5px 4.7px rgba(0, 0, 0, 0.15);
  transform: rotate(-2.01deg);
  transform-origin: center;
  white-space: nowrap;
}

.register-hero__offer {
  position: absolute;
  z-index: 2;
  top: calc(61px + var(--safe-top));
  left: var(--page-gutter);
  width: 247px;
  height: 95px;
  padding: 9px 13px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(270deg, rgba(0, 164, 12, 0.25), #02a20e);
}

.register-hero__title {
  width: max-content;
  color: #fffbd2;
  font-family: "Luckiest Guy", sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.05;
  text-shadow: 0 3.5px 10.4px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .register-hero__title,
  .register-hero__subtitle {
    color: transparent;
    background: linear-gradient(180deg, #fefdfb 0%, #fcfa8d 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.register-hero__subtitle {
  margin-top: 3px;
  color: #fffbd2;
  font-family: "Luckiest Guy", sans-serif;
  font-size: 18px;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.register-hero__timer {
  position: absolute;
  z-index: 7;
  top: calc(164px + var(--safe-top));
  left: 29px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  color: var(--brand-green-dark);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.register-hero__timer-label {
  margin-right: 5px;
}

.countdown-value {
  min-width: 20px;
  height: 20px;
  padding: 0 3px;
  border-radius: 4px;
  background: var(--white);
  font-variant-numeric: tabular-nums;
  line-height: 20px;
  text-align: center;
}

.countdown-separator {
  font-weight: 700;
}

.register-hero__art {
  position: absolute;
  z-index: 6;
  top: calc(22px + var(--safe-top));
  right: -32px;
  width: 220px;
  height: 220px;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.page-stack {
  position: relative;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-top: -1px;
  padding: 0 var(--page-gutter) calc(24px + var(--safe-bottom));
}

.content-panel {
  width: 100%;
  overflow: hidden;
  border-radius: var(--panel-radius);
  background: var(--white);
  box-shadow: var(--panel-shadow);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 10px 16px;
  background: var(--brand-green-soft);
}

.section-title {
  color: var(--brand-green);
  font-family: "Rubik One", "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.registration-form {
  padding: 16px;
}

.registration-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: var(--page-gray);
  transition: border-color 160ms ease, box-shadow 160ms ease,
    background-color 160ms ease;
}

.field-icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.phone-prefix {
  flex: 0 0 auto;
  color: #57595a;
  font-size: 14px;
  white-space: nowrap;
}

.field-control {
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 44px;
}

.field-control::placeholder {
  color: #737678;
  opacity: 1;
}

.send-code-button {
  flex: 0 0 82px;
  min-width: 82px;
  height: 44px;
  padding: 0 0 0 8px;
  border-left: 1px solid rgba(11, 135, 68, 0.18);
  background: transparent;
  color: var(--brand-green);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.send-code-button:disabled {
  color: #7a9b8a;
  opacity: 0.86;
}

.registration-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.primary-button,
.download-button {
  width: 100%;
  min-height: 48px;
  border-radius: var(--control-radius);
  background: var(--brand-green);
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0, 85, 39, 0.16);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.primary-button {
  min-height: 56px;
}

.primary-button:active,
.download-button:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(0, 85, 39, 0.14);
}

.primary-button:disabled,
.download-button:disabled {
  opacity: 0.62;
}

.registration-download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
  padding: 8px 16px;
  border: 1px solid rgba(11, 135, 68, 0.2);
  border-radius: var(--control-radius);
  background: #f3f7f5;
  color: #3f7158;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  box-shadow: none;
  transition: transform 120ms ease, border-color 120ms ease,
    background-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.registration-download-button__icon {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(11, 135, 68, 0.1);
  color: var(--brand-green);
  font-size: 15px;
  line-height: 1;
  place-items: center;
}

.registration-download-button:active {
  transform: translateY(1px);
  background: #eaf2ee;
}

.registration-download-button:disabled {
  opacity: 0.62;
}

.form-reward {
  color: var(--brand-green);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.withdrawal-viewport {
  height: 242px;
  padding: 8px 16px;
  overflow: hidden;
}

.withdrawal-track {
  display: flex;
  flex-direction: column;
  width: 100%;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.withdrawal-track.is-running {
  animation: withdrawal-loop var(--withdrawal-duration, 12s) linear infinite;
}

.withdrawal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  border-bottom: 1px solid var(--page-gray);
}

.withdrawal-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.withdrawal-avatar,
.testimonial-avatar {
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.withdrawal-avatar {
  width: 48px;
  height: 48px;
}

.withdrawal-copy {
  min-width: 0;
}

.withdrawal-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.withdrawal-time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.withdrawal-amount {
  flex: 0 0 auto;
  color: var(--brand-green);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

@keyframes withdrawal-loop {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, calc(-1 * var(--withdrawal-shift, 222px)), 0);
  }
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 107px);
  gap: 16px 12px;
  padding: 16px;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  border-radius: var(--control-radius);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.benefit-icon {
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  place-items: center;
}

.benefit-icon img {
  width: 24px;
  height: 24px;
}

.benefit-item--secure {
  color: #366fff;
  background: #f1f5ff;
}

.benefit-item--secure .benefit-icon {
  background: rgba(54, 111, 255, 0.08);
}

.benefit-item--stable {
  color: #ff9500;
  background: #fff8eb;
}

.benefit-item--stable .benefit-icon {
  background: #fff0d5;
}

.benefit-item--stable .benefit-icon img {
  width: 28px;
  height: 28px;
}

.benefit-item--returns {
  color: #0c8544;
  background: #e6fff2;
}

.benefit-item--returns .benefit-icon {
  background: rgba(12, 133, 68, 0.1);
}

.benefit-item--withdraw {
  color: #07baba;
  background: #edffff;
}

.benefit-item--withdraw .benefit-icon {
  background: #cff7f7;
}

/* Download */

body.download-page {
  background: #e9edef;
}

.download-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 375px;
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(64px + var(--safe-top)) var(--page-gutter)
    calc(96px + var(--safe-bottom));
  overflow: hidden;
  background: var(--page-gray);
}

@supports (min-height: 100dvh) {
  .download-shell {
    min-height: 100dvh;
  }
}

.download-glow {
  position: absolute;
  z-index: -1;
  top: calc(-155px + var(--safe-top));
  left: 50%;
  width: 530px;
  height: 530px;
  max-width: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.download-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.success-icon {
  width: 80px;
  height: 80px;
}

.download-title {
  color: var(--brand-green);
  font-family: "Poetsen One", "PingFang SC", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.bonus-card {
  min-height: 116px;
  margin-top: 16px;
  padding: 15px 16px;
  border-radius: var(--panel-radius);
  background: var(--brand-green);
  color: var(--white);
  box-shadow: var(--panel-shadow);
}

.bonus-label {
  font-size: 14px;
  font-weight: 700;
}

.bonus-amount {
  margin-top: 3px;
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.bonus-note {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.download-section {
  overflow: hidden;
  border-radius: var(--panel-radius);
  background: var(--white);
  box-shadow: var(--panel-shadow);
}

.download-section .section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 10px 16px;
  background: var(--brand-green-soft);
}

.testimonial-section {
  min-height: 203px;
  margin-top: 24px;
}

.testimonial-content {
  padding: 16px;
}

.testimonial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
}

.testimonial-identity {
  min-width: 0;
}

.testimonial-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.testimonial-meta {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.testimonial-stars {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
}

.testimonial-stars img {
  width: 16px;
  height: 16px;
}

.testimonial-quote {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--page-gray);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.advantages-section {
  min-height: 320px;
  margin-top: 16px;
}

.advantages-list {
  padding: 0 16px;
}

.advantage-item {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  border-bottom: 1px solid var(--page-gray);
}

.advantage-item:last-child {
  border-bottom: 0;
}

.advantage-item--reverse {
  flex-direction: row-reverse;
}

.advantage-item--reverse .advantage-copy {
  align-items: flex-end;
  text-align: right;
}

.advantage-icon {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  place-items: center;
}

.advantage-icon img {
  width: 32px;
  height: 32px;
}

.advantage-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.advantage-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.advantage-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.advantage-item--withdraw .advantage-icon {
  background: rgba(252, 124, 0, 0.2);
}

.advantage-item--withdraw .advantage-title {
  color: #fc7c00;
}

.advantage-item--users .advantage-icon {
  background: rgba(28, 174, 243, 0.2);
}

.advantage-item--users .advantage-title {
  color: #1caef3;
}

.advantage-item--returns .advantage-icon {
  background: rgba(11, 135, 68, 0.2);
}

.advantage-item--returns .advantage-title {
  color: var(--brand-green);
}

.download-button {
  position: fixed;
  z-index: 50;
  bottom: calc(16px + var(--safe-bottom));
  left: 50%;
  display: block;
  width: calc(100% - 32px - var(--safe-left) - var(--safe-right));
  max-width: 343px;
  margin: 0;
  transform: translateX(-50%);
}

.download-button:active {
  transform: translateX(-50%) translateY(1px);
}

/* Shared feedback */

.api-toast {
  position: absolute;
  z-index: 9999;
  left: max(16px, var(--safe-left));
  right: max(16px, var(--safe-right));
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--control-radius);
  background: rgba(0, 42, 19, 0.94);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
  box-shadow: 0 8px 24px rgba(0, 42, 19, 0.2);
}

.api-toast.is-visible {
  display: flex;
}

body.download-page .api-toast {
  position: fixed;
  top: auto !important;
  bottom: calc(80px + var(--safe-bottom));
  width: calc(100% - 32px);
  max-width: 343px;
  margin: 0 auto;
}

@media (max-width: 340px) {
  .register-hero__offer {
    width: 229px;
    height: 105px;
  }

  .register-hero__art {
    right: -45px;
    width: 195px;
    height: 195px;
  }

  .register-hero__subtitle {
    width: 170px;
    line-height: 1.05;
    white-space: normal;
  }

  .send-code-button {
    flex-basis: 72px;
    min-width: 72px;
    padding-left: 5px;
    font-size: 11px;
  }

  .form-field {
    padding-right: 12px;
    padding-left: 12px;
  }

  .testimonial-stars {
    gap: 1px;
  }

  .testimonial-stars img {
    width: 14px;
    height: 14px;
  }
}

@media (min-width: 600px) {
  body.register-page {
    background: #08763b;
  }

  body.download-page {
    background: #e5e9eb;
  }

  .register-shell,
  .download-shell {
    box-shadow: 0 0 32px rgba(0, 42, 19, 0.1);
  }
}

@media (hover: hover) and (pointer: fine) {
  .primary-button:hover:not(:disabled),
  .download-button:hover:not(:disabled) {
    background: #09763b;
    box-shadow: 0 8px 18px rgba(0, 85, 39, 0.2);
  }

  .registration-download-button:hover:not(:disabled) {
    border-color: rgba(11, 135, 68, 0.32);
    background: #eaf2ee;
  }

  .send-code-button:hover:not(:disabled) {
    color: #075f31;
  }
}

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

  .withdrawal-track.is-running {
    transform: none;
  }
}
