@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700&display=swap");

:root {
  --primary-black: #000000;
  --secondary-black: #1a1a1a;
  --primary-white: #ffffff;
  --secondary-white: #f0f0f0;
  --accent-red: #ff0000;
  --dark-red: #cc0000;
  --light-red: #ff3333;
  --shadow-black: rgba(0, 0, 0, 0.8);
  --shadow-red: rgba(255, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Nunito", sans-serif;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 50%, var(--primary-black) 100%);
  overflow: hidden;
}

/* 背景动画效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, var(--accent-red) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--accent-red) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, var(--accent-red) 0%, transparent 50%);
  opacity: 0.05;
  animation: backgroundPulse 4s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes backgroundPulse {
  0% {
    opacity: 0.03;
    transform: scale(1);
  }
  100% {
    opacity: 0.08;
    transform: scale(1.1);
  }
}

/* 音频可视化背景 */
.audio-visualizer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: end;
  justify-content: center;
  z-index: -1;
}

.audio-bar {
  width: 4px;
  margin: 0 2px;
  background: linear-gradient(to top, var(--accent-red), var(--light-red));
  border-radius: 2px;
  opacity: 0.6;
  animation: audioWave 1.5s ease-in-out infinite;
}

.audio-bar:nth-child(odd) {
  animation-delay: 0.1s;
}

.audio-bar:nth-child(even) {
  animation-delay: 0.3s;
}

@keyframes audioWave {
  0%, 100% {
    height: 10px;
  }
  50% {
    height: 40px;
  }
}

.album-cover {
  width: 90%;
  position: relative;
}

.swiper {
  width: 100%;
  padding: 40px 0 100px;
}

.swiper-slide {
  position: relative;
  max-width: 200px;
  aspect-ratio: 1/1;
  border-radius: 15px;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.swiper-slide img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  border: 3px solid transparent;
  transition: all 0.5s ease;
  filter: grayscale(0.3) brightness(0.8);
}

/* 播放状态下的封面效果 */
.swiper-slide-active img {
  border: 3px solid var(--accent-red);
  filter: grayscale(0) brightness(1.1);
  box-shadow: 
    0 0 30px var(--shadow-red),
    0 0 60px var(--shadow-red),
    0 10px 40px var(--shadow-black);
}

/* 播放时的放大和脉动动画 */
.swiper-slide.playing {
  transform: scale(1.15);
  z-index: 10;
}

.swiper-slide.playing img {
  animation: playingPulse 2s ease-in-out infinite;
}

@keyframes playingPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 0 30px var(--shadow-red),
      0 0 60px var(--shadow-red),
      0 10px 40px var(--shadow-black);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 
      0 0 40px var(--shadow-red),
      0 0 80px var(--shadow-red),
      0 15px 50px var(--shadow-black);
  }
}

/* 播放指示器 */
.swiper-slide.playing::after {
  content: '♪';
  position: absolute;
  top: -15px;
  right: -15px;
  width: 30px;
  height: 30px;
  background: var(--accent-red);
  color: var(--primary-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  animation: musicNote 1s ease-in-out infinite;
  box-shadow: 0 0 20px var(--shadow-red);
}

@keyframes musicNote {
  0%, 100% {
    transform: rotate(-10deg) scale(1);
  }
  50% {
    transform: rotate(10deg) scale(1.1);
  }
}

.swiper-slide:hover img {
  transform: translateY(-5px);
  filter: grayscale(0) brightness(1.2);
}

/* Music Player */
.music-player {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--primary-white);
  width: 400px;
  padding: 20px 40px;
  border-radius: 25px;
  background: linear-gradient(145deg, var(--secondary-black), var(--primary-black));
  border: 2px solid var(--accent-red);
  box-shadow: 
    0 20px 60px var(--shadow-black),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.music-player::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.music-player h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 5px;
  color: var(--primary-white);
  text-shadow: 0 0 10px var(--shadow-red);
  position: relative;
  z-index: 1;
}

.music-player.playing h1 {
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% {
    text-shadow: 0 0 10px var(--shadow-red);
    color: var(--primary-white);
  }
  100% {
    text-shadow: 0 0 20px var(--accent-red);
    color: var(--light-red);
  }
}

.music-player p {
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.8;
  color: var(--secondary-white);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

/* Music Player Progress */
#progress {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: var(--secondary-black);
  border-radius: 4px;
  margin: 25px 0;
  cursor: pointer;
  position: relative;
  z-index: 1;
  border: 1px solid var(--accent-red);
}

#progress::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  background: var(--accent-red);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: 
    0 0 10px var(--shadow-red),
    0 0 20px var(--shadow-red);
  cursor: pointer;
  transition: all 0.3s ease;
}

#progress::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 
    0 0 15px var(--shadow-red),
    0 0 30px var(--shadow-red);
}

/* Music Player Controls */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, var(--secondary-black), var(--primary-black));
  color: var(--primary-white);
  border-radius: 50%;
  border: 2px solid var(--accent-red);
  outline: 0;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.controls button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--accent-red);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.controls button:hover::before {
  width: 100%;
  height: 100%;
}

.controls button:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 10px 30px var(--shadow-black),
    0 0 20px var(--shadow-red);
  color: var(--primary-white);
}

/* 播放按钮特殊效果 */
.controls button:nth-child(2) {
  width: 80px;
  height: 80px;
  font-size: 1.5rem;
  border-width: 3px;
}

.controls button:nth-child(2):hover {
  transform: translateY(-5px) scale(1.05);
}

/* 播放状态指示 */
.controls button.playing {
  background: var(--accent-red);
  animation: playingButton 1.5s ease-in-out infinite;
  box-shadow: 
    0 0 30px var(--shadow-red),
    0 10px 40px var(--shadow-black);
}

@keyframes playingButton {
  0%, 100% {
    box-shadow: 
      0 0 30px var(--shadow-red),
      0 10px 40px var(--shadow-black);
  }
  50% {
    box-shadow: 
      0 0 50px var(--shadow-red),
      0 15px 50px var(--shadow-black);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .music-player {
    width: 350px;
    padding: 15px 30px;
  }
  
  .music-player h1 {
    font-size: 1.5rem;
  }
  
  .controls button {
    width: 50px;
    height: 50px;
  }
  
  .controls button:nth-child(2) {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 480px) {
  .music-player {
    width: 300px;
    padding: 15px 25px;
  }
  
  .swiper-slide {
    max-width: 150px;
  }
} 