/* Basic styles for the video and overlay */

:root {
    --value: 100%; /* Set default volume color to 100% */
}

#timeDisplay {
    display: flex;              /* Use flexbox for alignment */
    align-items: center;       /* Center items vertically */
    color: white;              /* Set text color to white */
    font-size: 16px;           /* Adjust font size as needed */
}

/* Optional: Style for better visibility */
#timeDisplay span {
    margin: 0 5px;             /* Space between current time and total time */
}


/* Volume control hidden initially with width 0 and transition */
#volumeControl {
    position: relative;
    width: 0;                    /* Hidden initially */
    margin-left: 10px;            /* Space between icon and slider */
    
    opacity: 0;                   /* Initially hidden */
    transition: width 0.3s ease, opacity 0.3s ease; /* Smooth width and fade-in */
    
    display: flex;                /* Flex container for the slider */
    align-items: center;          /* Vertically align the slider */
}

#volumeIconContainer {
    position: relative;
    display: flex;
    align-items: center; /* Ensure both icon and slider are vertically aligned */
}

/* Hover effect to trigger the slider appearance */
#volumeIconContainer:hover #volumeControl {
    width: 100px;                /* Full width on hover */
    opacity: 1;                  /* Fade in to full opacity */
    display: flex;               /* Display flex to show the slider */
}

#volumeSlider {
    width: 100%;
    margin-left: 14px;
}

/* Style the range input */
input[type="range"] {
    -webkit-appearance: none; /* Override default appearance */
    width: 100%; /* Full-width */
    background: transparent; /* Make background transparent */
}

/* Track style for Chrome, Safari, and Edge */
input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none; /* Override default appearance */
    appearance: none; /* Override default appearance */
    height: 8px; /* Track height */
    border-radius: 5px; /* Rounded corners */
    background: linear-gradient(to right, #FFBB61 0%, #FFBB61 var(--value), #ddd var(--value), #ddd 100%); /* Use the CSS variable */
}

/* Left track style for Chrome, Safari, and Edge */
input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none; /* Override default appearance */
    appearance: none; /* Override default appearance */
    width: 6px; /* Thumb width */
    height: 6px; /* Thumb height */
    background: linear-gradient(to right, #FFBB61 0%, #FFBB61 var(--value), #ddd var(--value), #ddd 100%);
    cursor: pointer; /* Pointer cursor on hover */
}

/* Thumb style */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; /* Override default appearance */
    appearance: none; /* Override default appearance */
    width: 15px; /* Thumb width */
    height: 15px; /* Thumb height */
    background: #FF5722; /* Custom thumb color */
    border-radius: 50%; /* Round thumb */
    cursor: pointer; /* Pointer cursor on hover */
    margin-top: -4px; /* Center the thumb vertically (half of track height) */
}

/* Track style for Firefox */
input[type="range"]::-moz-range-track {
    height: 8px; /* Track height */
    border-radius: 5px; /* Rounded corners */
    background: linear-gradient(to right, #FFBB61 0%, #FFBB61 var(--value), #ddd var(--value), #ddd 100%);
}

/* Left track for Firefox */
input[type="range"]::-moz-range-progress {
    background: #FFBB61; /* Left track color */
}

/* Right track for Firefox */
input[type="range"]::-moz-range-background {
    background: #ddd; /* Right track color */
}

/* Thumb style for Firefox */
input[type="range"]::-moz-range-thumb {
    width: 15px; /* Thumb width */
    height: 15px; /* Thumb height */
    background: #FF5722; /* Custom thumb color */
    border-radius: 50%; /* Round thumb */
    cursor: pointer; /* Pointer cursor on hover */
    margin-top: -4px; /* Center the thumb vertically */
}

/* For Internet Explorer */
input[type="range"]::-ms-track {
    height: 8px; /* Track height */
    border-color: transparent; /* Track border */
    color: transparent; /* Track color */
}

input[type="range"]::-ms-fill-lower {
    background: #FFBB61; /* Left track color */
    border-radius: 5px; /* Rounded corners */
}

input[type="range"]::-ms-fill-upper {
    background: #ddd; /* Right track color */
    border-radius: 5px; /* Rounded corners */
}

input[type="range"]::-ms-thumb {
    width: 15px; /* Thumb width */
    height: 15px; /* Thumb height */
    background: #FF5722; /* Custom thumb color */
    border-radius: 50%; /* Round thumb */
    cursor: pointer; /* Pointer cursor on hover */
    margin-top: -4px; /* Center the thumb vertically */
}

/* Optional hover effect for thumb */
input[type="range"]:hover::-webkit-slider-thumb {
    background: #D45D12; /* Darker thumb color on hover */
}

.muted input[type="range"]::-webkit-slider-runnable-track {
    background: #ddd; /* Color for muted state */
}

.muted input[type="range"]::-moz-range-track {
    background: #ddd; /* Color for muted state */
}

.muted input[type="range"]::-ms-fill-lower {
    background: #ddd; /* Color for muted state */
}




.hide-cursor {
    cursor: none; /* Hide the cursor */
}

#playerContainer {
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
}

#controlsContainer {
    display: flex; /* or 'none' initially */
    opacity: 1; /* Fully visible */
    transition: opacity 0.5s ease; /* Smooth transition for opacity */
    pointer-events: auto; /* Allow interactions when visible */
}

#controlsContainer.hidden {
    opacity: 0; /* Fully transparent */
    pointer-events: none; /* Disable interactions when hidden */
}


#playButton , #pauseButton , #fullscreenButton, #captionButton, #muteButton  {
    background: none; /* Remove background color */
    border: none; /* Remove borders */
    padding: 0; /* Remove padding */
    cursor: pointer; /* Ensure the pointer cursor is still shown on hover */
    font-size: 22px;
    color: white;
}

#muteButton  {
    margin-right: -10px;
    margin-left: 2px;
}

#timeline {
    width: 90%;
    height: 10px;
    background-color: #e0e0e0;
    margin: 10px auto; /* This centers the timeline horizontally */
    z-index: 99;
    cursor: pointer;
    border-radius: 5px; /* Half of the height for rounded progress bar */
    overflow: hidden;
}

#progress {
    height: 100%;
    background-color: #FFBB61; /* Match your primary button color */
    width: 0%; /* Initially 0, will be updated with JS */;
    z-index: 99;
    border-radius: 5px; /* Half of the height for rounded progress bar */
}

#fullscreenContainer {
    position: relative; /* Make this a positioned container */
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

#player {
    max-width: 100%; /* Responsive width */
    max-height: 100%; /* Responsive height */
    pointer-events: none; /* Disable pointer events on the iframe */
}

.video-controls {
    position: absolute; /* Position controls absolutely */
    bottom: 0; /* Center vertically */
    display: flex; /* Use flexbox for layout */
    gap: 10px; /* Space between buttons */
    z-index: 10;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 7px;
}

#controls button,
#controls select {
    background-color: rgba(255, 255, 255, 0.7); /* Semi-transparent background */
    border: none; /* Remove border */
    padding: 10px; /* Add padding */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
}

#controls button:hover,
#controls select:hover {
    background-color: rgba(255, 255, 255, 1); /* Full opacity on hover */
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Aspect ratio: 16:9 */
    height: 0;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 7px;
}

#player iframe {

}

/* Correct answer styling */
.correct {
    color: #28a745; /* Green color for correct message */
}

/* Incorrect answer styling */
.incorrect {
    color: #dc3545; /* Red color for incorrect message */
}

.video-container video {
    border-radius: 7px;
}

#educationalVideo {
    width: 100%;
    height: 100%;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Transparent black background */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    border-radius: 7px;
    z-index: 9999; /* High z-index to keep the overlay on top of everything */
}

/* Text box style for better readability */
.text-box {
    background-color: white;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 12px;
    padding-top: 2px;
    border-radius: 7px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 600px;
    color: black; /* Make text color black for better readability */
    margin: 10px auto; /* Center the text box */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Align items vertically */
}

.overlay button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 7px;
    cursor: pointer;
}

#messageContainer button {
    margin: 10px; /* Adjust margin to center properly */
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 7px;
    cursor: pointer;
}

.text-box input {
    height: 40px;
    width: 200px;
    padding: 10px;
    border-radius: 8px;
    box-sizing: border-box;
    border: 2px solid var(--secondary-color);
    margin-bottom: 5px;
}

.text-box input:focus {
    box-shadow: 0 0 0 5px var(--primary-color);
}


.fraction-input {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.fraction-input input {
  width: 35px;
  text-align: center;
  font-size: 18px;
  padding: 4px 0;
  margin: 0;
}

.divisionline {
    width: 50px;
    height: 3px;
    background-color: black;
    border-radius: 2px;
    margin: 6px;
}