:root {
  --card-width: 420px;
  --card-pad: 28px;
  --radius: 12px;
  --muted: #666;
  font-family: "Cal Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

html,
body {
  height: 100%;
  margin: 0;
  /* background-image: linear-gradient(45deg, #00ff00, yellow, gold); */
  /* background: radial-gradient(circle at center, #071026, #03040a); */
  background-attachment: fixed;
  color: #111;

}

.page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.card {
  width: min(var(--card-width), 90vw);
  max-width: 90%;
  background: #fff;
  border-radius: var(--radius);
  padding: var(--card-pad);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  text-align: center;
  position: relative;
  box-sizing: border-box;
}

.card-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

/* brand in top-left of card */
.brand {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.brand-name {
  font-weight: 600;
  font-size: 14px;
  color: transparent;
  line-height: 1;
  background: linear-gradient(135deg, #007BFF, #FF00FF);
  -webkit-background-clip: text;
  background-clip: text;
}

h1 {
  margin: 0 0 14px 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* =========================
   PAYMENT AMOUNT SECTION
   ========================= */
.amount-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ✅ updated to be responsive and contained */
.amount-display {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e6e6e6;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fafafa;
  width: 100%;
  box-sizing: border-box;
  /* ensures padding fits within width */
  overflow: hidden;
  /* prevents overflow */
}

.amount-display .currency {
  font-weight: 700;
  color: #222;
}

/* ✅ fully responsive input */
#amount {
  flex: 1;
  /* takes available space */
  min-width: 0;
  /* prevents overflow in flex */
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  width: auto;
  /* removes fixed width */
  text-align: left;
  /* keep text alignment consistent */
  max-width: 150px;
  /* optional: limit for large screens */
}

.note {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  margin-top: 14px;
}

.cancel {
  color: #444;
  text-decoration: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all .14s ease;
  font-size: 14px;
}

.cancel:hover {
  transform: none;
  text-decoration: underline;
}

.small {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* accessibility helper */
.sr-only {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  /* background: radial-gradient(circle at center, #071026, #03040a); */
  /* background: radial-gradient(circle at center, #220742, #0a030a); */
  /* background: linear-gradient(180deg, #03040a 0%, #071026 60%); */

  /* background: linear-gradient(180deg, #0a030a 0%, #220742 60%) ; */

  background: linear-gradient(180deg, #0a030a 0%, #2d045f 60%); 
}

/* Newly Added Css */
.floating-donate {
  position: fixed;
  top: 14px;
  left: 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  color: #111;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  font-family: "Cal Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.floating-donate .donate-icon {
  color: #d9534f;
}

/* layout for donate page: keep two-column on wide screens */
.donate-page {
  display: grid;
  place-items: center;
  gap: 20px;
  align-items: start;
  width: 100%;
  margin: 0 auto;
  padding: 28px;
}

/* Left poster block removed in HTML; keep donate-controls styling */
.donate-controls {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  width: min(var(--card-width), 96vw);
  /* max-width: 90%; */
}

/* Top banner inside donate card */
.donate-banner {
  position: relative;
  height: 84px;
  margin: -18px -18px 0;
  /* extend banner to card edges */
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donate-banner .banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #37008f, #ff0080);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow: hidden;
}

.donate-banner .banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* Makes it cover the entire container */
  object-position: center;  /* Always show the center */
}

.banner-logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
  position: relative;
  z-index: 2;
  transform: translateY(20%);
  /* push half into the card */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.donate-title-row .brand-name {
  display: inline-block;
  font-weight: 700;
  color: #111;
  line-height: 1;
  font-family: "Cal Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* poster placed inside the donate card */
.poster-inside {
  margin-top: 8px;
  margin-bottom: 12px;
  text-align: center;
}

.poster-inside img {
  width: 100%;
  margin-inline: auto;
  border-radius: 8px;
  display: block;
}

.slider-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

#donation-range {
  width: 100%;
}

.custom-amount {
  display: flex;
  gap: 8px;
  align-items: center;
}

#donation-amount {
  width: 110px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e6e6e6;
  text-align: center;
  font-weight: 600;
}

.donate-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

.read-more {
  margin-top: 12px;
  text-align: left;
}

.collapsible {
  background: transparent;
  border: 0;
  color: #0b66ff;
  cursor: pointer;
  padding: 0;
  font-weight: 600;
}

.goals-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.goal-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fafafa;
  padding: 10px;
  border-radius: 8px;
}

.goal-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.celebration {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 14px;
  opacity: 0.95;
  will-change: transform, opacity;
  animation: confetti-fall 1600ms linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(110vh) translateX(200px) rotate(360deg);
    opacity: 0;
  }
}

/* ===============================
   ✅ Mobile & Tablet Responsive Centering
   =============================== */
@media (max-width: 900px) {
  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    min-height: 100vh;
  }

  .donate-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 90%;
    min-height: 100vh;
  }

  .donate-controls {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    padding: 20px 16px;
  }

  .donate-banner {
    border-radius: 0;
    margin: 0;
  }

  .banner-logo {
    width: 72px;
    height: 72px;
    transform: translateY(15%);
  }

  .floating-donate {
    left: 10px;
    top: 10px;
  }
}

/* Extra fine-tuning for smaller mobile screens */
@media (max-width: 600px) {
  .donate-controls {
    padding: 16px 12px;
    border-radius: 0;
    width: 100%;
  }

  .donate-title-row .brand-name {
    font-size: 14px;
  }

  .donate-sub {
    font-size: 12px;
    line-height: 1.4;
  }

  #donation-amount {
    width: 100%;
  }

  .slider-row {
    flex-direction: column;
    align-items: stretch;
  }

  .custom-amount {
    justify-content: center;
  }
}
