/* General Body Styles */
body {
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* Fallback color */
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url("http://googleusercontent.com/image_generation_content/1"); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
}
.correct1 {
    background-color: #28a745; 
    display: none;

}

.incorrect1 {
    background-color: #dc3547;
    display: none;
}
/* Start Scene Styling */
.start-scene-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.start-scene-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 20, 50, 0.1);
    width: 100%;
    max-width: 500px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
}
.start-scene-card:hover {
    transform: translateY(-5px);
}

.title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px;
}

.subtitle {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.option-section {
    text-align: left;
    margin-bottom: 25px;
    border-top: 1px solid #ecf0f1;
    padding-top: 25px;
}

.section-title {
    font-size: 18px;
    font-weight: 500;
    color: #34495e;
    margin: 0 0 15px;
}

/* Custom Radio Button Styling */
.radio-group {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #34495e;
    user-select: none;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    height: 20px;
    width: 20px;
    background-color: #ecf0f1;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
    position: relative;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    background-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.3);
}

.radio-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    display: block;
}

/* Custom Checkbox (Toggle) Styling */
.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.toggle-label {
    cursor: pointer;
    font-size: 16px;
    color: #34495e;
    padding: 10px 20px;
    background-color: #ecf0f1;
    border-radius: 50px;
    transition: all 0.3s ease;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-label:has(input:checked) {
    background-color: #3498db;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

/* Main Start Button */
#startQuizButton {
    width: 100%;
    margin-top: 20px;
}

/* --- Revised Quiz Container Styles --- */

.quiz-container {
    width: 90%;
    max-width: 700px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.quiz-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 20, 50, 0.15);
    width: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.quiz-header-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.timer-display {
    font-size: 24px;
    font-weight: bold;
    color: #34495e;
    background-color: #f8f9fa;
    border-radius: 50px;
    padding: 8px 16px;
    min-width: 100px;
    text-align: center;
    border: 2px solid #ddd;
}

.fallback-message {
    font-size: 24px;
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    line-height: 1.5;
}

.quiz-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

textarea {
    width: 90%;
    min-height: 120px;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 12px;
    border: 1px solid #ccc;
    resize: vertical;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(52, 152, 219, 0.2);
}

.button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: #3498db; 
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.button:active {
    background-color: #2471a3;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.answer-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: default;
    transition: background-color 0.3s;
    display: none;
}
.blueborder{
    border: 2px solid #0c91c5;
}

.orange {
    background-color: orange;
    display: none;
}
/* Progress Bar Styling */
.progress-container {
    width: 90%;
    background-color: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 15px;
    height: 15px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #3498db; /* A vibrant blue */
    border-radius: 15px;
    transition: width 0.4s ease-in-out;
}
#restart{
    
    display: none;
}
a {
    text-decoration: none;
    color: white;
  }
  .highlight-word {
    color: #3498db;

  }
  .highlight-char{
    color: orange;
  }
  .black{
    background-color: black;
    display: none;
  }
  

.draggable-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap; /* Allows the blocks to wrap to the next line */
    justify-content: center;
    gap: 1px;
}
/* New CSS for drag zones */
.drag-zone {
    /* Adds a dashed border to the drag zones. */
    border: 2px dashed #95a5a6;
    /* Adds rounded corners. */
    border-radius: 10px;
    /* Adds padding inside the drag zones. */
    padding: 20px;
    /* Sets a minimum height to prevent shrinking when empty. */
    min-height: 100px;
    /* Makes the drag zones take up the full width. */
    width: 100%;
    /* Adds a top margin. */
    margin-top: 20px;
    /* Makes the drag zones flexible containers. */
    display: flex;
    /* Allows the items to wrap to the next line. */
    flex-wrap: wrap;
    /* Adds space between draggable items. */
    gap: 1px;
    /* Centers the items horizontally. */
    justify-content: center;
    /* Centers the items vertically. */
    align-items: center;
    /* Sets a light gray background. */
    background-color: #ecf0f1;
    /* Adds a smooth transition for the background color. */
    transition: background-color 0.3s ease-in-out;
}

/* Styling for the draggable word buttons. */
.draggable-block {
    background-color: #3498db;
    /* A friendly blue color. */
    color: white;
    /* White text for contrast. */
    padding: 12px 20px;
    /* Ample padding for a good button size. */
    margin: 8px;
    /* Space between each button. */
    border-radius: 25px;
    /* Fully rounded corners for a modern "pill" shape. */
    border: none;
    /* Remove the default button border. */
    font-size: 18px;
    /* A comfortable font size for readability. */
    font-weight: 500;
    /* Medium font weight. */
    cursor: grab;
    /* Changes cursor to indicate it's draggable. */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Smooth transitions for hover effects. */
    user-select: none;
    /* Prevents text selection on the button. */
}

/* Hover effect for the draggable words. */
.draggable-block:hover {
    /* Slightly lifts the button on hover. */
    transform: translateY(-3px);
    /* Adds a soft shadow for depth. */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Style for the container where the words are initially placed. */
#verse-con {
    min-height: 100px;
    /* Ensures the container has a visible height. */
    border: 2px dashed #bdc3c7;
    /* A dashed line to suggest this is a starting area. */
    background-color: #ecf0f1;
    /* A light gray background. */
    border-radius: 12px;
    /* Slightly rounded corners. */
    margin-bottom: 20px;
    /* Spacing below the container. */
    padding: 15px;
    /* Padding inside the container. */
}

/* Styling for the drop zone where the user will build the sentence. */
#versedrop {
    min-height: 100px;
    
    /* Ensures a visible height. */
   
    /* A solid green border to make it stand out. */
    background-color: #e8f8f5;
    /* A light green background. */
    border-radius: 12px;
    /* Rounded corners. */
    padding: 15px;
    /* Inner padding. */
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
    /* A subtle green glow to indicate it is the target. */
    margin-bottom: 20px;
}

/* Style for when a block is being dragged */
.is-dragging {
    /* Makes the block slightly transparent when dragging. */
    opacity: 0.7;
    /* Changes the cursor to a grabbing hand. */
    cursor: grabbing;
}

/* Style for the hover state of the drop zone */
.drag-zone:hover {
    /* Changes the background color on hover. */
    background-color: #dfe6e9;
}

/* Style for the active drop zone */
.drag-zone.drag-over {
    /* Sets a different background color when an item is dragged over it. */
    background-color: #c7ecee;
    /* Changes the border color to blue. */
    border-color: #3498db;
}
/* Styling for the modal backdrop and the modal itself. */
dialog.modal {
    /* Using the 'dialog' tag's built-in show/hide functionality. */
    border: none;
    /* Removes the default border. */
    border-radius: 16px;
    /* Rounds the corners of the pop-up. */
    padding: 40px;
    /* Adds internal space around the content. */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    /* Adds a soft shadow for a floating effect. */
    max-width: 500px;
    /* Sets the maximum width of the pop-up. */
    margin: auto;
    /* Centers the pop-up horizontally and vertically. */
}

/* This pseudo-element styles the semi-transparent overlay behind the pop-up. */
dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    /* Creates a dark, transparent background. */
}

/* You can also style the content inside the modal. */
.modal-content {
    text-align: center;
    /* Centers the text and button. */
}
input[type='number'] {
    width: 100%;
    padding: 10px 12px;
    /* Adds internal spacing. */
    border-radius: 8px;
    /* Rounds the corners. */
    border: 1px solid #ccc;
    /* Sets a light gray border. */
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    /* Sets the font size. */
    transition: border-color 0.3s, box-shadow 0.3s;
    /* Adds smooth transitions. */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); /* Adds a subtle inner shadow. */
  }
  
  input[type='number']:focus {
    outline: none;
    /* Removes the default focus outline. */
    border-color: #3498db;
    /* Changes the border color on focus. */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px rgba(52, 152, 219, 0.2);
    /* Adds a blue glow on focus. */
  }
  /* Style the range input (for a sleek, modern look) */
/* Style the range input for a sleek, modern look */
input[type='range'] {
    /* Set basic dimensions and appearance. */
    -webkit-appearance: none; /* For Chrome, Safari, etc. */
    appearance: none; /* The standard property for all other browsers. */
    width: 100%;
    height: 8px;
    background: #dfe6e9; /* A soft, light-gray track. */
    border-radius: 4px;
    outline: none; /* Remove the outline on focus. */
    transition: background 0.2s ease-in-out;
  }
  /* Style the track (the bar the thumb slides on). */
  /* Chrome, Safari, and Edge. */
  input[type='range']::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #dfe6e9;
    border-radius: 4px;
  }
  
  /* Firefox */
  input[type='range']::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #dfe6e9;
    border-radius: 4px;
  }
  
  /* Style the thumb (the draggable circle or square). */
  /* Chrome, Safari, and Edge. */
  input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    /* Removes the default thumb style. */
    height: 20px;
    /* Set the height of the thumb. */
    width: 20px;
    /* Set the width of the thumb. */
    border-radius: 50%;
    /* Makes the thumb a circle. */
    background: #3498db;
    /* A nice blue color for the thumb. */
    cursor: pointer;
    /* Changes the cursor to a pointer when hovering over it. */
    margin-top: -6px;
    /* Adjusts the vertical position to center it on the track. */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow. */
  }
  
  /* Firefox */
  input[type='range']::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  input[type='number'] {
    width: 100%;
    padding: 10px 12px;
    /* Adds internal spacing. */
    border-radius: 8px;
    /* Rounds the corners. */
    border: 1px solid #ccc;
    /* Sets a light gray border. */
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    /* Sets the font size. */
    transition: border-color 0.3s, box-shadow 0.3s;
    /* Adds smooth transitions. */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); /* Adds a subtle inner shadow. */
  }
  
  input[type='number']:focus {
    outline: none;
    /* Removes the default focus outline. */
    border-color: #3498db;
    /* Changes the border color on focus. */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px rgba(52, 152, 219, 0.2);
    /* Adds a blue glow on focus. */
  }
  /* Container for the range input and its value display. */
.range-display-container {
    /* Use Flexbox to align the range input and the value. */
    display: flex;
    align-items: center; /* Vertically centers the items. */
    gap: 15px; /* Adds space between the range and the number. */
    width: 100%; /* Ensures the container takes up the full width. */
}

/* Style for the span that displays the value. */
#speedValue {
    /* Sets the font size. */
    font-size: 1.2rem;
    /* Makes the text bold. */
    font-weight: 500;
    /* Sets the color. */
    color: #34495e;
    /* Ensures the text doesn't shrink. */
    flex-shrink: 0;
    /* Adds some space to the right. */
    min-width: 30px;
    text-align: right;
}
#versedrop.correct {
    border: 2px solid #27ae60;
    
    border-radius: 12px;
}

#versedrop.incorrect {
    border: 2px solid #e74c3c;
    
    border-radius: 12px;
}
#verse-con.correct {
    border: 2px solid #27ae60;
    
    border-radius: 12px;
}

#verse-con.incorrect {
    border: 2px solid #e74c3c;
    
    border-radius: 12px;
}
#verse.correct {
    border: 2px solid #27ae60;
    
    border-radius: 12px;
}

#verse.incorrect {
    border: 2px solid #e74c3c;
    
    border-radius: 12px;
}
/* Hides the default radio input. */
.radio-input {
    display: none;
}

/* Custom radio button styling. */
.custom-radio {
    /* Sets the size of the custom radio button. */
    width: 20px;
    height: 20px;
    /* Creates a circular shape. */
    border-radius: 50%;
    /* Adds a border. */
    border: 2px solid #bdc3c7;
    /* Sets the background color. */
    background-color: #ecf0f1;
    /* Ensures the element doesn't shrink. */
    flex-shrink: 0;
    /* Adds a small space to the right of the button. */
    margin-right: 10px;
    /* Adds a smooth transition for the color change. */
    transition: all 0.2s ease-in-out;
}

/* Styles the custom radio button when it's checked. */
.radio-input:checked + .custom-radio {
    /* Changes the background color when checked. */
    background-color: #3498db;
    /* Adds a border color when checked. */
    border-color: #2980b9;
    /* Adds a subtle shadow. */
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* Adds a small inner circle to the custom radio when it's checked. */
.radio-input:checked + .custom-radio::after {
    /* Creates the pseudo-element. */
    content: '';
    /* Positions the pseudo-element in the center of the radio button. */
    position: relative;
    top: 50%;
    left: 50%;
    /* Sets the size of the inner circle. */
    width: 10px;
    height: 10px;
    /* Creates a circular shape. */
    border-radius: 50%;
    /* Sets the background color to white. */
    background: white;
    /* Positions the inner circle. */
    transform: translate(-50%, -50%);
    /* Adds a smooth transition for the appearance of the inner circle. */
    transition: all 0.2s ease-in-out;
}
#questionNumber {
    /* Positions the element in the top-right corner. */
    position: absolute;
    top: 15px;
    right: 15px;
    /* Sets the size of the circle. */
    width: 40px;
    height: 40px;
    /* Creates a circular shape. */
    border-radius: 50%;
    /* Sets the background color. */
    background-color: #3498db;
    /* Sets the text color. */
    color: white;
    /* Centers the number inside the circle using flexbox. */
    display: flex;
    justify-content: center;
    align-items: center;
    /* Sets the font size and weight. */
    font-size: 1.2rem;
    font-weight: bold;
    /* Adds a subtle shadow for a 3D effect. */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
