/* Всплывающее окно предпросмотра */
.preview-popup {
  display: none;
  position: fixed;
  top: 20%;
  left: 81%;
            transform: none;
            width: 320px;
            background: var(--card);
            border: 1px solid var(--card);
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            padding: 15px;
            z-index: 1;
            font-size: 14px;
            color: #333;
        }
        .preview-popup.visible {
            display: block;
        }
        .fundraising-purpose {
            margin-bottom: 8px;
        }
        .fundraising-purpose h3 {
            margin: 0 0 6px 0;
            font-size: 1.1em;
        }
        .fundraising-purpose p {
            margin: 0;
            font-size: 0.9em;
            color: #555;
            max-height: 50px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .progress {
            background: #eee;
            height: 18px;
            border-radius: 9px;
            overflow: hidden;
            margin-bottom: 8px;
        }
        .progress-bar {
            background: #28a745;
            height: 100%;
            width: 0%;
            transition: width 0.3s ease;
        }
        .fundraising-stats {
            font-size: 0.9em;
            display: flex;
            justify-content: space-between;
            color: #333;
        }
        .fundraising-stats .amount.text-success {
            color: green;
            font-weight: bold;
        }
        /* Предпросмотр формы (создания) в стиле donators.php */
        #preview-box {
            border: 1px solid var(--card);
            padding: 15px;
            margin-top: 20px;
            background: var(--card);
            border-radius: 8px;
            max-width: 500px;
            font-size: 14px;
            color: #333;
        }
        #preview-box .fundraising-purpose h3 {
            margin: 0 0 6px 0;
            font-size: 1.2em;
        }
        #preview-box .fundraising-purpose p {
            margin: 0 0 10px 0;
            font-size: 0.95em;
            color: #555;
            min-height: 40px;
        }

/* Навигация по страницам */
.admin_nav {
    background-color: #22222200;
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.fill_width {
  flex: 1 1 calc((100% / 8) - 10px);
  border-radius: 12px;
  text-align: center;
  display: flex;
  padding: 10px 12px;
  font-weight: 600;
  border-radius: 6px;
  color: #ccc;
  background-color: var(--button);
}

.fill_width.secondary_btn.active_btn_adm {
    background-color: var(--span);
    color: #fff;
}

.secondary_btn svg {
    margin-right: 8px;
    vertical-align: middle;
}

.secondary_btn {
    transition: transform 0.3s ease; /* плавный переход */
    display: inline-flex; /* чтобы трансформация сработала корректно */
    align-items: center; /* вертикальное выравнивание содержимого */
    justify-content: center;
}

.secondary_btn:hover {
    transform: scale(1.05); /* увеличение кнопки на 5% */
    z-index: 10; /* чтобы кнопка была поверх соседних элементов при увеличении */
    background-color: var(--span);
}

/* Стили для кнопки пожертвовать */
.fundraising {
    position: relative;
    padding: 15px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    border-radius: 6px;
    transition: box-shadow 0.3s ease;
}
.fundraising:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.donate-button {
    position: absolute;
    top: 15px;
    right: 15px;
    display: none;
    padding: 6px 12px;
    background-color: var(--span);
    border: none;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    z-index: 20;
}
.fundraising:hover .donate-button {
    display: inline-block;
}

/* Модальное окно */
#donation-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
}

#donation-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 320px;
    max-width: 90vw;
    background: var(--card);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,.5);
    transform: translate(-50%, -50%);
    z-index: 100000;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

#donation-modal h4 {
    margin: 0 0 15px 0;
    font-weight: bold;
}

#donation-modal label {
    margin-bottom: 6px;
    font-size: 14px;
    display: block;
}

#donation-modal input[type="text"],
#donation-modal input[type="number"] {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

#donation-modal button {
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#donation-modal button[type="submit"] {
    background-color: var(--span);
    color: #fff;
    border-radius: 12px;
}

#donation-modal button.close-btn {
    background-color: var(--red);
    color: #fff;
    margin-left: 10px;
    border-radius: 12px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
}

.error-message {
    color: red;
    margin-bottom: 10px;
}

/* Основные стили контейнера сбор */
.fundraising {
    display: flex;
    background-color: var(--card);
    border-radius: 16px;
    padding: 5px 20px;
    flex-direction: column;
    color: var(--text-custom);
    position: relative;
    border: 1px solid var(--bottom-line-table);
}

.fundraising-header {
    font-family: "Unbounded";
    font-size: 15px;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 10px;
    border-block: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--bg-table);
    text-align: center;
}

.fundraising-status {
    font-family: "Unbounded";
    font-size: 10px;
    font-weight: 700;
    color: #ff0000;
    text-align: center;
}

.fundraising-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px; /* Пространство между элементами */
  width: 100%;
}

.fundraising-purpose h3 {
    font-family: "Unbounded";
    font-size: 20px;
    font-weight: 700;
    color: var(--text-custom);
}

.fundraising-purpose p {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-custom);
    margin-top: 0px;
}

.fundraising-purpose {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.progress {
    height: 5px;
    background: #ecf0f12d;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #494949, #11ff00);
    transition: width 0.5s ease;
}

.fundraising-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
}

.fundraising-stats .amount {
    font-family: "Unbounded";
    font-size: 10px;
    font-weight: 700;
    color: var(--text-custom);
}

/* Основные стили контейнера донатеров */
.top-donors-container {
  border-radius: 16px;
  padding: 10px;
  max-height: 500px;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--br-16);
}

/* Заголовок */
.top-donors-header {
    font-family: "Unbounded";
    font-size: 15px;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 10px;
    border-block: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-custom);
    text-align: center;
    background: var(--card);
    border-radius: var(--br-16);
}

/* Список донатеров */
.donor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  
  
  
  
  
/* Основные стили контейнера сбор */
.fundraising {
  display: flex;
  background-color: var(--card);
  border-radius: 16px;
  padding: 5px 20px;
  flex-direction: column;
  color: var(--text-custom);
  position: relative;
  border: 1px solid var(--bottom-line-table);
}

.fundraising-header {
  font-family: "Unbounded";
  font-size: 15px;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 10px;
  border-block: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--bg-table);
  text-align: center;
}

.fundraising-status {
  font-family: "Unbounded";
  font-size: 10px;
  font-weight: 700;
  color: #ff0000;
  text-align: center;
}

.fundraising-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px; /* Пространство между элементами */
  width: 100%;
}

.fundraising-purpose
  h3 {
    font-family: "Unbounded";
  font-size: 20px;
  font-weight: 700;
  color: var(--text-custom);
}

.fundraising-purpose
  p {
    font-size: 13px;
  font-weight: 700;
  color: var(--text-custom);
  margin-top: 0px;
}

.fundraising-purpose {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.progress {
  height: 5px;
  background: #ecf0f12d;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #494949, #11ff00);
  transition: width 0.5s ease;
}

.fundraising-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}

.fundraising-stats .amount {
  font-family: "Unbounded";
  font-size: 10px;
  font-weight: 700;
  color: var(--text-custom);
}

/* Основные стили контейнера донатеров */
.top-donors-container {
  border-radius: 16px;
  padding: 10px;
  max-height: 500px;
  overflow-y: auto;
}

/* Заголовок */
.top-donors-header {
  font-family: "Unbounded";
  font-size: 15px;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 10px;
  border-block: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--bg-table);
  text-align: center;
  background: var(--card);
  border-radius: var(--br-16);
}

/* Список донатеров */
.donor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Элемент донатера */
.donor-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  background: linear-gradient(26deg, #0505054a, #a4a4a43d);
  border-radius: 8px;
  padding: 5px 10px;
  transition: all 0.3s ease;
  gap: 10px;
}

.donor-item:
  hover {
  background: linear-gradient(26deg, #0505056a, #a4a4a45d);
}

/* Стили для топ-3 донатеров */
.donor-item.gold {
  background: linear-gradient(26deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
  border-left: 3px solid #d4af37;
}

.donor-item.silver {
  background: linear-gradient(26deg, rgba(192,192,192,0.15), rgba(192,192,192,0.05));
  border-left: 3px solid #c0c0c0;
}

.donor-item.bronze {
  background: linear-gradient(26deg, rgba(205,127,50,0.15), rgba(205,127,50,0.05));
  border-left: 3px solid #cd7f32;
}

/* Аватарка */
.donor-avatar {
  background: #495057;
  position: relative;
  height: 40px;
  width: 40px;
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
  cursor: default;
}

/* Имя донатера */
.donor-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-custom);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Unbounded";
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 5px;
}

/* Сумма доната */
.donor-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--money);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Unbounded";
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 5px;
}

/* Стили для рамки аватарки */
.avatar_frame_small {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
}

/* Стили для самой аватарки */
.top_players_avatar {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

/* Сообщение при отсутствии донатов */
.empty-donors {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-default);
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Unbounded";
  background: linear-gradient(26deg, #0505052a, #a4a4a41a);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.empty-donors::
  before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 60%);
  animation: rotate 10s linear infinite;
  z-index: 0;
}

.empty-donors::
  after {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--navbar);
  border-radius: 11px;
  z-index: 1;
}

.empty-donors
  span {
  position: relative;
  z-index: 2;
}

/* Анимация для пустого состояния */
  @keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
  transform: rotate(360deg);
  }
}

/* Дополнительные стили для адаптивности */
  @media (max-width: 768px) {
  .donor-name {
    font-size: 12px;
  }
  
  .donor-amount {
  font-size: 11px;
  }
  
  .donor-avatar {
  height: 36px;
  width: 36px;
  }
};
}

/* Элемент донатера */
.donor-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    background: linear-gradient(26deg, #0505054a, #a4a4a43d);
    border-radius: 8px;
    padding: 5px 10px;
    transition: all 0.3s ease;
    gap: 10px;
}

.donor-item:hover {
  background: linear-gradient(26deg, #0505056a, #a4a4a45d);
}

/* Стили для топ-3 донатеров */
.donor-item.gold {
  background: linear-gradient(26deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
  border-left: 3px solid #d4af37;
}

.donor-item.silver {
  background: linear-gradient(26deg, rgba(192,192,192,0.15), rgba(192,192,192,0.05));
  border-left: 3px solid #c0c0c0;
}

.donor-item.bronze {
  background: linear-gradient(26deg, rgba(205,127,50,0.15), rgba(205,127,50,0.05));
  border-left: 3px solid #cd7f32;
}

/* Аватарка */
.donor-avatar {
  background: #495057;
  position: relative;
  height: 40px;
  width: 40px;
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
  cursor: default;
}

/* Имя донатера */
.donor-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-custom);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Unbounded";
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 5px;
}

/* Сумма доната */
.donor-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--money);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Unbounded";
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 5px;
}

/* Стили для рамки аватарки */
.avatar_frame_small {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
}

/* Стили для самой аватарки */
.top_players_avatar {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

/* Сообщение при отсутствии донатов */
.empty-donors {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-default);
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Unbounded";
  background: linear-gradient(26deg, #0505052a, #a4a4a41a);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.empty-donors::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 60%);
  animation: rotate 10s linear infinite;
  z-index: 0;
}

.empty-donors::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--navbar);
  border-radius: 11px;
  z-index: 1;
}

.empty-donors span {
  position: relative;
  z-index: 2;
}

/* Анимация для пустого состояния */
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Дополнительные стили для адаптивности */
@media (max-width: 768px) {
  .donor-name {
    font-size: 12px;
  }
  
  .donor-amount {
    font-size: 11px;
  }
  
  .donor-avatar {
    height: 36px;
    width: 36px;
  }
}

.actions {
  position: relative;
  display: flex;
  gap: 5px;
  /* top: 5px; */
}

.inputs-inline {
  margin-top: 6px;
}

button,
.button {
  margin-top: 6px;
}

#fundraising-form {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
}
