:root {
  --bg: #06101b;
  --panel: rgba(8, 17, 28, 0.92);
  --panel-strong: rgba(15, 29, 45, 0.9);
  --line: rgba(109, 153, 200, 0.42);
  --text: #eef6ff;
  --muted: #9eb7d6;
  --brand: #81f0d0;
  --accent: #1f7ed8;
  --ember: #ffb21f;
  --ember-hot: #ff6a00;
  --ok: #9cf6b3;
  --warn: #ffd37b;
  --danger: #ffb2b2;
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 16px "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(31, 126, 216, 0.22), transparent 32%),
    radial-gradient(circle at 86% 70%, rgba(129, 240, 208, 0.2), transparent 30%),
    linear-gradient(135deg, #06101b 0%, #081623 48%, #031018 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: -25%;
  z-index: -3;
  background-image:
    linear-gradient(rgba(129, 240, 208, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 240, 208, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 76%);
  animation: checkout-grid-drift 18s linear infinite;
}

body::after {
  width: min(46vw, 520px);
  height: min(46vw, 520px);
  right: -8vw;
  bottom: -12vh;
  z-index: -2;
  border-radius: 999px;
  background: rgba(129, 240, 208, 0.26);
  filter: blur(76px);
  animation: checkout-float-two 12s ease-in-out infinite;
}

.checkout-language {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(16, 27, 42, 0.94);
}

.checkout-language button {
  min-width: 40px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.checkout-language button.active {
  color: #08231a;
  background: var(--brand);
  border-color: var(--brand);
}

.hidden {
  display: none !important;
}

.checkout-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  isolation: isolate;
}

.checkout-shell::before,
.checkout-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(74px);
}

.checkout-shell::before {
  width: 410px;
  height: 410px;
  left: 4%;
  top: 8%;
  background: rgba(31, 126, 216, 0.52);
  animation: checkout-float-one 10s ease-in-out infinite;
}

.checkout-shell::after {
  width: 300px;
  height: 300px;
  left: 46%;
  top: 30%;
  background: rgba(255, 106, 0, 0.24);
  animation: checkout-pulse-center 7s ease-in-out infinite;
}

.checkout-card {
  position: relative;
  width: min(640px, 100%);
  padding: clamp(24px, 4vw, 34px);
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 178, 31, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(15, 29, 45, 0.93), rgba(8, 17, 28, 0.95));
  box-shadow:
    0 30px 120px rgba(0, 0, 0, 0.42),
    inset 0 0 46px rgba(255, 178, 31, 0.03);
  overflow: hidden;
  animation: checkout-panel-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.checkout-card::before {
  content: "";
  position: absolute;
  left: clamp(22px, 4vw, 34px);
  right: clamp(22px, 4vw, 34px);
  top: 0;
  width: auto;
  height: 1px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 178, 31, 0.86), transparent 38%),
    linear-gradient(90deg, transparent, rgba(255, 178, 31, 0.74), transparent);
  box-shadow:
    0 0 28px rgba(255, 178, 31, 0.26),
    0 12px 32px rgba(255, 106, 0, 0.12);
  opacity: 0.72;
  pointer-events: none;
}

.checkout-card::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 118px;
  width: 7px;
  height: 14px;
  border-radius: 70% 70% 70% 18%;
  background:
    radial-gradient(circle at 45% 28%, #fff6b0 0 18%, transparent 20%),
    linear-gradient(180deg, #ffe45e 0%, #ff9f1c 48%, #ff5a00 100%);
  box-shadow: 0 0 12px rgba(255, 178, 31, 0.64);
  pointer-events: none;
  animation: checkout-spark 8.4s linear infinite 1s;
}

.success-card {
  border-color: rgba(129, 240, 208, 0.24);
}

.checkout-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.checkout-mark {
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(129, 240, 208, 0.34);
  background: #0e1622;
  box-shadow:
    0 0 28px rgba(129, 240, 208, 0.12),
    inset 0 0 18px rgba(255, 178, 31, 0.04);
}

.checkout-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-title {
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(129, 240, 208, 0.14);
}

.checkout-subtitle {
  color: var(--ember);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.checkout-copy h1 {
  position: relative;
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0;
}

.checkout-copy h1::after {
  content: "";
  display: block;
  width: min(210px, 62%);
  height: 7px;
  margin-top: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 178, 31, 0.94), transparent 34%),
    linear-gradient(90deg, transparent, rgba(255, 106, 0, 0.78), transparent);
  box-shadow:
    0 0 24px rgba(255, 178, 31, 0.25),
    0 10px 28px rgba(255, 106, 0, 0.16);
}

.checkout-copy p,
.checkout-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.summary-panel {
  position: relative;
  margin: 24px 0 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 178, 31, 0.16);
  background:
    linear-gradient(180deg, rgba(22, 40, 61, 0.72), rgba(9, 18, 30, 0.82)),
    radial-gradient(circle at 16% 0%, rgba(129, 240, 208, 0.08), transparent 44%);
  overflow: hidden;
}

.summary-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 178, 31, 0), rgba(255, 178, 31, 0.82), rgba(255, 106, 0, 0));
  box-shadow: 0 0 18px rgba(255, 178, 31, 0.18);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.summary-row + .summary-row {
  border-top: 1px solid rgba(151, 172, 201, 0.14);
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  text-align: right;
}

.checkout-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #496480;
  background: #16283d;
  color: var(--text);
}

.checkout-banner.error {
  border-color: #7a4952;
  background: #351d22;
  color: var(--danger);
}

.checkout-form {
  display: grid;
  gap: 12px;
}

.site-checkout {
  display: grid;
  gap: 16px;
}

.checkout-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 14, 24, 0.72);
}

.checkout-tabs button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.checkout-tabs button.active {
  color: #08231a;
  border-color: var(--brand);
  background: var(--brand);
  font-weight: 700;
  box-shadow: 0 0 24px rgba(129, 240, 208, 0.16);
}

.checkout-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.94rem;
}

.checkout-field input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(7, 14, 24, 0.82);
  font: inherit;
}

.checkout-field input:focus {
  border-color: var(--brand);
}

.checkout-field input.input-invalid {
  border-color: #fb7185;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.12);
}

.checkout-field input.input-invalid:focus {
  border-color: #fb7185;
}

.checkout-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.checkout-hint.checkout-hint-error {
  color: #fca5a5;
}

.checkout-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.checkout-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.checkout-button {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--brand);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2), transparent 34%),
    var(--brand);
  color: #08231a;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
  box-shadow:
    0 12px 32px rgba(129, 240, 208, 0.12),
    inset 0 0 18px rgba(255, 255, 255, 0.1);
}

.checkout-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.checkout-button.secondary {
  margin-top: 18px;
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.checkout-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.checkout-note {
  margin-top: 14px;
  font-size: 0.95rem;
}

.checkout-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(151, 172, 201, 0.14);
}

.checkout-legal-links a {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.checkout-legal-links a:hover {
  color: var(--text);
  border-color: rgba(129, 240, 208, 0.28);
}

@keyframes checkout-panel-rise {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes checkout-grid-drift {
  to {
    transform: translate3d(48px, 48px, 0);
  }
}

@keyframes checkout-float-one {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(24px, 18px, 0) scale(1.08);
  }
}

@keyframes checkout-float-two {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-18px, -18px, 0) scale(1.06);
  }
}

@keyframes checkout-pulse-center {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.36;
    transform: scale(1.08);
  }
}

@keyframes checkout-spark {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) rotate(-18deg) scale(0.4);
  }
  10% {
    opacity: 0;
  }
  18% {
    opacity: 0.9;
  }
  52% {
    opacity: 0.85;
    transform: translate3d(46px, -56px, 0) rotate(20deg) scale(0.82);
  }
  72% {
    opacity: 0;
    transform: translate3d(72px, -104px, 0) rotate(44deg) scale(0.54);
  }
  100% {
    opacity: 0;
    transform: translate3d(72px, -104px, 0) rotate(44deg) scale(0.54);
  }
}

@media (max-width: 640px) {
  .checkout-language {
    position: static;
    width: fit-content;
    margin: 14px 14px 0 auto;
  }

  .checkout-card {
    padding: 22px;
  }

  .summary-row {
    flex-direction: column;
  }

  .summary-row strong {
    text-align: left;
  }
}
