HTML, body {
  overflow-x: hidden; /* Prevent horizontal scrolling */
  overflow-y: auto; /* Allow vertical scrolling */
  -webkit-overflow-scrolling: touch; /* Enable smooth scrolling on iOS */
}

.background-cover {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.1;  /* Reduced from 0.15 to 0.1 */
  z-index: -1;
  transition: background-image 0.5s ease-in-out;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, #000910, #011824, #000910);  /* Darker colors */
  z-index: -2;
}

.wrap {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  text-align: center;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
  overflow: visible;
}

.player {
  width: 700px;
  height: 150px;
  background: white;
  border-bottom: 4px #ccc solid;
  position: relative;
  color: black;
  text-align: left;
  padding: 20px;
  padding-bottom: 38px; /* увеличено для прогресс-бара */
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.album-art {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 110px;
  height: 110px;
  box-shadow: 3px 0 3px 0 rgba(0, 0, 0, 0.4);
}

.cover {
  width: 100%;
  height: 100%;
  box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.25);
  background-size: cover;
}

.description {
  position: absolute;
  left: 140px;
  top: 20px;
  width: calc(100% - 260px);
}

.artist {
  font-size: 20px;
  font-weight: 500;  /* Изменено с 400 на 500 для полужирного начертания */
  color: #353535;
}

.title {
  font-size: 28px;
  font-weight: 700;  /* Оставляем как есть */
  color: black;
  margin-bottom: 8px;
}

.controls {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 15px;
}

.play-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 20px 0 rgba(0, 0, 0, 0.35);
  text-align: center;
  line-height: 60px;
  font-size: 28px;
  color: #d32f2f;
  cursor: pointer;
  position: relative;
}

.play-button i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.play-button .mdi-pause {
  opacity: 0;
}

.player.playing .play-button .mdi-play {
  opacity: 0;
}

.player.playing .play-button .mdi-pause {
  opacity: 1;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-control i {
  color: #D32F2F;
  font-size: 24px;
}

.volume-control input[type="range"] {
  width: 120px;
  cursor: pointer;
}

.player.paused {
  border-bottom: none;
}

.player-buttons {
  position: absolute;
  top: 30px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.button-separator {
  width: 2px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 10px;
}

.player-button {
  background-color: #ddd;
  border: none;
  color: black;
  padding: 15px 30px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 18px;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.player-button.active {
  background-color: #D32F2F;
  color: white;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

.hidden {
  display: none;
}

.progress-bar-container {
  width: calc(100% - 40px);
  position: absolute;
  left: 20px;
  bottom: 10px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  z-index: 2;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #D32F2F, #ff6f60);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.page-wrapper {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: 420px;
  max-width: 100vw;
  z-index: 2000;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  transform: translateX(100%);
}

.page-wrapper:not(.hidden) {
  transform: translateX(0);
}

.page-wrapper.hidden {
  pointer-events: none;
}

.page-content {
  background: #fff;
  width: 600px;
  max-width: 100%;
  height: 100vh;
  box-shadow: -8px 0 32px rgba(0,0,0,0.18);
  border-radius: 16px 0 0 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.page-close {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 28px;
  color: #D32F2F;
  cursor: pointer;
  z-index: 10;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-frame {
  width: 100%;
  height: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  background: white;
  min-height: 850px;
}

.hidden {
  display: none !important;
}