/* Custom Video Wrapper */
.media__video {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.custom-video-wrapper {
  position: relative !important;
  height: 100% !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  cursor: default;
}

.custom-video-player {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Custom Controls - positioned over video */
.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
  padding: 0 1.5rem 1rem 1.5rem;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.top-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  color: #fff;
}

.filename {
  font-family: var(--font-family);
  line-height: 0.9375rem;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 400;
  user-select: none;
}

.time-display {
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 400;
  user-select: none;
}

.time-separator {
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 400;
  user-select: none;
}

.progress-container {
  width: 100%;
  margin-bottom: 0.7rem;
  cursor: pointer;
}

.progress-bar {
  width: 100%;
  height: 0.125rem;
  background-color: #74777f;
  overflow: hidden;
  transition: height 0.2s;
}

.progress-container:hover .progress-bar {
  height: 0.25rem;
}

.progress-filled {
  height: 100%;
  background-color: #e0e2ec;
  width: 0%;
  transition: width 0.1s linear;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.controls-left,
.controls-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.control-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0.85;
}

.control-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.control-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.control-btn svg {
  fill: currentColor;
}

.play-btn {
  /* padding: 6px;
  margin-right: 8px; */
}

.skip-btn svg text {
  /* font-size: 8px;
  font-weight: bold; */
}

/* Volume Control */
.volume-control {
  position: relative;
  display: flex;
  align-items: center;
}

.volume-slider-container {
  position: relative;
  padding: 12px 8px;
  border-radius: 8px;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.volume-control:hover .volume-slider-container {
  opacity: 1;
  pointer-events: auto;
}

.volume-slider {
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  transform-origin: center;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.volume-btn svg path {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.volume-btn svg path.active {
  opacity: 1;
}

/* Optional: add subtle scale animation for waves */
.volume-high,
.volume-medium {
  transform-origin: center;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.volume-high.active,
.volume-medium.active {
  animation: volumeWave 0.3s ease;
}

@keyframes volumeWave {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Settings Menu */
.settings-menu {
  position: absolute;
  bottom: 70px;
  right: 24px;
  background: rgba(28, 28, 28, 0.98);
  border-radius: 8px;
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 20;
}

.settings-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.settings-menu__header {
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-menu__options {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
}

.settings-option {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.settings-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.settings-option.active {
  color: #4a9eff;
}

.settings-option .check-mark {
  opacity: 0;
  font-size: 16px;
  transition: opacity 0.2s;
}

.settings-option.active .check-mark {
  opacity: 1;
}

/* Quality Toast */
.quality-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(28, 28, 28, 0.95);
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1001;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.quality-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Responsive */
@media (max-width: 768px) {
  .custom-controls {
    padding: 60px 16px 16px;
  }

  .top-info {
    margin-bottom: 8px;
  }

  .filename,
  .time-display {
    font-size: 13px;
  }

  .controls-row {
    gap: 8px;
  }

  .controls-left,
  .controls-right {
    gap: 6px;
  }

  .control-btn {
    padding: 6px;
  }

  .skip-btn {
    display: none;
  }

  .volume-slider-container {
    display: none;
  }

  .settings-menu {
    right: 16px;
    bottom: 60px;
  }
}
