/* Legendary Custom Player */
.legendary-player {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  display: flex;
  font-family: var(--sans);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.legendary-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.legendary-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 35%, rgba(0,0,0,0.45)), linear-gradient(0deg, rgba(0,0,0,0.82), transparent 38%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.legendary-player.is-playing .legendary-vignette {
  opacity: 0.3;
}

.legendary-center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(138, 77, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  font-size: 36px;
  color: white;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 0 40px rgba(138, 77, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.legendary-center-play:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(138, 77, 255, 0.4);
  box-shadow: 0 0 60px rgba(138, 77, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.6);
}

.glow-ring, .glow-ring-2 {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(110deg, var(--pink), var(--violet), var(--cyan)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: rotate 4s linear infinite;
  opacity: 0.7;
}

.glow-ring-2 {
  inset: -10px;
  animation: rotate 6s linear infinite reverse;
  opacity: 0.3;
  filter: blur(4px);
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

.legendary-controls-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 24px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 40%, transparent 100%);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

.legendary-player.show-controls .legendary-controls-wrapper,
.legendary-player:not(.is-playing) .legendary-controls-wrapper {
  opacity: 1;
  transform: translateY(0);
}

.legendary-progress-container {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 12px;
}

.legendary-progress-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.legendary-progress-container:hover .legendary-progress-bg,
.legendary-progress-container:hover .legendary-progress-fill {
  height: 8px;
}

.legendary-progress-fill {
  position: absolute;
  left: 0;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.legendary-progress-glow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: var(--pink);
  filter: blur(10px);
  opacity: 0.8;
}

.legendary-progress-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.legendary-progress-container:hover .legendary-progress-thumb {
  transform: translate(-50%, -50%) scale(1);
}

.legendary-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legendary-controls-left,
.legendary-controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legendary-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s ease;
  padding: 0;
}

.legendary-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(97, 217, 255, 0.5);
}

.play-btn {
  font-size: 28px;
}

.skip-btn {
  position: relative;
  font-size: 20px;
}

.skip-text {
  position: absolute;
  font-size: 8px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
}

.legendary-volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 120px;
}

.legendary-volume-slider {
  -webkit-appearance: none;
  width: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  opacity: 0;
  transition: all 0.3s ease;
  transform-origin: left;
}

.legendary-volume-container:hover .legendary-volume-slider {
  width: 80px;
  opacity: 1;
}

.legendary-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.legendary-time {
  font-size: 13px;
  font-weight: 500;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

.legendary-time .divider {
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 820px) {
  .legendary-volume-slider { display: none; }
  .legendary-volume-container { width: auto; }
  .skip-text { font-size: 7px; }
  .legendary-btn { font-size: 18px; gap: 8px; }
  .play-btn { font-size: 24px; }
  .legendary-time { font-size: 11px; }
  .legendary-controls-wrapper { padding: 20px 12px 10px; }
}