/* === GLOBAL === */
body {
  background: #121212;
  color: #eee;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h2 {
  margin-bottom: 20px;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
}

/* === AUDIO PLAYER === */
#player {
  width: 100%;
  max-width: 700px;
  margin: 20px 0 30px 0;
  filter: brightness(0.95);
  border-radius: 12px;
}

/* === BUTTONS === */
.controls {
  width: 100%;
  max-width: 700px;
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

button {
  flex: 1;
  padding: 16px 25px;
  font-size: 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.controls button {
  background: #ffcc00;
  color: #000;
}

.controls button:disabled {
  background: #333;
  color: #ccc;
}

.controls button:disabled:hover {
  background: #333;
  color: #ccc;
  cursor: not-allowed;
}

.controls button:hover {
  background: #ffdb4d;
}

/* === HISTORY === */
.content-container {
  background: #1c1c1c;
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  margin-bottom: 40px;
}

.content-title {
  font-size: 22px;
  margin-bottom: 12px;
  font-weight: bold;
  color: #bbb;
}

.content-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.content-item {
  padding: 12px 0;
  border-bottom: 1px solid #333;
  color: #ccc;
  overflow-wrap: break-word;
  font-size: 18px;
}

.content-item:last-child {
  border-bottom: none;
}

/* current track */
.current-track {
  color: #ffcc00 !important;
  font-weight: bold;
}

.footer {
  height: 45px;
  margin-bottom: 20px;
  background: #ffcc00;

  display: flex;
  justify-content: flex-end;
  align-items: center;

  padding: 0 15px;
  width: 100%;
}

/* контейнер для кнопок справа */
.right-footer-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* сами кнопки */
.right-footer-buttons button {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 36px;
  height: 36px;

  background: #333;
  color: #ffcc00;

  font-size: 20px;
  border: none;
  border-radius: 8px;

  cursor: pointer;
  transition: 0.2s;
}

/* hover/active */
.right-footer-buttons button:hover {
  background: #444;
}

.right-footer-buttons button:active {
  background: #222;
}

.content-slider {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.content-slider label {
  font-size: 14px;
  color: #ccc;
}

.slider-input {
  width: -webkit-fill-available;
  cursor: pointer;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: #444;
}

/* бегунок */
.slider-input::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.slider-input:active::-webkit-slider-thumb {
  background: #f0f0f0;
}

.slider-value {
  width: 40px;
  text-align: right;
  color: #ccc;
  font-size: 14px;
}

/* ========================================================= */
/* ======================= MOBILE ========================== */
/* ========================================================= */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  h2 {
    font-size: 36px;
    margin-bottom: 30px;
  }

  #player {
    width: 100%;
    margin: 25px 0 35px 0;
    transform: scale(1.1); /* увеличить сам плеер */
    transform-origin: center;
  }

  .controls {
    flex-direction: column;
    gap: 18px;
    margin-bottom: 35px;
  }

  button {
    font-size: 22px;
    padding: 20px;
    border-radius: 14px;
  }

  .content-container {
    padding: 25px;
    border-radius: 14px;
  }

  .history-title {
    font-size: 26px;
    margin-bottom: 16px;
  }

  .history-item {
    font-size: 20px;
    padding: 14px 0;
  }
}

/* === CUSTOM PLAYER === */

.custom-player {
  background: #1c1c1c;
  width: 100%;
  max-width: 700px;
  padding: 20px;
  border-radius: 15px;
  /* display: flex; */
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.time-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
}

.progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

#progressBar {
  flex: 1;
  height: 35px;
  background: #333;
  border-radius: 5px;
  cursor: pointer;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0;
  background: #ffcc00;
}

#currentTime,
#duration {
  font-size: 16px;
  width: 45px;
  text-align: center;
}

.top-bar {
  width: 100%;
  max-width: 700px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* РАВНОМЕРНОЕ РАСПРЕДЕЛЕНИЕ */
  margin-bottom: 20px;
}

.top-bar-button {
  background: #333;
  color: #ccc;
  font-size: 26px;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  max-width: 70px;
}

.top-bar-button:disabled {
  opacity: 0;
}

.top-bar-button:disabled:hover {
  cursor: auto;
}

.top-bar-button:hover {
  background: #444;
}

.top-bar-button.active {
  background: #e70b0b;
  color: #fff;
}

.title {
  padding: 4px;
  font-weight: bold;
  flex: 1; /* Заголовок растягивается */
  font-size: x-large;
  text-align: center; /* И центрируется */
  margin: 0;
}

.content-list.collapsed {
  display: none;
}

.content-title {
  cursor: pointer;
  user-select: none;
}

.content-title::after {
  content: " ▼";
  font-size: 0.8em;
}

.content-title.collapsed::after {
  content: " ►";
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #444;
  margin-bottom: 15px;
}

.user-name {
  font-size: 14px;
  color: #ddd;
}

.user-actions {
  padding: 8px;
  display: flex;
  gap: 10px;
}

.auth-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-buttons {
  padding: 8px;
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.content-button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: #444;
  color: #eee;
}

.content-button:hover {
  background: #444;
}

#editUserForm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

#editUserForm input {
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #555;
  background: #222;
  color: #eee;
}

.progress-bar-button {
  text-decoration: underline;
  color: #eee;
  cursor: pointer;
}

.progress-bar-button:hover {
  text-decoration: underline;
  color: #ffcc00;
}

.favorite-ignore-item {
  display: flex;
  justify-content: space-between;
}

.favorite-ignore-symbol:hover {
  cursor: pointer;
  color: #e70b0b;
}

.favorite-ignore-name:hover {
  cursor: pointer;
  color: #ffcc00;
}

.search-input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.title-container{
  text-align: center;
}

#searchInput {
  font-size: 24px;
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #555;
  background: #222;
  color: #eee;
}

.loader {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* ========================================================= */
/* ======================= MOBILE BIG ======================= */
/* ========================================================= */
@media (max-width: 1024px) {
  body {
    padding: 14px;
    font-size: 24px; /* общий базовый размер больше */
  }

  h2 {
    font-size: 42px;
    margin-bottom: 35px;
  }

  #player {
    width: 100%;
    margin: 30px 0 40px 0;
    transform: scale(1.25); /* еще больше */
    transform-origin: center;
  }

  /* КНОПКИ */
  .controls {
    flex-direction: column;
    gap: 22px;
    margin-bottom: 40px;
    max-width: 95%;
  }

  button {
    font-size: 26px;
    padding: 22px;
    border-radius: 18px;
  }

  /* Контейнеры (история, списки и т.д.) */
  .content-container {
    padding: 30px;
    border-radius: 16px;
    max-width: 95%;
  }

  .content-title {
    font-size: 36px;
  }

  .content-item {
    font-size: 36px;
    padding: 16px 0;
  }

  /* Слайдеры */
  .content-slider label {
    font-size: 36px;
  }

  .slider-input {
    height: 8px;
  }

  .slider-input::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }

  .slider-value {
    font-size: 18px;
    width: 50px;
  }

  /* КАСТОМНЫЙ ПЛЕЕР */
  .custom-player {
    padding: 25px;
    border-radius: 18px;
    max-width: 95%;
  }

  .top-bar {
    max-width: 95%;
  }

  .top-bar-button {
    font-size: 32px;
    padding: 18px 22px;
    border-radius: 14px;
    max-width: 80px;
  }

  .title {
    font-size: 36px;
  }

  #progressBar {
    height: 45px;
  }

  #currentTime,
  #duration {
    font-size: 28px;
    width: 55px;
  }

  /* USER BLOCK */
  .user-name {
    font-size: 20px;
  }

  .auth-input {
    height: 48px;
    font-size: 36px;
    width: -webkit-fill-available;
  }

  .content-button {
    font-size: 36px;
    padding: 12px;
  }

  #editUserForm input {
    padding: 10px;
    font-size: 20px;
  }
}
