#donation-container {
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#donation-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.donate-btn {
  background-color: #0077b6;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s;
}

.donate-btn:hover {
  background-color: #0096c7;
}

.donate-btn.active {
  background-color: #00b4d8;
  box-shadow: 0 0 6px rgba(0,180,216,0.5);
}

#custom-amount {
  padding: 0.6rem;
  border: 1.5px solid #0077b6;
  border-radius: 6px;
  width: 140px;
  text-align: center;
  font-size: 1rem;
}

#donate-submit {
  background-color: #0077b6;
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1.5rem;
}

#donate-submit:hover {
  background-color: #0096c7;
}

/* --- Темная тема --- */
html[data-theme="dark"] #donation-container {
  background: #1e1e1e;
  box-shadow: 0 2px 10px rgba(255,255,255,0.05);
}

html[data-theme="dark"] .donate-btn {
  background-color: #0096c7;
}

html[data-theme="dark"] .donate-btn.active {
  background-color: #00b4d8;
  color: #fff;
}

html[data-theme="dark"] #custom-amount {
  background-color: #2a2a2a;
  border-color: #00b4d8;
  color: #fff;
}

#donation-progress {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 12px;
  background: var(--bg-secondary, #f8f9fa);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

html[data-theme="dark"] #donation-progress {
  background: #1e1e1e;
  color: #e0e0e0;
  box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}

.progress-bar-container {
  margin: 1rem 0;
}

.progress-bar {
  height: 20px;
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

html[data-theme="dark"] .progress-bar {
  background-color: #333;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0096c7, #00b4d8);
  width: 0%;
  transition: width 0.5s ease-in-out;
}

#donor-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

#donor-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

html[data-theme="dark"] #donor-list li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}


/* --- Стили Модального Окна --- */

/* Затемнение фона (Overlay) */
.modal-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Чуть темнее для фокуса */
  backdrop-filter: blur(3px); /* Размытие фона для современного вида */
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0; /* Для анимации появления */
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Класс для открытия окна через JS */
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Само окно */
.modal-content {
  background: var(--bg, #ffffff); /* Используем вашу переменную или белый */
  padding: 2rem;
  border-radius: 12px; /* Как у #donation-container */
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  position: relative;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

/* Заголовки и текст */
.modal-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: inherit;
}

.modal-content p {
  margin-bottom: 1.5rem;
  color: #666;
  font-size: 0.95rem;
}

/* Поля ввода - стиль как у #custom-amount */
.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  font-weight: bold;
  color: inherit;
}

.modal-content input {
  width: 100%;
  padding: 0.8rem;
  border: 1.5px solid #0077b6; /* Цвет как у вас */
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  background: transparent;
  color: inherit;
  box-sizing: border-box; /* Чтобы padding не ломал ширину */
}

.modal-content input:focus {
  border-color: #00b4d8;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

/* Кнопка закрытия (крестик) */
.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #0077b6;
}

/* Футер модалки */
.modal-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.selected-sum-text {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #0077b6;
}

/* Кнопка "Перейти к оплате" - стиль как у #donate-submit */
#final-pay-btn {
  width: 100%;
  background-color: #0077b6;
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: 0.2s;
}

#final-pay-btn:hover {
  background-color: #0096c7;
}

#final-pay-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* --- ТЕМНАЯ ТЕМА --- */

html[data-theme="dark"] .modal-content {
  background: #1e1e1e; /* Как у контейнера донатов */
  color: #e0e0e0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
}

html[data-theme="dark"] .modal-content p {
  color: #aaa;
}

html[data-theme="dark"] .modal-content input {
  background-color: #2a2a2a; /* Как у #custom-amount */
  border-color: #00b4d8;     /* Светлый акцент */
  color: #fff;
}

html[data-theme="dark"] .modal-content input::placeholder {
  color: #888;
}

html[data-theme="dark"] .selected-sum-text {
  color: #00b4d8;
}

html[data-theme="dark"] .modal-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
}

html[data-theme="dark"] #final-pay-btn {
  background-color: #0096c7;
}

html[data-theme="dark"] #final-pay-btn:hover {
  background-color: #00b4d8;
  color: #fff;
}