/* ═══════════════════════════════════════════
   SylStudio Donasi — redeem.php style
   ═══════════════════════════════════════════ */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: 'Plus Jakarta Sans', sans-serif; }

body {
  background: linear-gradient(160deg, #FFF0F6 0%, #FFE4ED 30%, #FFF8FA 60%, #F0F0FF 100%);
  background-attachment: fixed;
  color: #1F1F2E;
  min-height: 100vh; min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.2rem, env(safe-area-inset-top)) 1rem 2rem;
}

/* Floating decorative blobs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(236,72,153,0.08) 0%, transparent 70%);
  top: -80px; right: -60px;
}
body::after {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(244,114,182,0.06) 0%, transparent 70%);
  bottom: -100px; left: -80px;
}

.wrap { width: 100%; max-width: 400px; margin: 0 auto; }

/* ── Card ── */
.card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 28px;
  border: 1px solid rgba(236, 72, 153, 0.08);
  box-shadow:
    0 20px 60px -16px rgba(236, 72, 153, 0.18),
    0 4px 16px -4px rgba(236, 72, 153, 0.06);
}
.card-inner { padding: 28px 24px; }

/* ── Section heading ── */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.section-accent {
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, #F472B6, #DB2777);
  border-radius: 99px;
  flex-shrink: 0;
}
.section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b7a86;
}
.section-title span { color: #1F1F2E; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 8px 0 18px;
}
.hero-icon-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
}
.hero-icon-bg {
  width: 100%; height: 100%;
  border-radius: 22px;
  background: linear-gradient(135deg, #F472B6, #EC4899, #DB2777);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px -8px rgba(236, 72, 153, 0.45);
  position: relative;
  z-index: 1;
  font-size: 1.6rem;
}
.hero-icon-glow {
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(236,72,153,0.20) 0%, transparent 70%);
  z-index: 0;
  animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
.hero-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #1F1F2E, #EC4899 70%, #DB2777);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 12px;
  font-weight: 600;
  color: #B08A9E;
  margin-top: 5px;
  line-height: 1.5;
}

/* ── Form ── */
.form-group { margin-bottom: 18px; }
.form-group:last-of-type { margin-bottom: 22px; }
.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #EC4899;
  margin-bottom: 7px;
}
.form-label svg { width: 12px; height: 12px; flex-shrink: 0; }

.input-wrap { position: relative; }
.input-field {
  background: #FFF7FA;
  border: 1.5px solid #FFE4ED;
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
  outline: none;
  font-size: 14px;
  font-weight: 600;
  color: #1F1F2E;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.25s;
}
.input-field:focus {
  border-color: #EC4899;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.10);
  background: #FFFFFF;
}
.input-field::placeholder { color: #D4A0B5; font-weight: 500; }
.input-field--icon { padding-left: 42px; }

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #D4A0B5;
  pointer-events: none;
  transition: color 0.25s;
}
.input-wrap:focus-within .input-icon { color: #EC4899; }

/* Custom amount */
.custom-amount .input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #EC4899;
}
.custom-amount .input-field { padding-left: 42px; }

/* ── Button ── */
.btn-redeem {
  position: relative;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #F472B6 0%, #EC4899 50%, #DB2777 100%);
  color: white;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 12px 28px -8px rgba(236, 72, 153, 0.50);
  transition: all 0.25s;
  overflow: hidden;
}
.btn-redeem:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -8px rgba(236, 72, 153, 0.55); }
.btn-redeem:active { transform: scale(0.97); }
.btn-redeem:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.btn-redeem .btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.btn-redeem .btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-redeem:hover .btn-shine { transform: translateX(100%); }
.btn-redeem .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-redeem.loading .btn-text { visibility: hidden; }
.btn-redeem.loading .btn-spinner { display: block; position: absolute; }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 18px 0 4px;
}
.footer-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #D4A0B5;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-back:hover { color: #EC4899; }
.footer-copy {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: #E8C8D4;
  margin-top: 8px;
}

/* ── QRIS Page ── */
.qris-image-wrapper {
  width: 220px; height: 220px;
  margin: 0 auto 16px;
  padding: 12px;
  background: #FFF7FA;
  border: 1.5px solid #FFE4ED;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
}
.qris-image { max-width: 100%; max-height: 100%; }
.qris-placeholder { color: #D4A0B5; font-weight: 600; font-size: 13px; text-align: center; }

.qris-amount { text-align: center; margin-bottom: 16px; }
.amount-label {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: #B08A9E;
}
.amount-value {
  display: block;
  font-size: 1.6rem; font-weight: 800;
  color: #EC4899;
  margin-top: 2px;
}

.qris-details {
  background: #FFF7FA;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.qris-details .detail-row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 12px; font-weight: 600;
  border-bottom: 1px solid rgba(236, 72, 153, 0.06);
}
.qris-details .detail-row:last-child { border-bottom: none; }
.qris-details .detail-label { color: #B08A9E; }
.qris-details .detail-value { color: #1F1F2E; font-weight: 700; text-align: right; max-width: 55%; }

.qris-status {
  text-align: center;
  padding: 12px;
  background: #FFF7FA;
  border-radius: 14px;
  margin-bottom: 14px;
}
.status-indicator {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 13px;
}
.status-indicator.pending { color: #F59E0B; }
.status-indicator.success { color: #10B981; }
.status-indicator.failed { color: #EF4444; }
.status-dot {
  display: inline-block;
  width: 10px; height: 10px;
  background: #F59E0B;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
.status-icon { font-size: 1.1rem; }

.qris-supported {
  text-align: center;
  margin-bottom: 14px;
  font-size: 10px; font-weight: 600; color: #D4A0B5;
}

.qris-actions {
  display: flex; gap: 10px;
}
.qris-actions .btn-redeem { flex: 1; font-size: 12px; padding: 14px; }
.qris-actions .btn-outline-redeem {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px;
  border-radius: 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  background: transparent;
  border: 1.5px solid rgba(236,72,153,0.15);
  color: #EC4899;
  text-decoration: none;
  transition: all 0.2s;
}
.qris-actions .btn-outline-redeem:hover {
  background: rgba(236,72,153,0.05);
  border-color: #EC4899;
}

/* ── Success Page ── */
.success-icon { font-size: 3rem; text-align: center; margin-bottom: 12px; }
.success-card { text-align: center; }
.success-card h1 {
  font-size: 1.3rem; font-weight: 800;
  color: #10B981;
  margin-bottom: 6px;
}
.success-subtitle {
  font-size: 12px; font-weight: 600; color: #B08A9E;
  margin-bottom: 20px;
}

.success-details {
  background: #FFF7FA;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
  text-align: left;
}
.success-details .detail-row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 12px; font-weight: 600;
  border-bottom: 1px solid rgba(236, 72, 153, 0.06);
}
.success-details .detail-row:last-child { border-bottom: none; }
.success-details .detail-label { color: #B08A9E; }
.success-details .detail-value { color: #1F1F2E; font-weight: 700; text-align: right; max-width: 55%; }
.success-details .highlight-row .detail-value { color: #10B981; font-size: 1.1rem; }

/* ── Error Page ── */
.error-icon { font-size: 2.5rem; text-align: center; margin-bottom: 12px; }
.error-card { text-align: center; }
.error-card h1 {
  font-size: 1.2rem; font-weight: 800;
  color: #1F1F2E;
  margin-bottom: 6px;
}
.error-card p {
  font-size: 12px; font-weight: 600; color: #B08A9E;
  margin-bottom: 16px;
}

/* ── Animations ── */
.fade-up { opacity: 0; transform: translateY(18px); animation: fu 0.65s cubic-bezier(0.16,1,0.3,1) forwards; }
@keyframes fu { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.14s; }
.d3 { animation-delay: 0.23s; } .d4 { animation-delay: 0.32s; }

/* ── Hidden ── */
.hidden { display: none !important; }

/* Ripple (from redeem.js) */
@keyframes rippleAnim { to { transform: scale(2.5); opacity: 0; } }

/* ── Responsive ── */
@media (max-width: 420px) {
  .card-inner { padding: 24px 20px; }
  .hero-icon-wrap { width: 60px; height: 60px; }
  .hero-icon-bg { font-size: 1.4rem; }
  .hero-title { font-size: 1.25rem; }
  .btn-redeem { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-icon-glow, .fade-up { animation: none; opacity: 1; }
  .btn-redeem .btn-shine { display: none; }
}
