﻿/* --- Базовые переопределения только для страницы плеера --- */
body.player {
  padding: 0 !important;
  margin: 0 !important;
  background-color: #111 !important;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
}

/* Убираем внешние отступы у main, которые style1.css добавляет */
body.player main {
  flex: 1;
  margin: 0 !important;
  padding: 130px 0 30px 0 !important; /* ✅ отступы под шапку и подвал */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

/* Компенсируем фиксированные header и footer из style1.css */
body.player header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

body.player footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* --- Сам плеер --- */
.player-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background-color: #222;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
/*  width: 100%;      */
  max-width: 550px;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 auto;
}

/* Квадратная область обложки / видео */
.player-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.player-cover img,
.player-cover video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background-color: #000;
}

/* Название и альбом */
.track-title {
  margin-top: 1px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.track-album {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 1px;
  text-align: center;
}

/* Прогрессбар */
.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #333;
  border-radius: 4px;
  margin: 0px 0;
  position: relative;
  cursor: pointer;
}

.progress {
  height: 100%;
  width: 0%;
  margin: 0px 0;
  background: linear-gradient(90deg, #ff9800, #ffc107);
  border-radius: 4px;
  transition: width 0.1s linear;
}

/* Время */
.time {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
  color: #bbb;
  margin-bottom: 5px;
}

/* Кнопки управления */
.controls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  margin-bottom: 25px;
}

.controls button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.controls button:hover {
  transform: scale(1.1);
}

.controls button.active {
  background-color: rgba(255, 152, 0, 0.2);
  box-shadow: 0 0 10px rgba(255, 152, 0, 0.4);
}

.controls .big {
  font-size: 30px;
  width: 60px;
  height: 60px;
}

/* --- Мобильная адаптация --- */
@media (max-width: 768px) {
  body.player main {
    padding-top: 70px;   /* немного меньше на мобильных */
    padding-bottom: 35px;
  }

  .player-container {
    border-radius: 0;
    width: 100%;
    height: 100%;
    box-shadow: none;
    padding: 8px;
  }

  .track-title {
    font-size: 16px;
  }

  .controls .big {
    font-size: 28px;
    width: 54px;
    height: 54px;
  }
}
