* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  padding: 30px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #1a1a2e 50%, #2d1b4e 75%, #1a1a2e 100%);
  background-attachment: fixed;
  color: #e0e0ff;
  position: relative;
  overflow-x: hidden;
}

@keyframes slowDrift {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 100%; }
}

/* Effet de particules/étoiles en arrière-plan */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(255, 200, 150, 0.8), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(150, 200, 255, 0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255, 180, 200, 0.7), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(200, 220, 255, 0.5), transparent);
  background-size: 200px 150px;
  animation: twinkle 4s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes twinkle {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Effet de lueur ambiante */
body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(255, 120, 100, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Couche animée de nuages lumineux */
body .moving-bg {
  position: fixed;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(60% 40% at 20% 30%, rgba(90, 140, 255, 0.10), transparent 60%),
              radial-gradient(50% 35% at 80% 20%, rgba(255, 120, 160, 0.08), transparent 60%),
              radial-gradient(55% 45% at 70% 80%, rgba(100, 200, 255, 0.08), transparent 60%);
  filter: blur(12px);
  animation: slowDrift 18s ease-in-out infinite alternate;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 3px;
  margin-bottom: 30px;
  text-shadow: 
    0 0 10px rgba(100, 180, 255, 0.8),
    0 0 20px rgba(100, 180, 255, 0.5),
    0 0 40px rgba(100, 180, 255, 0.3);
  color: #fff;
  position: relative;
  z-index: 1;
}

#nowplaying {
  font-size: 1.2rem;
  margin: 20px auto;
  max-width: 600px;
  padding: 15px 25px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #a0d8ff;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

#player {
  max-width: 500px;
  margin: 30px auto;
  position: relative;
  z-index: 1;
}

/* Style APlayer personnalisé */
.aplayer {
  background: rgba(30, 30, 60, 0.6) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(100, 150, 255, 0.2) !important;
  border-radius: 16px !important;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(80, 120, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  overflow: hidden;
}

.aplayer .aplayer-info {
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.aplayer .aplayer-info .aplayer-music {
  color: #fff !important;
}

.aplayer .aplayer-info .aplayer-music .aplayer-title {
  color: #a0d8ff !important;
  text-shadow: 0 0 10px rgba(100, 180, 255, 0.5);
}

.aplayer .aplayer-info .aplayer-music .aplayer-author {
  color: rgba(255, 255, 255, 0.5) !important;
}

.aplayer .aplayer-lrc {
  background: linear-gradient(
    transparent 0%,
    rgba(20, 20, 50, 0.8) 15%,
    rgba(20, 20, 50, 0.9) 50%,
    rgba(20, 20, 50, 0.8) 85%,
    transparent 100%
  ) !important;
}

.aplayer .aplayer-lrc p {
  color: rgba(200, 220, 255, 0.6) !important;
  transition: all 0.3s ease;
}

.aplayer .aplayer-lrc p.aplayer-lrc-current {
  color: #fff !important;
  text-shadow: 
    0 0 10px rgba(100, 200, 255, 0.8),
    0 0 20px rgba(100, 200, 255, 0.5);
  font-size: 1.1em !important;
}

.aplayer .aplayer-controller .aplayer-bar-wrap .aplayer-bar {
  background: rgba(255, 255, 255, 0.1) !important;
}

.aplayer .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {
  background: rgba(100, 150, 255, 0.3) !important;
}

.aplayer .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
  background: linear-gradient(90deg, #4facfe, #00f2fe) !important;
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

.aplayer .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {
  background: #fff !important;
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.8);
}

.aplayer .aplayer-icon {
  filter: brightness(1.5) !important;
}

.aplayer .aplayer-pic {
  background-color: rgba(100, 150, 255, 0.2) !important;
  box-shadow: 0 0 20px rgba(100, 150, 255, 0.3);
}

#offset-control {
  max-width: 400px;
  margin: 25px auto;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: center;
  position: relative;
  z-index: 1;
}

#offset-control label {
  color: rgba(200, 220, 255, 0.8);
  font-size: 0.9rem;
}

#offset-control input[type="number"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(100, 150, 255, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  width: 80px;
  color: #fff;
  font-size: 1rem;
  margin: 0 10px;
  outline: none;
  transition: all 0.3s ease;
}

#offset-control input[type="number"]:focus {
  border-color: rgba(100, 200, 255, 0.6);
  box-shadow: 0 0 15px rgba(100, 200, 255, 0.3);
}

#offset-control button {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

#offset-control button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(79, 172, 254, 0.4),
    0 0 30px rgba(100, 200, 255, 0.3);
}

#offset-control button:active {
  transform: translateY(0);
}

#lyrics {
  max-width: 600px;
  margin: 25px auto;
  padding: 20px 25px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(200, 220, 255, 0.7);
  text-align: center;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

/* Animation de respiration pour les éléments */
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 20px rgba(100, 150, 255, 0.1); }
  50% { box-shadow: 0 0 30px rgba(100, 150, 255, 0.2); }
}

#player {
  animation: breathe 4s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 15px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  #nowplaying {
    font-size: 1rem;
    padding: 12px 20px;
  }
  
  #offset-control {
    padding: 12px 15px;
  }
  
  #offset-control input[type="number"] {
    width: 60px;
  }
}