@import url('https://fonts.googleapis.com/css2?family=Comic+Neue&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Comic Neue', Comic Sans MS, cursive;
  color: #FFFFFF;
}

a {
  text-decoration: none;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

a:hover {
  color: #ffffff;
}

.background {
  background-image: url('https://images.unsplash.com/photo-1444703686981-a3abbc4d4fe3?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: auto;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.content {
  display: block;
  max-width: 1000px;
  width: 95%;
  margin: 20px auto 1em;
  text-align: center;
  z-index: 2;
  flex: 1 0 auto;
}

.buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1em;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  flex-wrap: wrap;
  padding: 0.5em;
}

.button {
  display: inline-block;
  margin: 0.5em;
  padding: 0.4em 0.9em;
  font-size: 0.95em;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(to right, #2ecc71, #27ae60);
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.button:hover {
  background: linear-gradient(to right, #27ae60, #219653);
  transform: translateY(-2px);
}

.button span {
  transition: font-size 0.2s ease;
}

.button:hover span {
  font-size: 1.05em;
}

.button .desktop-text {
  display: inline;
}

.button .mobile-text {
  display: none;
}

.overlay {
  position: relative;
  padding: 2.5em;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  max-width: 90%;
  margin: 1em auto 0;
  height: 920px;
  overflow: hidden;
}

.overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/forest/pictures/forest_overlay.jpg');
  background-size: 115%;
  background-position: top center;
  background-repeat: no-repeat;
  opacity: 0.7;
  z-index: -1;
  border-radius: 16px;
}

.overlay-content {
  background-color: rgba(0, 0, 0, 0.6);
  height: 760px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  border-radius: 16px;
  overflow-x: hidden;
  padding: 1.2em;
  color: #FFFFFF;
}

.overlay-content::-webkit-scrollbar {
  width: 8px;
}

.overlay-content::-webkit-scrollbar-track {
  background: transparent;
}

.overlay-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.overlay-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.overlay h1,
.overlay p,
.overlay ul li {
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

h1 {
  font-size: 2.8em;
  margin-bottom: 0.6em;
}

p {
  font-size: 1.4em;
  line-height: 1.7;
  margin-bottom: 1.2em;
}

/* Totals section styled like Top Donors */
.totals-box {
  margin: 2em auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  padding: 1em;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  text-align: center;
}

.totals-box .donor-badge {
  padding: 0.6em 0.9em;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  min-width: 140px;
  max-width: 160px;
  flex: 0 0 auto;
}

.glow-pi {
  background: rgba(255, 192, 203, 0.1);
  border-left: 4px solid #FFD700;
}

.glow-tree {
  background: rgba(144, 238, 144, 0.1);
  border-left: 4px solid #32CD32;
}

.donor-badge .rank {
  display: block;
  font-size: 0.9em;
  font-weight: bold;
  color: #A7F3D0;
  margin-bottom: 0.2em;
}

.donor-badge .user {
  font-size: 1.2em;
  font-weight: bold;
  color: #FFFFFF;
}

.donor-badge .amount {
  font-size: 0.95em;
  color: #CCCCCC;
}

.back-button {
  display: inline-block;
  margin-top: 2em;
  padding: 0.5em 1em;
  background-color: rgba(46, 204, 113, 0.8);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background-color: rgba(39, 174, 96, 1);
}

.footer {
  text-align: center;
  padding: 1em 0;
  width: 100%;
  position: absolute;
  bottom: 10px;
  z-index: 2;
}

.footer a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3em;
  }

  .button {
    font-size: 0.85em;
    padding: 0.4em 0.8em;
    margin: 0.3em;
  }

  .button .desktop-text {
    display: none;
  }

  .button .mobile-text {
    display: inline;
  }

  .overlay {
    padding: 1.2em;
    height: auto;
    min-height: 640px;
  }

  .overlay::before {
    background-size: cover;
    background-position: center top;
  }

  .overlay-content {
    height: 650px;
    max-height: unset;
    padding: 1.2em;
  }

  h1 {
    font-size: 2em;
  }

  p {
    font-size: 1.1em;
  }

  .totals-box {
    flex-direction: column;
    align-items: center;
  }

  .totals-box .donor-badge {
    min-width: unset;
    width: 100%;
    max-width: 100%;
  }
}
