/* Донат-страница Code5. Дополняет styles.css. Fallback-значения переменных заданы,
   чтобы страница выглядела хорошо, даже если в styles.css другие имена. */

:root {
  --d-gold: var(--gold, #edff84);
  --d-gold-soft: var(--gold-soft, rgba(237, 255, 132, 0.4));
  --d-pink: #fd9cdc;
  --d-text: var(--text, #f4f4f4);
  --d-muted: var(--muted, #9a9a9a);
  --d-surface: var(--surface, #0d0d0f);
  --d-line: var(--line-strong, rgba(255, 255, 255, 0.12));
  --d-ink: #060606;
}

/* ---------- Раскладка ---------- */
.donate {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: 84px;
}

.donate-copy {
  max-width: 620px;
}

.grad {
  background: linear-gradient(100deg, var(--d-pink), var(--d-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead b {
  color: var(--d-text);
}

/* ---------- Список плюшек ---------- */
.perks {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--d-text);
  font-size: 15px;
  font-weight: 600;
}

.tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: var(--d-ink);
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--d-pink), var(--d-gold));
}

/* ---------- Карточка ---------- */
.donate-card {
  position: relative;
  min-width: 0;
  padding: 30px;
  background:
    radial-gradient(120% 90% at 90% -10%, rgba(253, 156, 220, 0.12), transparent 55%),
    radial-gradient(120% 90% at -10% 110%, rgba(237, 255, 132, 0.1), transparent 55%),
    var(--d-surface);
  border: 1px solid var(--d-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

/* Мягкое свечение по верхней кромке */
.donate-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--d-gold-soft), transparent);
}

.card-glow {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(253, 156, 220, 0.35), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  animation: floaty 7s ease-in-out infinite;
}

@keyframes floaty {
  50% { transform: translate(-14px, 16px) scale(1.08); }
}

.card-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-kicker {
  margin: 0;
  color: var(--d-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-name {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, var(--d-pink), var(--d-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.forever {
  flex: none;
  padding: 6px 12px;
  color: var(--d-ink);
  background: linear-gradient(135deg, var(--d-pink), var(--d-gold));
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Цена ---------- */
.price {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 22px 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--d-line);
}

.price-num {
  font-size: 60px;
  line-height: 1;
  font-weight: 900;
  color: var(--d-text);
  text-shadow: 0 0 30px rgba(237, 255, 132, 0.25);
}

.price-star {
  font-size: 30px;
  animation: twinkle 2.4s ease-in-out infinite;
}

@keyframes twinkle {
  50% { transform: scale(1.18) rotate(8deg); filter: brightness(1.25); }
}

.price-cur {
  margin-left: auto;
  color: var(--d-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Поле ника ---------- */
.field-label {
  margin: 0 0 10px;
  color: var(--d-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nick-input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  color: var(--d-text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--d-line);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.nick-input::placeholder { color: rgba(255, 255, 255, 0.28); }

.nick-input:focus {
  border-color: var(--d-pink);
  box-shadow: 0 0 0 3px rgba(253, 156, 220, 0.18);
}

.nick-error {
  min-height: 16px;
  margin: 8px 0 16px;
  color: #ff6b6b;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Кнопка оплаты ---------- */
.pay-btn {
  position: relative;
  width: 100%;
  height: 56px;
  color: var(--d-ink);
  background: linear-gradient(100deg, var(--d-pink), var(--d-gold));
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 14px 36px -14px rgba(253, 156, 220, 0.7);
  transition: transform 120ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.pay-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -14px rgba(253, 156, 220, 0.85);
  filter: brightness(1.04);
}

.pay-btn:active:not(:disabled) { transform: translateY(0); }

/* блик, пробегающий по кнопке */
.pay-btn:not(:disabled)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: sheen 3.2s ease-in-out infinite;
}

@keyframes sheen {
  0%, 62% { left: -60%; }
  100% { left: 130%; }
}

.pay-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--d-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.pay-hint {
  margin: 14px 0 0;
  color: var(--d-muted);
  font-size: 12px;
  text-align: center;
}

/* ---------- Фокус для доступности ---------- */
.nick-input:focus-visible,
.pay-btn:focus-visible {
  outline: 2px solid var(--d-pink);
  outline-offset: 3px;
}

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .donate {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 560px) {
  .donate-card { padding: 22px; }
  .price-num { font-size: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-glow, .price-star, .pay-btn::after { animation: none; }
}
