/* ============================================================
   pay.css — Payment / Donation page styles
   Load AFTER main.css
   ============================================================ */

/* Green accent theme for payment/money context */
:root {
  --accent:  #00c896;
  --accent2: #00a876;
  --glow:    rgba(0, 200, 150, 0.15);
}

/* Green-tinted grid */
body::before {
  background-image:
    linear-gradient(rgba(0,200,150,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,150,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

body {
  --particle-color: #00ff44;
}

/* ---- PAGE LAYOUT ---- */
.pay-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* Glowing orb — green tint */
.pay-orb {
  position: fixed;
  right: 5%;
  top: 40%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(0,200,150,0.15) 0%,
    rgba(0,200,150,0.05) 50%,
    transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  animation: orb-pulse 6s ease-in-out infinite;
  z-index: 0;
}

/* Secondary accent orb */
.pay-orb::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  top: -50px;
  left: -80px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(0,212,255,0.08) 0%,
    transparent 70%);
  animation: orb-pulse 6s ease-in-out infinite 2s;
}

@keyframes orb-pulse {
  0%, 100% { transform: translateY(-50%) scale(1) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(-50%) scale(1.08) rotate(15deg); opacity: 1; }
}

/* Floating coin animation */
.pay-orb::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: rgba(0,200,150,0.25);
  border-radius: 50%;
  top: 30%;
  right: 20%;
  box-shadow:
    30px -20px 0 2px rgba(0,200,150,0.12),
    -40px 30px 0 1px rgba(0,200,150,0.15),
    60px 10px 0 3px rgba(0,200,150,0.1),
    -20px -40px 0 2px rgba(0,200,150,0.08);
  animation: float-coins 12s linear infinite;
}
@keyframes float-coins {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
  50% { opacity: 1; }
  100% { transform: translateY(-120px) rotate(180deg); opacity: 0; }
}

/* ---- PAYMENT CARD ---- */
.pay-card {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: card-enter 0.6s ease both;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,200,150,0.05);
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Animated gradient bar */
.pay-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #00d4ff, var(--accent2), var(--accent));
  background-size: 300% 100%;
  animation: bar-flow 4s linear infinite;
}
@keyframes bar-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Card corner accents */
.pay-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, transparent 50%, rgba(0,200,150,0.04) 50%);
  pointer-events: none;
}

.pay-card-header {
  padding: 2rem 2rem 1.4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.pay-card-header .hero-tag {
  margin-bottom: 0.8rem;
  border-color: rgba(0,200,150,0.3);
  animation: none;
}

.pay-card-header h1 {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.pay-card-header p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---- REASON BANNER ---- */
.pay-reason-banner {
  display: none;
  margin: 1.2rem 2rem 0;
  padding: 0.9rem 1rem;
  background: rgba(0,200,150,0.05);
  border: 1px solid rgba(0,200,150,0.15);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}
.pay-reason-banner.visible { display: block; }

.pay-reason-banner .reason-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

/* ---- FORM ---- */
.pay-form {
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.pay-form .form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.pay-form label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.amount-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.amount-prefix {
  position: absolute;
  left: 1rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  pointer-events: none;
  user-select: none;
}
.amount-wrap input {
  padding-left: 2.8rem;
  width: 100%;
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
.amount-lock {
  position: absolute;
  right: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  display: none;
}
.amount-lock.visible { display: block; }

/* Quick-pick amounts */
.quick-amounts {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.quick-btn {
  flex: 1;
  min-width: 60px;
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}
.quick-btn::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: rgba(0,200,150,0.1);
  transition: height 0.2s;
}
.quick-btn:hover::before, .quick-btn.active::before {
  height: 100%;
}
.quick-btn:hover, .quick-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}
.quick-btn.active {
  box-shadow: 0 0 10px rgba(0,200,150,0.15);
}

/* ---- PAY BUTTON ---- */
.pay-btn {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
}
.pay-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.pay-btn:hover::after { transform: translateX(100%); }
.pay-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 40px rgba(0,200,150,0.3);
  transform: translateY(-1px);
}
.pay-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  background: var(--accent);
  transform: none;
}
.pay-btn:disabled::after { display: none; }

/* ---- SECURITY BADGES ---- */
.pay-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid rgba(30,45,64,0.4);
}
.badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(0,200,150,0.4);
}

/* ---- BELOW CARD ---- */
.pay-sub {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  max-width: 360px;
  line-height: 1.7;
}
.pay-sub a {
  color: var(--accent);
  text-decoration: none;
}
.pay-sub a:hover { text-decoration: underline; }

/* ---- SUCCESS STATE ---- */
.pay-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  gap: 1rem;
}
.pay-success.visible { display: flex; }

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0,200,150,0.08);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
  animation: success-pop 0.5s ease both;
}
.success-icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(0,200,150,0.15);
  animation: success-ring 1.5s ease-in-out infinite;
}
@keyframes success-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes success-ring {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0; }
}

.pay-success h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.pay-success p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* ---- ERROR CARD ---- */
.pay-error-card {
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.error-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #ef4444;
  font-weight: bold;
}
.pay-error-card h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.pay-error-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 280px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 520px) {
  .pay-card-header, .pay-form { padding-left: 1.4rem; padding-right: 1.4rem; }
  .pay-badges { flex-wrap: wrap; gap: 0.6rem; }
  .pay-reason-banner { margin-left: 1.4rem; margin-right: 1.4rem; }
  .pay-card { max-width: 100%; border-radius: 10px; }
}
