/* ═══════════════════════════════════════════════════════════════
   MUSIC VIDEO PLAYER STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Video Wrapper - fits into MySpace player module */
.custom-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  border: 1px solid #3a1a3a;
}

/* Canvas - where the magic happens */
#musicVideoCanvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Video Controls Overlay */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  padding: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 15;
  pointer-events: auto;
}

.custom-video-wrapper:hover .video-controls,
.video-controls.show {
  opacity: 1;
}

/* Time Scrubber */
.time-scrubber {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-display {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #00ffcc;
  min-width: 80px;
  text-shadow: 0 0 5px rgba(0, 255, 200, 0.5);
}

.scrubber-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.scrubber-progress {
  height: 100%;
  background: linear-gradient(to right, #ff0066, #00ffcc);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.scrubber-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #00ffcc;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 0 10px rgba(0, 255, 200, 0.8);
}

.scrubber-handle:active {
  cursor: grabbing;
}

/* Volume Control */
.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-icon {
  font-size: 18px;
  color: #ff0066;
  cursor: pointer;
  text-shadow: 0 0 5px rgba(255, 0, 100, 0.5);
  user-select: none;
}

.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ff0066;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 0, 100, 0.8);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ff0066;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 0, 100, 0.8);
}

/* Play Button Overlay */
.custom-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.5s ease;
  cursor: pointer;
  pointer-events: auto;
}

.custom-video-overlay[style*="display: none"] {
  pointer-events: none;
}

/* Play Button */
.video-play-btn {
  width: 80px;
  height: 80px;
  background: rgba(255, 0, 100, 0.2);
  border: 3px solid #ff0066;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.video-play-btn:hover {
  background: rgba(255, 0, 100, 0.4);
  border-color: #ff00aa;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 0, 100, 0.6);
}

.video-play-btn:active {
  transform: scale(0.95);
}

/* Play Icon */
.play-icon {
  font-size: 32px;
  color: #ff0066;
  margin-left: 4px; /* Optical centering for triangle */
  text-shadow: 
    0 0 10px rgba(255, 0, 100, 0.8),
    0 0 20px rgba(255, 0, 100, 0.4);
  animation: playIconPulse 2s ease-in-out infinite;
}

@keyframes playIconPulse {
  0%, 100% {
    opacity: 1;
    text-shadow: 
      0 0 10px rgba(255, 0, 100, 0.8),
      0 0 20px rgba(255, 0, 100, 0.4);
  }
  50% {
    opacity: 0.7;
    text-shadow: 
      0 0 15px rgba(255, 0, 100, 1),
      0 0 30px rgba(255, 0, 100, 0.6);
  }
}

/* CRT Scanline Effect (subtle, applied to button) */
.video-play-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  pointer-events: none;
  animation: scanlineScroll 8s linear infinite;
}

@keyframes scanlineScroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(4px);
  }
}

/* Audio Element (hidden) */
#musicVideoAudio {
  display: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .video-play-btn {
    width: 60px;
    height: 60px;
  }
  
  .play-icon {
    font-size: 24px;
  }
  
  .video-controls {
    padding: 10px;
    gap: 10px;
  }
  
  .volume-slider {
    width: 60px;
  }
}

/* Loading State (optional) */
.custom-video-wrapper.loading::after {
  content: 'LOADING...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #00ff00;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
  pointer-events: none;
  z-index: 5;
}
