:root {
  --color-background: hsl(210, 20%, 98%); /* Very light blue/off-white */
  --color-primary: hsl(330, 70%, 60%); /* Soft pink */
  --color-primary-hover: hsl(330, 70%, 50%); /* Darker pink for hover */
  --color-secondary: hsl(210, 10%, 30%); /* Dark grey/blue for text */
  --color-text-light: hsl(210, 5%, 50%); /* Lighter grey for secondary text */
  --color-gold-accent: hsl(40, 80%, 70%); /* Gold accent */
  --color-white: #ffffff;
  --color-border: hsl(210, 10%, 90%);
  /* Updated notification background to use primary color */
  --color-notification-bg: var(--color-primary);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  color: var(--color-secondary);
  background-color: var(--color-background);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 90px; /* Increased space for fixed button */
}

.header {
  background-color: var(--color-white);
  padding: 1.5rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--color-border);
}

.header-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.institute-logo {
  height: 60px; /* Adjust size as needed */
  width: auto;
  margin-bottom: 0.5rem;
}

.campaign-name {
  font-family: "Montserrat", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.beneficiary-image {
  width: 250px; /* Increased size */
  height: 250px; /* Increased size */
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-gold-accent);
  box-shadow: 0 0 0 8px rgba(var(--color-gold-accent), 0.2);
}

.main-content {
  flex-grow: 1;
  padding: 2rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.hero-visuals-section,
.donation-progress-section,
.story-section,
.donation-details {
  background-color: var(--color-white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  margin-bottom: 2rem; /* Space between sections */
}

.impactful-title {
  font-family: "Montserrat", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-visuals-section .beneficiary-image {
  margin-bottom: 1.5rem; /* Space below image */
}

.story-text {
  font-family: "Open Sans", sans-serif;
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Base Button Styles */
.btn-base {
  display: inline-block;
  color: var(--color-white);
  border-radius: 8px;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

/* Specific Donate Button (main CTA) */
.donate-button {
  background-color: var(--color-primary);
  padding: 1.8rem 3.5rem; /* Further increased padding */
  font-size: 1.6rem; /* Further increased font size */
  box-shadow: 0 6px 15px rgba(var(--color-primary), 0.3);
}
.donate-button:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-3px);
}
.donate-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(var(--color-primary), 0.3);
}

/* Fixed Donate Button (overrides/adds to .donate-button) */
.fixed-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 999;
  padding: 1.8rem 3.5rem; /* Keep original padding for full width */
  font-size: 1.6rem; /* Keep original font size for full width */
}

/* Copy Button */
.copy-button {
  background-color: var(--color-primary); /* Consistent with main CTA */
  padding: 1rem 2rem;
  font-size: 1.1rem;
  box-shadow: 0 6px 15px rgba(var(--color-primary), 0.3);
}
.copy-button:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-3px);
}
.copy-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(var(--color-primary), 0.3);
}
.copy-button.copied {
  background-color: #28a745; /* Green for copied state */
  box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
}

/* Back Button */
.back-button {
  background-color: var(--color-secondary); /* Dark grey */
  padding: 1rem 2rem;
  font-size: 1.1rem;
  box-shadow: 0 6px 15px rgba(var(--color-secondary), 0.3);
}
.back-button:hover {
  background-color: hsl(210, 10%, 40%); /* Slightly lighter grey */
  transform: translateY(-3px);
}
.back-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(var(--color-secondary), 0.3);
}

/* Donation Page Specific Styles */
.thank-you-message {
  font-family: "Montserrat", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.instruction-text {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.pix-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pix-key {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-secondary);
  word-break: break-all;
  text-align: center;
  width: 100%;
  max-width: 350px;
}

.qr-code {
  /* Removed as QR code is no longer used */
  display: none;
}

.footer {
  background-color: var(--color-secondary);
  color: var(--color-white);
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: auto; /* Pushes footer to the bottom */
  font-size: 0.9rem;
}

.footer p {
  margin-bottom: 0.5rem;
}

/* Donation Counter Display */
.donation-counter-display {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  margin-top: 1rem;
}

#donation-counter {
  color: var(--color-gold-accent);
}

/* Notification Styles */
#notification-container {
  position: fixed;
  bottom: 110px; /* Adjusted: Moved up to clear the fixed button */
  right: 20px;
  display: flex;
  flex-direction: column-reverse; /* New notifications appear at the bottom of the stack, pushing older ones up */
  gap: 10px;
  z-index: 1000;
  pointer-events: none; /* Allows clicks to pass through */
}

.notification-toast {
  background-color: var(--color-notification-bg); /* Now uses the primary pink color */
  color: var(--color-white); /* Ensures text is white on pink background */
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-family: "Open Sans", sans-serif;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateX(100%); /* Still slides from right */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  min-width: 200px;
  text-align: center;
}

.notification-toast.active {
  opacity: 1;
  transform: translateX(0);
}

/* Donation Progress Bar Styles */
.progress-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.progress-bar-container {
  width: 100%;
  background-color: var(--color-background);
  border-radius: 10px;
  height: 25px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%; /* Initial width */
  background-color: var(--color-primary);
  border-radius: 10px;
  transition: width 0.8s ease-out; /* Smooth transition for width changes */
  box-shadow: 0 2px 8px rgba(var(--color-primary), 0.3);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.raised-amount span,
.goal-amount span {
  color: var(--color-primary);
}

.goal-amount {
  color: var(--color-text-light);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .campaign-name {
    font-size: 1.8rem;
  }

  .beneficiary-image {
    width: 200px; /* Adjusted for smaller screens */
    height: 200px; /* Adjusted for smaller screens */
  }

  .impactful-title {
    font-size: 2rem;
  }

  .story-text {
    font-size: 1rem;
  }

  .hero-visuals-section,
  .donation-progress-section,
  .story-section,
  .donation-details {
    padding: 2rem;
  }

  .progress-title {
    font-size: 1.6rem;
  }

  .progress-info {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 1rem;
  }

  .fixed-button {
    padding: 1.5rem 3rem; /* Adjusted for smaller screens */
    font-size: 1.4rem; /* Adjusted for smaller screens */
    bottom: 15px;
    left: 15px;
    right: 15px;
  }

  body {
    padding-bottom: 80px; /* Adjusted for smaller screens */
  }

  #notification-container {
    bottom: 90px; /* Adjusted for smaller screens */
    right: 15px;
  }
}

@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
  }

  .campaign-name {
    font-size: 1.5rem;
  }

  .beneficiary-image {
    width: 150px; /* Adjusted for smallest screens */
    height: 150px; /* Adjusted for smallest screens */
  }

  .impactful-title {
    font-size: 1.6rem;
  }

  .story-text {
    font-size: 0.95rem;
  }

  .hero-visuals-section,
  .donation-progress-section,
  .story-section,
  .donation-details {
    padding: 1.5rem;
  }

  .thank-you-message {
    font-size: 1.5rem;
  }

  .pix-info {
    flex-direction: column;
    gap: 0.8rem;
  }

  .pix-key {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }

  .fixed-button {
    padding: 1.2rem 2.5rem; /* Adjusted for smallest screens */
    font-size: 1.2rem; /* Adjusted for smallest screens */
    bottom: 10px;
    left: 10px;
    right: 10px;
  }

  .qr-code {
    /* Removed as QR code is no longer used */
    display: none;
  }

  #notification-container {
    bottom: 80px; /* Adjusted for smallest screens */
    right: 10px;
    left: 10px; /* Center on smaller screens */
    align-items: center;
  }

  .notification-toast {
    width: calc(100% - 20px); /* Full width minus padding */
    max-width: 300px; /* Limit max width */
  }

  .progress-title {
    font-size: 1.4rem;
  }

  .progress-info {
    font-size: 0.9rem;
  }

  body {
    padding-bottom: 70px; /* Adjusted for smallest screens */
  }
}
