
:root {
  --primary-color: #00ff99;
  --secondary-color: #00ccff;
  --background: #000000;
  --card-bg: rgba(0, 0, 0, 0.8);
  --glass-effect: rgba(255, 255, 255, 0.1);
}

body {
  background: linear-gradient(135deg, var(--background), #001a0d);
  margin: 0;
  font-family: 'SF Pro Display', system-ui, -apple-system, sans-serif;
  color: white;
  min-height: 100vh;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 100px;
}

.toggle-player-btn {
  position: fixed;
  bottom: 85px;
  right: 20px;
  transform: none;
  background: rgba(0, 0, 0, 0.9);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 101;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 255, 153, 0.2);
  backdrop-filter: blur(8px);
}

.toggle-player-btn:hover {
  background: var(--primary-color);
  color: black;
  transform: translateX(-50%) translateY(-5px);
  box-shadow: 0 5px 25px rgba(0, 255, 153, 0.4);
}

.toggle-player-btn:active {
  transform: translateX(-50%) translateY(1px);
  box-shadow: 0 2px 15px rgba(0, 255, 153, 0.3);
}

.audio-player {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 90%;
  max-width: 800px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(30px);
  padding: 25px;
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 153, 0.3);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  box-shadow: 0 0 40px rgba(0, 255, 153, 0.2),
              inset 0 0 20px rgba(0, 255, 153, 0.1);
  cursor: move;
}

.audio-player .handle {
  width: 60px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 3px;
  margin: -20px auto 15px;
  opacity: 0.8;
  transition: all 0.3s ease;
  cursor: grab;
}

.audio-player .handle:active {
  cursor: grabbing;
  transform: scale(1.1);
  opacity: 1;
}

.audio-player .handle:hover {
  opacity: 1;
  box-shadow: 0 0 10px var(--primary-color);
}

.audio-player .handle:hover {
  opacity: 1;
}

.audio-player.hidden {
  transform: translateX(-50%) translateY(calc(100% + 80px));
}

.audio-player::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(45deg, 
    rgba(0, 255, 153, 0.5),
    rgba(0, 204, 255, 0.5),
    rgba(0, 255, 153, 0.5)
  );
  mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.audio-player.active {
  transform: translateX(-50%) translateY(0);
  animation: playerPulse 4s infinite;
}

@keyframes playerPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(0, 255, 153, 0.2); }
  50% { box-shadow: 0 0 60px rgba(0, 255, 153, 0.4); }
}

.player-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
}

.player-info {
  position: relative;
}

.now-playing {
  font-size: 0.9rem;
  color: rgba(0, 255, 153, 0.7);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.track-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 10px 0;
  text-shadow: 0 0 10px rgba(0, 255, 153, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 15px 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 255, 153, 0.2),
    transparent
  );
  animation: progressGlow 2s linear infinite;
}

@keyframes progressGlow {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, 
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
  transition: width 0.1s linear;
  position: relative;
}

.visualizer {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 80px;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 153, 0.2);
}

.bar {
  width: 3px;
  background: var(--primary-color);
  border-radius: 1px;
  transition: height 0.1s ease;
  box-shadow: 0 0 10px var(--primary-color);
}

.bar:nth-child(odd) {
  background: var(--secondary-color);
  box-shadow: 0 0 10px var(--secondary-color);
}

.audio-controls {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.control-button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 10px;
  border-radius: 50%;
  position: relative;
}

.control-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(45deg,
    rgba(0, 255, 153, 0.5),
    rgba(0, 204, 255, 0.5)
  );
  mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.control-button:hover::before {
  opacity: 1;
}

.stage {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 25px;
  margin: 30px 0;
  border: 2px solid rgba(0, 255, 153, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.audio-player {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 20px;
  padding: 25px;
  margin: 20px auto;
  max-width: 800px;
  border: 2px solid rgba(0, 255, 153, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 255, 153, 0.2);
  transition: all 0.3s ease;
}

.audio-player:hover {
  border-color: rgba(0, 255, 153, 0.8);
  box-shadow: 0 15px 40px rgba(0, 255, 153, 0.3);
}

.player-content {
  position: relative;
}

.track-header {
  text-align: center;
  margin-bottom: 20px;
}

.now-playing {
  color: var(--primary-color);
  font-size: 0.9em;
  margin-bottom: 5px;
}

.track-title {
  font-size: 1.2em;
  color: white;
  font-weight: bold;
}

.visualizer-container {
  height: 120px;
  position: relative;
  margin: 20px 0;
}

.visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
}

.bar {
  background: var(--primary-color);
  width: 4px;
  border-radius: 2px;
  transition: height 0.1s ease;
}

.time-display {
  position: absolute;
  bottom: 5px;
  right: 10px;
  color: var(--primary-color);
  font-size: 0.8em;
}

.progress-container {
  margin: 20px 0;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #00ccff);
  border-radius: 3px;
  position: relative;
  transition: width 0.1s linear;
}

.progress-handle {
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(0, 255, 153, 0.5);
}

.audio-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.control-button {
  background: rgba(0, 255, 153, 0.1);
  border: 2px solid rgba(0, 255, 153, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.control-button:hover {
  transform: scale(1.1);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 255, 153, 0.3);
}

.play-pause-btn {
  width: 60px;
  height: 60px;
}

.stage:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 255, 153, 0.2);
  border-color: var(--primary-color);
}

.section-title {
  color: var(--primary-color);
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.level-button {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(0, 255, 153, 0.3);
  color: var(--primary-color);
  padding: 12px 24px;
  border-radius: 12px;
  margin: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.level-button:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(0, 255, 153, 0.1);
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 255, 153, 0.2);
}

.level-button:active {
  transform: scale(0.98);
}

.audio-tracking {
  position: fixed;
  top: -100px;
  right: 20px;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 0 0 15px 15px;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: bold;
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: move;
  user-select: none;
  box-shadow: 0 0 20px rgba(0, 255, 153, 0.2);
}

.audio-tracking.visible {
  top: 0;
}

.tracking-content {
  padding: 15px 25px;
}

.handle {
  width: 40px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
  margin: 8px auto;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.audio-tracking:hover .handle {
  opacity: 1;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(0); }
  to { transform: translateY(-100%); }
}

@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(0, 255, 153, 0.3);
  }
  to {
    box-shadow: 0 0 30px rgba(0, 255, 153, 0.5);
  }
}

.favorites-section {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  padding: 25px;
  margin: 30px 0;
  border: 2px solid rgba(0, 255, 153, 0.3);
}

.favorites-section h2 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.bottom-navigation {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-top: 2px solid rgba(0, 255, 153, 0.3);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px 0;
  display: flex;
  justify-content: space-around;
  z-index: 1000;
}

.nav-box {
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 20px;
  border-radius: 12px;
  border: 2px solid rgba(0, 255, 153, 0.3);
  transition: all 0.3s ease;
}

.nav-box:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 255, 153, 0.2);
}

.nav-box a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 20px;
}

@media (max-width: 768px) {
  main {
    padding: 15px;
  }
  
  .stage {
    padding: 20px;
  }
  
  .level-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}
.loading-indicator {
    display: none;
    color: #00ff99;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
