:root {
  color-scheme: light;
  --page-bg: #fff9e8;
  --surface: #ffffff;
  --ink: #141614;
  --muted: #6b6252;
  --line: #f1d98c;
  --accent: #f4b506;
  --accent-dark: #d99b00;
  --accent-soft: #ffe7a3;
  --gold: #ffcf38;
  --shadow: 0 28px 80px rgba(119, 82, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 25% 20%, rgba(244, 181, 6, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(255, 223, 102, 0.34), transparent 42%),
    linear-gradient(315deg, rgba(255, 244, 191, 0.95), transparent 40%),
    var(--page-bg);
  background-position: 16% 14%, 0% 0%, 100% 100%, 0 0;
  background-size: 140% 140%, 180% 180%, 160% 160%, auto;
  animation:
    pageFadeIn 900ms ease both,
    backgroundFlow 18s ease-in-out infinite alternate;
}

a {
  color: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px 64px;
  animation: shellFloatIn 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.payment-card {
  width: min(100%, 520px);
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(244, 181, 6, 0.42);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: cardEnter 760ms 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand-label {
  margin: 0 0 16px;
  color: #9d7100;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  animation: contentRise 640ms 260ms ease both;
}

.payment-card h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.05;
  animation: contentRise 640ms 330ms ease both;
}

.lead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  animation: contentRise 640ms 400ms ease both;
}

.ad-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(244, 181, 6, 0.5);
  border-radius: 8px;
  color: #181300;
  background: #fff7d8;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(244, 181, 6, 0.16);
  animation: contentRise 640ms 540ms ease both;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ad-banner:hover,
.ad-banner:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: #ffefb8;
  box-shadow: 0 14px 32px rgba(244, 181, 6, 0.24);
}

.ad-banner-arrow {
  margin-left: 12px;
  color: #9d7100;
  font-size: 18px;
  line-height: 1;
}

.payment-actions {
  display: grid;
  gap: 14px;
  margin-top: 32px;
  animation: contentRise 640ms 470ms ease both;
}

.payment-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 18px 20px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: #181300;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(244, 181, 6, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.payment-button:hover,
.payment-button:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.02);
  box-shadow: 0 18px 42px rgba(244, 181, 6, 0.36);
}

.payment-button.secondary {
  color: var(--ink);
  background: rgba(255, 251, 237, 0.96);
  border-color: rgba(244, 181, 6, 0.4);
  box-shadow: none;
}

.payment-button.secondary:hover,
.payment-button.secondary:focus-visible {
  background: #fff2bd;
  border-color: var(--accent);
}

.button-hint {
  color: inherit;
  opacity: 0.72;
  font-size: 14px;
  font-weight: 600;
}

.note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  animation: contentRise 640ms 540ms ease both;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 28px;
  color: rgba(107, 98, 82, 0.78);
  font-size: 11px;
  line-height: 1.35;
  animation: contentRise 640ms 610ms ease both;
}

.legal-links a {
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: #9d7100;
  opacity: 1;
}

.made-by {
  display: block;
  margin: 26px auto 0;
  color: rgba(107, 98, 82, 0.58);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  animation: contentRise 640ms 680ms ease both;
  transition: color 160ms ease, opacity 160ms ease;
}

.made-by:hover,
.made-by:focus-visible {
  color: #9d7100;
  opacity: 1;
}

.placeholder-link {
  display: inline-flex;
  margin-top: 26px;
  color: #9d7100;
  font-weight: 800;
  text-decoration: none;
}

.payment-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  animation: contentRise 640ms 470ms ease both;
}

.amount-field {
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.amount-input-wrap {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(244, 181, 6, 0.48);
  border-radius: 8px;
  background: rgba(255, 251, 237, 0.96);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.amount-input-wrap:focus-within {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(244, 181, 6, 0.16);
}

.amount-input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
}

.amount-input-wrap input::placeholder {
  color: rgba(107, 98, 82, 0.46);
}

.amount-input-wrap span {
  margin-left: 10px;
  color: #9d7100;
  font-size: 21px;
  font-weight: 800;
}

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

.form-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(191, 27, 27, 0.24);
  border-radius: 8px;
  color: #8f1414;
  background: #fff1f1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.payment-submit {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.payment-submit:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.payment-submit:disabled:hover,
.payment-submit:disabled:focus-visible {
  filter: grayscale(0.35);
  transform: none;
  box-shadow: none;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes backgroundFlow {
  0% {
    background-position: 16% 14%, 0% 0%, 100% 100%, 0 0;
  }
  50% {
    background-position: 72% 26%, 36% 58%, 76% 34%, 0 0;
  }
  100% {
    background-position: 42% 82%, 100% 18%, 22% 74%, 0 0;
  }
}

@keyframes shellFloatIn {
  from {
    transform: translateY(16px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes contentRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .payment-button {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .page-shell,
  .payment-card,
  .brand-label,
  .payment-card h1,
  .lead,
  .ad-banner,
  .payment-actions,
  .note,
  .legal-links,
  .made-by {
    animation: none;
  }

  .payment-button {
    transition: none;
  }

  .payment-form {
    animation: none;
  }
}
