/* Metaverse Radio Player Styles */

.metaverse-radio-container {
  position: relative;
  background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
  border: 2px solid rgba(0, 255, 209, 0.3);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0, 255, 209, 0.2);
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  overflow: hidden;
}

.metaverse-radio-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(0, 255, 209, 0.05) 50%, transparent 70%);
  animation: scanline 3s linear infinite;
  pointer-events: none;
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* Radio Mode (Compact) */
.metaverse-radio-compact {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.metaverse-radio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.metaverse-radio-title {
  font-size: 1.2em;
  background: linear-gradient(45deg, #00FFD1, #ff00ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

.metaverse-radio-expand-btn {
  background: rgba(0, 255, 209, 0.2);
  border: 1px solid rgba(0, 255, 209, 0.5);
  color: #00FFD1;
  padding: 5px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.3s;
}

.metaverse-radio-expand-btn:hover {
  background: rgba(0, 255, 209, 0.3);
  box-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

.metaverse-radio-artwork {
  width: 600px;
  height: 600px;
  margin: 0 auto;
  border-radius: 10px;
  border: 2px solid rgba(0, 255, 209, 0.5);
  box-shadow: 0 0 20px rgba(0, 255, 209, 0.3);
  overflow: hidden;
  position: relative;
}

.metaverse-radio-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voxels-artwork-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

.voxels-artwork-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
  display: block;
}

.metaverse-radio-artwork::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(0, 255, 209, 0.1) 100%);
  pointer-events: none;
}

.metaverse-radio-track-info {
  text-align: center;
  padding: 10px 0;
}

.metaverse-radio-track-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #00FFD1;
  margin-bottom: 5px;
  text-shadow: 0 0 5px rgba(0, 255, 209, 0.5);
}

.metaverse-radio-track-artist {
  font-size: 0.9em;
  color: #C0C0C0;
}

.metaverse-radio-visualizer {
  width: 100%;
  height: 80px;
  margin: 15px 0;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 209, 0.3);
}

/* Mobile CSS visualizer fallback - replaces canvas animation to save memory for Voxels */
@media (max-width: 768px) {
  .metaverse-radio-visualizer {
    background: linear-gradient(90deg, 
      rgba(0,255,209,0.15) 0%, 
      rgba(255,0,255,0.25) 25%,
      rgba(0,255,209,0.3) 50%,
      rgba(255,0,255,0.25) 75%,
      rgba(0,255,209,0.15) 100%);
    background-size: 200% 100%;
    animation: mobileVisualizerFlow 3s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 255, 209, 0.15);
  }
  
  .metaverse-radio-visualizer.audio-playing {
    animation: mobileVisualizerActive 1.5s ease-in-out infinite;
  }
}

@keyframes mobileVisualizerFlow {
  0% { background-position: 0% 50%; opacity: 0.6; }
  50% { background-position: 100% 50%; opacity: 0.9; }
  100% { background-position: 0% 50%; opacity: 0.6; }
}

@keyframes mobileVisualizerActive {
  0% { background-position: 0% 50%; opacity: 0.7; box-shadow: 0 0 15px rgba(0, 255, 209, 0.2); }
  25% { opacity: 0.9; box-shadow: 0 0 25px rgba(255, 0, 255, 0.3); }
  50% { background-position: 100% 50%; opacity: 1; box-shadow: 0 0 30px rgba(0, 255, 209, 0.4); }
  75% { opacity: 0.9; box-shadow: 0 0 25px rgba(255, 0, 255, 0.3); }
  100% { background-position: 0% 50%; opacity: 0.7; box-shadow: 0 0 15px rgba(0, 255, 209, 0.2); }
}

.metaverse-radio-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.metaverse-radio-btn {
  background: rgba(0, 255, 209, 0.2);
  border: 1px solid rgba(0, 255, 209, 0.5);
  color: #00FFD1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  transition: all 0.3s;
}

.metaverse-radio-btn:hover {
  background: rgba(0, 255, 209, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 209, 0.5);
  transform: scale(1.1);
}

.metaverse-radio-btn.play-pause {
  width: 50px;
  height: 50px;
  font-size: 1.5em;
}

.metaverse-radio-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 15px;
}

.metaverse-radio-volume-slider {
  width: 100px;
  height: 5px;
  background: rgba(0, 255, 209, 0.2);
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
}

.metaverse-radio-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: #00FFD1;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

.metaverse-radio-volume-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background: #00FFD1;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

/* Playlist Mode (Expanded) */
.metaverse-radio-expanded {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.metaverse-radio-playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.metaverse-radio-search {
  flex: 1;
  max-width: 300px;
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 209, 0.3);
  border-radius: 5px;
  color: #ffffff;
  font-size: 0.9em;
}

.metaverse-radio-search:focus {
  outline: none;
  border-color: #00FFD1;
  box-shadow: 0 0 10px rgba(0, 255, 209, 0.3);
}

.metaverse-radio-playlist {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(0, 255, 209, 0.3);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
}

.metaverse-radio-playlist::-webkit-scrollbar {
  width: 8px;
}

.metaverse-radio-playlist::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
}

.metaverse-radio-playlist::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 209, 0.3);
  border-radius: 5px;
}

.metaverse-radio-playlist::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 209, 0.5);
}

.metaverse-radio-playlist-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  margin-bottom: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.metaverse-radio-playlist-item:hover {
  background: rgba(0, 255, 209, 0.1);
  border-color: rgba(0, 255, 209, 0.3);
}

.metaverse-radio-playlist-item.active {
  background: rgba(0, 255, 209, 0.2);
  border-color: rgba(0, 255, 209, 0.5);
  box-shadow: 0 0 10px rgba(0, 255, 209, 0.3);
}

.metaverse-radio-playlist-item-artwork {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  border: 1px solid rgba(0, 255, 209, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.metaverse-radio-playlist-item-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.metaverse-radio-playlist-item-info {
  flex: 1;
  min-width: 0;
}

.metaverse-radio-playlist-item-title {
  font-weight: bold;
  color: #00FFD1;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metaverse-radio-playlist-item-artist {
  font-size: 0.85em;
  color: #C0C0C0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metaverse-radio-playlist-stats {
  text-align: center;
  font-size: 0.9em;
  color: #C0C0C0;
  margin-top: 10px;
}

.metaverse-radio-shuffle-btn {
  background: rgba(0, 255, 209, 0.2);
  border: 1px solid rgba(0, 255, 209, 0.5);
  color: #00FFD1;
  padding: 5px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.3s;
}

.metaverse-radio-shuffle-btn.active {
  background: rgba(0, 255, 209, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

.metaverse-radio-shuffle-btn:hover {
  background: rgba(0, 255, 209, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .metaverse-radio-container {
    padding: 15px;
  }
  
  .metaverse-radio-artwork {
    width: 400px;
    height: 400px;
    max-width: 100%;
  }
  
  .metaverse-radio-playlist {
    max-height: 300px;
  }
  
  .metaverse-radio-controls {
    flex-wrap: wrap;
  }
  
  .metaverse-radio-volume {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 10px;
  }
}

/* Fullscreen Button */
.voxels-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(0, 255, 209, 0.5);
  color: #00FFD1;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
}

.voxels-fullscreen-btn:hover {
  background: rgba(0, 255, 209, 0.2);
  border-color: #00FFD1;
  transform: scale(1.1);
}

/* Fullscreen Wrapper */
#metaverse-fullscreen-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #000;
  transform: translateZ(0);
  will-change: transform;
}

#metaverse-fullscreen-wrapper > div:first-child {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#metaverse-fullscreen-wrapper iframe {
  transform: translateZ(0);
  will-change: transform;
}

#fullscreen-visualizer-container {
  transform: translateZ(0);
  will-change: transform;
}

#fullscreen-visualizer {
  transform: translateZ(0);
  will-change: auto;
}

/* Footer Player (Fullscreen Mode) */
.metaverse-radio-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.98) 0%, rgba(26, 26, 26, 0.95) 50%, rgba(10, 10, 10, 0.92) 100%);
  /* Removed backdrop-filter for better performance - using solid background instead */
  border-top: 2px solid rgba(0, 255, 209, 0.5);
  padding: 20px;
  z-index: 10000;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 209, 0.2);
  animation: slideUpFooter 0.3s ease-out;
}

/* Fallback: if footer is on body (old method), use fixed */
body > .metaverse-radio-footer {
  position: fixed;
}

@keyframes slideUpFooter {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.footer-player-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}

.footer-track-info {
  flex: 1;
  min-width: 0;
}

.footer-track-title {
  color: #00FFD1;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-track-artist {
  color: #C0C0C0;
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.footer-volume-slider {
  width: 100px;
  height: 5px;
  background: rgba(0, 255, 209, 0.2);
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.footer-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: #00FFD1;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

.footer-volume-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background: #00FFD1;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

.footer-btn {
  background: rgba(0, 255, 209, 0.2);
  border: 2px solid rgba(0, 255, 209, 0.5);
  color: #00FFD1;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.footer-btn:hover {
  background: rgba(0, 255, 209, 0.3);
  border-color: #00FFD1;
  transform: scale(1.1);
}

.footer-play-pause {
  width: 55px;
  height: 55px;
  font-size: 22px;
}

.footer-exit-fullscreen {
  background: rgba(255, 0, 0, 0.2);
  border: 2px solid rgba(255, 0, 0, 0.5);
  color: #ff4444;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.footer-exit-fullscreen:hover {
  background: rgba(255, 0, 0, 0.3);
  border-color: #ff4444;
  transform: scale(1.1);
}

/* Responsive footer */
@media (max-width: 768px) {
  .footer-player-content {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .footer-track-info {
    width: 100%;
    text-align: center;
  }
  
  .footer-controls {
    flex: 1;
    justify-content: center;
  }
  
  .footer-exit-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px;
  }
  
  /* Mobile: CSS-only visualizer to save GPU memory for Voxels */
  .mobile-visualizer-active {
    background: linear-gradient(180deg, 
      rgba(0,255,209,0.15) 0%, 
      rgba(255,0,255,0.15) 50%,
      rgba(0,255,209,0.15) 100%) !important;
    animation: mobileVisualizerPulse 2s ease-in-out infinite !important;
  }
  
  @keyframes mobileVisualizerPulse {
    0%, 100% { 
      opacity: 0.6;
      background-size: 100% 100%;
    }
    50% { 
      opacity: 1;
      background-size: 100% 120%;
    }
  }
  
  /* Disable container animations on mobile */
  .metaverse-radio-container::before {
    animation: none !important;
    opacity: 0 !important;
  }
}

