body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background-color: #000;
}

.player-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

video {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  background-color: black;
}

.controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 50px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none; /* Prevent interaction when hidden */
  gap: 15px; /* Space between control elements */
}

.controls.visible {
  opacity: 1;
  pointer-events: auto; /* Allow interaction when visible */
}

.ctrl-btn, #volume-icon {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ff4747; /* Red color */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none; /* Hidden by default */
  z-index: 10;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ctrl-btn:hover, #volume-icon:hover {
  color: #ff4747; /* Brighter Red color on hover */
  transform: scale(1.1);
}

.volume-container {
  display: flex;
  align-items: center;
}

#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 8px;
  background: #555;
  border-radius: 5px;
  outline: none;
  transition: opacity 0.2s;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #ff4747; /* Brighter Red thumb */
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

#volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #ff4747; /* Brighter Red thumb */
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

#volume-slider:hover::-webkit-slider-thumb {
    background: #ff0000;
}

#volume-slider:hover::-moz-range-thumb {
    background: #ff0000;
}