*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg,#1e3c72,#2a5298);
  margin: 0;
  padding: 0 16px;
  color: #fff;
}

.donation-box {
  max-width: 500px;
  width: 100%;
  margin: 72px auto;
  background: #ffffff15;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.donation-image {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: #00000025;
}

.subtitle {
  font-size: 14px;
  opacity: 0.8;
}

.donors {
  margin-top: 18px;
  text-align: left;
}

.donors h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.3px;
  opacity: 0.95;
}

.donor-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #00ffcc55 #00000025;
}

.donor-list::-webkit-scrollbar {
  width: 10px;
}

.donor-list::-webkit-scrollbar-track {
  background: #00000025;
  border-radius: 999px;
}

.donor-list::-webkit-scrollbar-thumb {
  background: #00ffcc55;
  border-radius: 999px;
  border: 2px solid #00000025;
}

.donor-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #00000025;
  border: 1px solid #ffffff12;
  border-radius: 10px;
}

.donor-item.empty {
  justify-content: center;
  opacity: 0.75;
}

.donor-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.donor-amount {
  white-space: nowrap;
}

.progress-container {
  background: #ffffff30;
  height: 25px;
  border-radius: 20px;
  margin: 20px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,#00ffcc,#00cc99);
  border-radius: 20px;
  transition: 0.8s;
}

.info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  gap: 10px;
}

.admin {
  background: #111;
}

.card {
  max-width: 400px;
  width: 100%;
  margin: 72px auto;
  background: #222;
  padding: 25px;
  border-radius: 10px;
}

.section {
  padding: 14px 0;
  border-top: 1px solid #ffffff15;
}

.section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  opacity: 0.9;
}

.card label {
  display: block;
  font-size: 12px;
  opacity: 0.85;
}

.card input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: none;
  border-radius: 6px;
}

.card button {
  width: 100%;
  padding: 12px;
  background: #00ffcc;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.card button:active {
  transform: translateY(1px);
}

@media (max-width: 480px) {
  body {
    padding: 0 12px;
  }

  .donation-box {
    margin: 28px auto;
    padding: 18px;
    border-radius: 14px;
  }

  .donation-image {
    max-height: 180px;
    margin-bottom: 12px;
  }

  .donation-box h1 {
    font-size: 18px;
    line-height: 1.25;
  }

  #percentText {
    font-size: 22px;
    margin: 12px 0 0;
  }

  .progress-container {
    height: 22px;
  }

  .info {
    flex-direction: column;
    align-items: flex-start;
    font-size: 13px;
  }

  .donor-list {
    max-height: 200px;
  }

  .card {
    margin: 28px auto;
    padding: 18px;
  }

  .entry-right {
    gap: 8px;
  }

  .entry-remove {
    padding: 8px 9px;
  }
}

.totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
  padding: 10px 12px;
  background: #00000030;
  border-radius: 8px;
}

.totals span {
  font-size: 12px;
  opacity: 0.85;
}

.entries {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.entry {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #00000025;
  border: 1px solid #ffffff12;
  border-radius: 10px;
}

.entry.empty {
  justify-content: center;
  opacity: 0.75;
}

.entry-left {
  min-width: 0;
}

.entry-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-meta {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}

.entry-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entry-amount {
  white-space: nowrap;
}

.entry-remove {
  width: auto;
  padding: 8px 10px;
  background: #ff4d4d;
  color: #fff;
  font-weight: 700;
}

#status {
  margin: 12px 0 0;
  font-size: 12px;
  opacity: 0.9;
}

#status[data-tone="error"] {
  color: #ff8080;
}

#status[data-tone="warn"] {
  color: #ffd27a;
}
