:root {
  --bg: #0a0a0a;
  --bg-card: #151515;
  --text: #f0f0f0;
  --text-muted: #b0b0b0;
  --accent: #3a86ff;
  --gradient: linear-gradient(135deg, #3a86ff, #8338ec);
  --shadow: 0px 10px 10px rgba(0, 0, 0, 0.3);
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.donate-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px 0;
}

.donate-page::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(58, 134, 255, 0.07) 0%,
    transparent 70%
  );
  z-index: -1;
  animation: rotateGradient 20s linear infinite;
}

@keyframes rotateGradient {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.centered-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Стили для заголовка */
.page-title {
  position: relative;
  height: 60px;
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  overflow: hidden;
}

.title-wrapper {
  position: relative;
  display: inline-block;
  height: 60px;
  vertical-align: top;
  overflow: hidden;
}

.title-text,
.text-gradient {
  position: relative;
  display: inline-block;
  transition: none !important;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Виджеты */
.widgets-container {
  display: flex;
  width: fit-content;
  margin: 0 auto;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
  gap: 10px;
}

.donate-widget,
.music-widget,
.film-widget,
.game-widget,
.effect-widget {
  width: 400px;
  flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.5s ease;
  will-change: transform, opacity;
}

.music-widget,
.film-widget,
.game-widget,
.effect-widget {
  transform-origin: right center;
}

.music-widget.collapsed,
.film-widget.collapsed,
.game-widget.collapsed,
.effect-widget.collapsed {
  transform: scaleX(0);
  opacity: 0;
  margin-left: -470px;
  pointer-events: none;
}

.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

/* Формы и элементы */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text);
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #333;
  background: rgba(30, 30, 30, 0.7);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  transition: var(--transition);
  box-sizing: border-box;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.char-counter {
  text-align: right;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 5px;
}

.amount-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.amount-btn {
  padding: 12px;
  background: rgba(40, 40, 40, 0.7);
  border: 1px solid #333;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
}

.amount-btn:hover {
  background: rgba(50, 50, 50, 0.8);
  transform: translateY(-2px);
}

/* Списки */
.music-list,
.film-list,
.game-list,
.effect-list {
  max-height: 285px;
  overflow-y: auto;
  margin-top: 15px;
  background: rgba(30, 30, 30, 0.5);
  border-radius: 8px;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(30, 30, 30, 0.5);
}

.music-list::-webkit-scrollbar,
.film-list::-webkit-scrollbar,
.game-list::-webkit-scrollbar,
.effect-list::-webkit-scrollbar {
  width: 8px;
}

.music-list::-webkit-scrollbar-track,
.film-list::-webkit-scrollbar-track,
.game-list::-webkit-scrollbar-track,
.effect-list::-webkit-scrollbar-track {
  background: rgba(30, 30, 30, 0.3);
  border-radius: 4px;
  margin: 5px 0;
}

.music-list::-webkit-scrollbar-thumb,
.film-list::-webkit-scrollbar-thumb,
.game-list::-webkit-scrollbar-thumb,
.effect-list::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.music-list::-webkit-scrollbar-thumb:hover,
.film-list::-webkit-scrollbar-thumb:hover,
.game-list::-webkit-scrollbar-thumb:hover,
.effect-list::-webkit-scrollbar-thumb:hover {
  background: #3a76d8;
}

.music-item,
.film-item,
.game-item,
.effect-item {
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  font-size: 14px;
  transition: var(--transition);
}

.music-item:last-child,
.film-item:last-child,
.game-item:last-child,
.effect-item:last-child {
  margin-bottom: 0;
}

.music-item:hover,
.film-item:hover,
.game-item:hover,
.effect-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Кнопки */
.btn {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-primary {
  background: var(--gradient);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(58, 134, 255, 0.3);
}

/* Кнопки переключения */
.music-toggle-btn,
.film-toggle-btn,
.game-toggle-btn,
.effect-toggle-btn {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 15%;
  background: #151515;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.music-toggle-btn {
  right: -60px;
  top: 5%;
  transform: translateY(-50%);
}

.film-toggle-btn {
  right: -60px;
  top: 15%;
  transform: translateY(-50%);
}

.game-toggle-btn {
  right: -60px;
  top: 25%;
  transform: translateY(-50%);
}

.effect-toggle-btn {
  right: -60px;
  top: 35%;
  transform: translateY(-50%);
}

.music-toggle-btn:hover,
.film-toggle-btn:hover,
.game-toggle-btn:hover,
.effect-toggle-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

.music-toggle-btn i,
.film-toggle-btn i,
.game-toggle-btn i,
.effect-toggle-btn i {
  font-size: 20px;
}

.music-toggle-btn span,
.film-toggle-btn span,
.game-toggle-btn span,
.effect-toggle-btn span {
  font-size: 10px;
  margin-top: 2px;
  font-weight: 600;
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.new-track,
.new-film,
.new-game,
.new-effect {
  animation: fadeIn 0.4s ease forwards;
}

/* Адаптивность */
@media (max-width: 900px) {
  .widgets-container {
    flex-direction: column;
    width: 100%;
    max-width: 500px;
  }

  .donate-widget,
  .music-widget,
  .film-widget,
  .game-widget,
  .effect-widget {
    width: 100%;
  }

  .music-widget.collapsed,
  .film-widget.collapsed,
  .game-widget.collapsed,
  .effect-widget.collapsed {
    transform: scaleY(0);
    margin-left: 0;
    margin-top: -20px;
    height: 0;
  }

  .amount-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-title,
  .title-text,
  .text-gradient {
    font-size: 32px;
  }

  .music-toggle-btn,
  .film-toggle-btn,
  .game-toggle-btn,
  .effect-toggle-btn {
    position: static;
    transform: none !important;
    margin: 10px auto;
    width: 60px;
    height: 60px;
  }

  .music-toggle-btn:hover,
  .film-toggle-btn:hover,
  .game-toggle-btn:hover,
  .effect-toggle-btn:hover {
    transform: scale(1.1) !important;
  }
}

@media (prefers-color-scheme: dark) {
  .music-list::-webkit-scrollbar-track,
  .film-list::-webkit-scrollbar-track,
  .game-list::-webkit-scrollbar-track,
  .effect-list::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.5);
  }
}

/* Оверлей загрузки */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.film-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.film-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.film-item.selected {
  background: rgba(58, 134, 255, 0.2);
  border: 1px solid var(--accent);
}

.film-title {
  font-weight: 500;
  flex-grow: 1;
}

.film-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 80px;
}

.film-bid {
  color: var(--accent);
  font-weight: 600;
}

.film-percent {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-secondary {
  background: rgba(40, 40, 40, 0.7);
  color: var(--text);
  margin-top: 10px;
}

.btn-secondary:hover {
  background: rgba(50, 50, 50, 0.8);
}
/* Стили для поля ввода фильма */
#new-film-input {
  width: 100%;
  padding: 10px 15px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #333;
  background: rgba(30, 30, 30, 0.7);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

#new-film-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}
.game-widget {
  display: none;
  margin-top: 15px;
}

.game-item {
  padding: 10px;
  margin: 5px 0;
  background-color: rgba(30, 30, 30, 0.7);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-item.selected {
  background-color: rgba(58, 134, 255, 0.3);
}

.game-item:hover {
  background-color: rgba(58, 134, 255, 0.2);
}

.game-stats {
  display: flex;
  gap: 10px;
}
