.video-player {
  position: relative;
  background: gainsboro;
  display: block;
  max-width: 100%;
}

video {
  width: 100%;
  height: auto;
  display: block;
  background: black;
}

.video-controls {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 70px;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  color: white;
  justify-content: space-between;
}

.video-controls.hide {
  display: none;
}

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

input[type="range"] {
  width: 200px;
  max-width: 600px;
  -webkit-appearance: none;
  background: white;
  height: 2px;
  cursor: pointer;
}

/* Styling the thumb for webkit browsers */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: orangered;
  height: 7px;
  width: 7px;
  border-radius: 50%;
  border: 0.5px solid black;
  cursor: pointer;
}

#timePlayed, #duration {
  font-size: 12px;
  margin: 5px;
}

/*Buttons for controls*/
.play-btn, .skip-btn1, .skip-btn2, .mute-btn, .fullscreen-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
}

.settings-container {
  position: relative;
  display: inline-block;
}

.settings-btn {
  padding: 6px;
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  bottom: 120%; /* appears above the button */
  right: 0;
  background-color: white;
  color: white;
  min-width: 150px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  z-index: 10;
}

.dropdown-menu span {
  display: block;
  padding: 10px;
  color: black;
  cursor: pointer;
}

.dropdown-menu span:hover {
  background-color: cyan;
}

.dropdown-menu.show {
  display: block;
}

svg[data-lucide] {
  stroke: black;
  stroke-width: 1px;
}



/*Styling the CC/Subtitles*/
video::cue {
  color: white;
  background: rgba(0, 0, 0, 0.8);
  font-size: 16px;
  font-family: 'Arial', sans-serif;
  padding: 3px 6px;
  border-radius: 4px;
}

#qualitySelector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  color: black;
  padding: 8px;
  cursor: pointer;
  user-select: none;
}

#qualitySelector:hover {
  background: cyan;
}

.quality-menu {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  width: 100px;
  background: white;
  color: black;
  border: 1px solid #ccc;
  border-radius: 5px;
  overflow: hidden;
  z-index: 10;
}

.quality-option {
  padding: 8px 12px;
  cursor: pointer;
}

.quality-option:hover {
  background-color: #f0f0f0;
}

.quality-option.selected::after {
  content: " •";
  color: black;
  font-weight: bold;
  margin: 10px;
}

/* Show menu on hover */
#qualitySelector:hover .quality-menu {
  display: block;
}

#appliedMessage {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  height: 40px;
  width: 300px;
  background: white;
  color: black;
  font-size: 14px;
  border-radius: 15px;
  z-index: 9999;
  display: none; /* toggle this in JS */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  animation: fadeInOut 3s forwards;
  /* Centering */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Optional fade animation */
@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  10%, 90% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}