body {
    font-family: "Noto Sans Arabic";
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

header {
    background-color: #ffffff; /* Blue header */
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-icons .icon {
    width: 35px;
    height: 35px;
    cursor: pointer;
    position: relative;
    margin: 0 5px;
    overflow: visible; /* Allow content (like tooltips) to overflow */

}

.breadcrumb {
    padding: 10px 20px;
    background-color: #1079b6; /* Light blue breadcrumb */
    display: flex;
    align-items: center;
    font-size: 14px;
    overflow: visible; /* Allow content (like tooltips) to overflow */

}

.breadcrumb-item {
    margin: 0 5px;
    cursor: pointer;
    color: #1976D2; /* Darker blue for breadcrumb text */
    position: relative;
    display: inline-block;
}

.breadcrumb-icon {
    width: 100px;
    height: 100px;
    cursor: pointer;
    position: relative;
}

.unstyled-link {
    text-decoration: none;
    color: inherit;
  }

  .headline {
    display: block;      /* make the span act like a block/heading */
    text-align: center;  /* center the text */
    font-size: 2rem;     /* adjust to taste */
    font-weight: bold;
    margin: 1.5rem 0;    /* breathing room above & below */
  }
  


/* Tooltip Bubble Styling */
.header-icons .icon::after, 
.breadcrumb-icon::after {
    content: attr(data-title); /* Display tooltip text */
    position: absolute;
    background-color: #84b4a8; /* Tooltip bubble background */
    color: rgb(0, 0, 0); /* Tooltip text color */
    padding: 8px 8px; /* Bubble padding */
    border-radius: 10px; /* Rounded corners */
    font-size: 18px; /* Text font size */
    line-height: 1.4; /* Adjust spacing */
    white-space: nowrap; /* Prevent text wrapping */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Add subtle shadow */
    opacity: 0; /* Hidden by default */
    visibility: hidden; /* Tooltip not visible by default */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Smooth fade-in */
    top: 110%; /* Position below the icon */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%);
    z-index: 100;
}

/* Tooltip Arrow Styling */
.header-icons .icon::before, 
.breadcrumb-icon::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px; /* Arrow size */
    border-color: transparent transparent #84b4a8 transparent; /* Match bubble color */
    top: 100%; /* Position arrow below tooltip */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0; /* Hidden by default */
    visibility: hidden; /* Tooltip arrow not visible */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show Tooltip on Hover */
.header-icons .icon:hover::after, 
.header-icons .icon:hover::before,
.breadcrumb-icon:hover::after, 
.breadcrumb-icon:hover::before {
    opacity: 1; /* Show tooltip */
    visibility: visible; /* Make tooltip visible */
}

/* Hover Effect: Enlarge Icons */
.header-icons .icon:hover, 
.breadcrumb-icon:hover {
    transform: scale(1.1); /* Slightly enlarge the icon */
    transition: transform 0.3s ease;
}


.separator {
    margin: 0 10px;
    color: #ffffff; /* Separator color */
    font-size: 50px; /* Increase size of the separator */
}

.container {
    background-color: white; /* Container background */
    border: 1px solid #ddd; /* Container border */
    border-top: none; /* Remove top border to blend with tabs */
    position: relative; /* Needed for z-index to work */
    z-index: 3; /* Ensure the container is above inactive tabs */
    padding: 20px; /* Padding inside the container */
}

.tabs {
    display: flex;
    justify-content: center; /* Tabs in the middle */
    background-color: #1079b6; /* Blue background for tabs */
    padding: 10px 20px 0 20px;
    border-bottom: 2px solid #ffffff; /* Separator line */
    position: relative; /* Needed for z-index to work */
}

.tablink {
    background-color: white;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0 1px 2px 1px; /* Adjust padding to control height */
    width: 220px; /* Fixed width for all tabs */
    height: 50px; /* Fixed height for all tabs */
    color: rgb(0, 0, 0);
    font-size: 28px;
    transition: background-color 0.3s;
    margin: 0 3px;
    border-radius: 5px 5px 0 0; /* Rounded top corners */
    position: relative; /* Needed for z-index to work */
    z-index: 0; /* Inactive tabs are behind the container */
    box-shadow: inset 0 4px 20px 4px #e4e4e4; /* Blue for padding */
}

.tablink:hover {
    background-color: #ccedf7; /* Darker blue on hover */
}

.tablink.active {
    background-color: #ffffff; /* Darker blue for active tab */
    font-weight: bold;
    z-index: 3; /* Active tab is above the container */
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); /* Shadow to lift the active tab */
}

.tabcontent {
    display: none;
    padding: 20px;
    background-color: white;
}

.tabcontent.active {
    display: block;
}

.play-button {
    background: none;
    border: none;
    padding: 0;
    margin-right: 20px;
    cursor: pointer;
    display: inline-block;
}

.play-icon {
    width: 35px;
    height: auto;
    transition: transform 0.2s;
}

.play-icon:hover {
    transform: scale(1.1);
    background: transparent !important;
    box-shadow: none !important;
}

.content-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
    margin: 0 120px 0 150px;
}

.text-content {
    flex: 1;
    font-size: 28px;
    margin-left: 30px;
    text-align: justify;
    line-height: 50px;
    cursor: pointer;
}

.enlargeable {
    cursor: pointer;
    width: 280px;
    height: auto;
    margin-left: 20px; /* Image on the left */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {

margin: 20px;
color: white;
font-size: 30px;

} 


.clickable-word {
    color: #007BFF;
    cursor: pointer;
    font-weight: bold;
}

.clickable-word.highlight {
    background-color: #6db6f1;
    color: #007BFF;
    font-weight: bold;
}


.NewVocabularyContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    justify-content: space-around; /* Distributes space evenly */
    align-items: flex-start; /* Aligns cards at the top */
    padding: 30px; /* Increased container padding */
    gap: 40px; /* NEW: Adds consistent spacing between cards */
    padding: 20px;
    background-color: #ffffff;
    perspective: 1000px; /* Needed for 3D flip effect */
}

.NewVocabularyCard {
    width: 180px;
    height: 220px;
    margin: 20px;
    position: relative;
    transform-style: preserve-3d; /* Enables 3D space for children */
    transition: transform 0.8s;
    cursor: pointer;
    transform: rotate(0deg);
    font-size: 1px;
    
}

/* Front side styling */
.NewVocabularyCard-front,
.NewVocabularyCard-back {
    transform: rotate(0deg); /* Straight for all cards */
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Hide the back during flip */
    border-radius: 2px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), 
                0 0 20px rgba(0, 0, 0, 0.1) inset;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Front side specific styling */
.NewVocabularyCard-front {
    background: #ffff88; /* Yellow sticky note */
    transform: rotate(0deg);
}

/* Back side styling (initially hidden) */
.NewVocabularyCard-back {
    background: #88ff88; /* Green back side */
    transform: rotateY(180deg) rotate(-2deg);
    font-family: 'Arial', sans-serif;
    
    color: #333;
    padding: 20px;
    box-sizing: border-box;
}

/* Flip on hover */
.NewVocabularyCard:hover {
    transform: rotateY(180deg) rotate(0deg);
}



.NewVocabularyCard p {
    padding-top: 0px;
    font-family: 'Reenie Beanie', 'Comic Sans MS', cursive, sans-serif;
    font-size: 25px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
    margin: 10px 0;
}

img {
    width: 100%;
    height: auto;
    opacity: 0.9;
}
 
/* This container is needed to position the front and back side */
.flip-card-inner {
position: relative;
width: 100%;
height: 100%;
text-align: center;
transition: transform 0.8s;
transform-style: preserve-3d;
}
.NewVocabularyCard::before {
    content: "📌"; /* Pushpin emoji */
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
    z-index: 10;
}



/* Do an horizontal flip when you move the mouse over the flip box container */
.flip-card:hover .flip-card-inner {
transform: rotateY(180deg);
}

/* Position the front and back side */
.flip-card-front, .flip-card-back {
position: absolute;
width: 100%;
height: 100%;
-webkit-backface-visibility: hidden; /* Safari */
backface-visibility: hidden;
}


/* Style the back side */
.flip-card-back {
background-color: dodgerblue;
color: rgb(7, 7, 7);
transform: rotateY(180deg);
}


/* Flashcard Section Styling */
.flashcard-section {
margin-top: 20px;
padding: 20px;
border-top: 2px solid #ccc;
}

.flashcard-form input {
padding: 5px;
margin-right: 5px;
margin-bottom: 10px;
}

.flashcards-container {
margin-top: 15px;
display: flex;
flex-wrap: wrap;
gap: 10px;
z-index: 9999;
}

/* Flashcard styling and flip animation */
.flashcard {
width: 150px;
height: 100px;
background-color: #f1f1f1;
border: 1px solid #ddd;
border-radius: 5px;
cursor: pointer;
perspective: 1000px;
position: relative;
}

.flashcard-front,
.flashcard-back {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
backface-visibility: hidden;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.6s;
font-size: 1.1em;
padding: 5px;
box-sizing: border-box;
}

.flashcard-back {
background-color: #e0e0e0;
transform: rotateY(180deg);
}

.flashcard.flip .flashcard-front {
transform: rotateY(180deg);
}

.flashcard.flip .flashcard-back {
transform: rotateY(0deg);
}



  @keyframes openBook {
    from {
      transform: perspective(1000px) rotateY(10deg);
      opacity: 0;
    }
    to {
      transform: perspective(1000px) rotateY(2deg);
      opacity: 1;
    }
  }

  .modal-content .left, .modal-content .right {
    width: 48%;
  }

  .modal-content h2 {
    text-align: center;
    border-bottom: 2px solid #ddd; /* Divider under the title */
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 30px;

  }
  .card hr {
    border: 0;
    width: 80%;
    border-top: 1px solid #ddd; /* Light gray color */
    margin: 5px auto; /* Space above and below the line */
  }
  

  .modal-content button {
      margin: 5px 5px;
      padding: 5px;
      position:relative; 
      bottom: 10px; /* Adjusts the distance from the bottom edge */
      left: 5px; /* Adjusts the distance from the left edge */
      font: inherit;
      background-color: #f0f0f0;
      border: 0;
      color: #242424;
      border-radius: 0.5em;
      font-size: 1rem;
      padding: 0.375em 1em;
      font-weight: 200;
      text-shadow: 0 0.0625em 0 #fff;
      box-shadow: inset 0 0.0625em 0 0 #f4f4f4, 0 0.0625em 0 0 #efefef,
        0 0.125em 0 0 #ececec, 0 0.25em 0 0 #e0e0e0, 0 0.3125em 0 0 #dedede,
        0 0.375em 0 0 #dcdcdc, 0 0.425em 0 0 #cacaca, 0 0.425em 0.5em 0 #cecece;
      transition: 0.25s ease;
    }
      
     

  .navigation {
    text-align: center; /* Force center alignment */
  }
  
  .button {
    display: inline-block; /* Ensures buttons are treated as inline elements */
  }

/* Highlighted Text Styling */
.highlight {
    background-color: #6db6f1; /* Highlight color */
    color: black; /* Text color */
    padding: 2px 6px; /* Add some padding */
    border-radius: 3px; /* Rounded corners */
}

/* Styling for clickable and highlightable words */
.highlightable {
    color: #007BFF; /* Choose your preferred color */
    cursor: pointer;
    font-weight: bold;
}

/* Styling for highlighted text when reading */
.highlightable.highlight {
    background-color: #6db6f1; /* Highlight color */
    color: #007BFF; /* Preserve the word's color */
    font-weight: bold;

}


.footer-button {
    background-color: #ffffff;
    border: none;
    color: rgb(0, 0, 0);
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #ffffff;
    transform: scale(1.1); /* Slightly enlarge the button on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhance shadow on hover */
}

.word-card {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Horizontally center items */
    justify-content: center; /* Vertically center items */
    text-align: center; /* Center-align text */
    position: fixed;
    width: 80%;
    height: auto;
    bottom: 100px;
    right: 125px;
    background-color: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
.close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ffe07d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
}

.close-button:hover {
    background: #e8bd5c;
    transform: scale(1.1); /* Slightly enlarge the button on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhance shadow on hover */
}
.word-card img {
    width: 250px;
    ;
    height: auto;
    margin-bottom: 10px;
}

.word-card p {
    font-size: 30px;
    margin: 5px 0;
}

/* Style the play button itself */
#playAudioButton {
    background: none; /* Remove default button background */
    border: none; /* Remove default button border */
    padding: 0; /* Remove default button padding */
    cursor: pointer; /* Change cursor to pointer */
    margin-top: 20px; /* Add spacing above the button */
}

/* Style the play button image */
#playAudioButton img {
    width: 50px; /* Set the width of the button image */
    height: 50px; /* Set the height of the button image */
    object-fit: contain; /* Ensure the image fits its container */
    border-radius: 50%; /* Make the image circular */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
    transition: transform 0.3s, box-shadow 0.3s; /* Smooth animation */
}

/* Add hover effects for the button image */
#playAudioButton img:hover {
    transform: scale(1.1); /* Slightly enlarge the button on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhance shadow on hover */
}

/* Style for the quiz container */
#quiz-container {
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 90%; /* Make it responsive */
    max-width: 600px;
    text-align: right; /* Align text to the right for Arabic */
    direction: rtl; /* Set direction for Arabic text */
}

/* Style for each question */
.question {
    margin-bottom: 20px; /* Add spacing between questions */
}

/* Style for the options */
.option {
    display: block; /* Ensure options stack vertically */
    margin: 5px 0; /* Add spacing between options */
    cursor: pointer; /* Show pointer cursor for better UX */
}

/* Optional: Style the radio buttons */
.option input {
    margin-left: 10px; /* Add spacing between radio button and text */
}

.matching-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 65%;
    margin: 20px auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    direction: ltr;
}

.matching-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
}

.matching-word {
    font-size: 18px;
    font-weight: bold;
    flex: 1;
    text-align: left;
}

.matching-select {
    flex: 1;
    text-align: right;
    padding: 5px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
/* ✅ Correct Answer - Green */
.matching-select.correct {
background-color: #d4edda; /* Light Green */
color: #155724; /* Dark Green */
}

/* ❌ Incorrect Answer - Red */
.matching-select.incorrect {
background-color: #f8d7da; /* Light Red */
color: #721c24; /* Dark Red */
}





.reorder-container {
    text-align: right; /* Align Arabic text properly */
    direction: rtl; /* Right-to-left */
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.word-box, .answer-box {
    min-height: 50px;
    padding: 10px;
    border: 2px dashed #aaa;
    margin: 10px 0;
    direction: rtl; /* Right-to-left */
}

/* ✅ Align Arabic words properly */
.word-btn {
    background-color: #1079b6;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 40px;
    margin: 3px;
    border-radius: 5px;
    cursor: pointer;
    direction: rtl; /* Fix Arabic word alignment */
}

.word-btn:hover {
    background-color: #0056b3;
}

/* ✅ Reset Button */
.reset-btn {
    background-color: #1079b6;
    color: white;
    font-size: 25px;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.image-reset-btn {
    background-color: #1079b6;
    color: white;
    font-size: 25px;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* ✅ Green for correct answer */
.correct {
    color: green;
}

/* ❌ Red for incorrect answer */
.incorrect {
    color: red;
}


.image-reorder-container {
    text-align: right;
    direction: rtl;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.image-reorder-image {
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 10px auto;
}

.image-word-box, .image-answer-box {
    min-height: 50px;
    padding: 10px;
    border: 2px dashed #aaa;
    margin: 10px 0;
}

.image-word-btn {
    background-color: #1079b6; /* Blue background */
    color: white; /* White text */
    border: none;
    padding: 5px 10px;
    font-size: 40px;
    margin: 3px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.image-word-btn:hover {
    background-color: #0056b3; /* Darker blue */
    color: white; /* Keep text visible */
}


.image-feedback-text {
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
    direction: rtl;
}



/* Style for the submit button */
button#submit-quiz,
button#submit-matching,
button#submit-reordering,
button#submit-image-reordering
{
    background-color: #1079b6; /* Blue background */
    color: white; /* White text */
    border: none;
    padding: 10px 20px; /* Adjust padding for size */
    font-size: 30px; /* Font size */
    border-radius: 5px; /* Slightly rounded corners */
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect for submit button */
button#submit-quiz:hover,
button#submit-matching:hover 
{
    background-color: #0056b3; /* Darker blue on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* Active effect for submit button */
button#submit-quiz:active,
button#submit-matching:active
{
    background-color: #004085; /* Even darker blue */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


footer {
    text-align: center;
    padding: 10px;
    background-color: #1079b6;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    z-index: 3; /* Ensure footer stays above other content */
}

footer button {
    margin: 0 10px;
}

/* True/False Styles */
.truefalse-item {
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.truefalse-options button {
    margin: 0 5px;
    padding: 5px 15px;
    cursor: pointer;
}

/* Drag and Drop Styles */
#DragDropQuiz-container {
    font-family: 'Arial', sans-serif;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .word-bank {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #1079b6;
  }
  
  .word-bank td {
    border: 2px solid #ddd;
    padding: 12px;
    text-align: center;
    font-size: 30px;
    cursor: grab;
    transition: all 0.3s;
  }
  
  .word-bank td:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
  }
  
  .sentences {
    margin-top: 30px;
  }
  
  .sentence {
    font-size: 30px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .blank {
    display: inline-block;
    min-width: 100px;
    height: 50px;
    border-bottom: 3px dotted #000000;
    margin: 0 5px;
    vertical-align: middle;
    text-align: center;
  }
  
  .correct {
    background-color: #d4edda;
    border-bottom: 1px solid #28a745;
  }
  
  .incorrect {
    background-color: #f8d7da;
    border-bottom: 1px solid #dc3545;
    animation: shake 0.5s;
  }
  
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
  }
  
  .reset-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 25px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .reset-btn:hover {
    background-color: #5a6268;
  }

/* Responsive Design for Small Screens */
@media (max-width: 600px) {

    .tabs {
        padding: 8px 10px; /* Reduce padding for small screens */
        margin-bottom: 10px; /* Reduce gap between tabs and container */
    }
    .tablink {
        padding: 8px 10px; /* Reduce padding for small screens */
        font-size: 14px; /* Smaller font size for small screens */
    }

    .text-segment {
        display: block; /* Stack text segments vertically on mobile */
        margin-bottom: 5px; /* Add space between segments */
    }
    lottie-player {
        width: 100px; /* Smaller animation for mobile */
        height: 100px;
    }

    .separator {
        margin: 0 10px;
        color: #ffffff; /* Separator color */
        font-size: 20px; /* Increase size of the separator */
    
    }
    .content-wrapper {
        flex-direction: column; /* Stack items vertically on mobile */
        align-items: center; /* Center items horizontally */
        margin: 0 20px; /* Reduced margin for small screens */
        gap: 10px; /* Reduce space between items */
        padding: 10px; /* Reduce padding for smaller screens */
    }

    .enlargeable {
        width: 100px; /* Smaller image for mobile */
        margin-bottom: 10px; /* Add space below the image */
        align-self: flex-start; /* Align image to the start (left for RTL) */
    }

    lottie-player {
        width: 90px; /* Smaller width for mobile */
        height: 90px; /* Smaller height for mobile */
        margin-left: 0; /* Remove margin for mobile */
    }

    .text-content {
        width: 100%; /* Make text fill the container */
        text-align:justify; /* Align text to the right */

    }

    .text-content p {
        font-size: 20px; /* Smaller text for mobile */
    }

    .play-button {
        align-self: flex-end; /* Align button to the end (right for RTL) */
        align-self: center; /* Center the play button */

    }

    .play-icon {
        width: 30px; /* Smaller play button for mobile */
    }
   

    .container {
        margin: 0 20px; /* Reduced margin for small screens */
        padding-bottom: 60px; /* Add padding to prevent overlap with footer */
        min-height: calc(100vh - 120px); /* Ensure container takes up remaining space */
    }

    /* Footer Styling */
    footer {
        background-color: #1079b6; /* Footer background color */
        color: white; /* Footer text color */
        text-align: center;
        padding: 10px;
        position: fixed; /* Fix footer at the bottom */
        bottom: 0; /* Position at the bottom */
        width: 100%; /* Full width */
        z-index: 3; /* Ensure footer stays above other content */
    }

    /* Reorder Elements */
    .enlargeable {
        order: 2; /* Move image to the bottom (after the audio button and text) */
    }

    .text-content {
        order: 1; /* Move text and audio button to the top */
    }

     /* Custom Styling for Active Tab on Small Screen */
     .tablink.active {
        background-color: #e3f2fd; /* Light blue background for active tab */
        color: #2196F3; /* Blue text color for active tab */
        border-bottom: 3px solid #2196F3; /* Add a blue underline for active tab */
        font-weight: bold;
    }

    .word-card {
        width: 90%; /* Make the card take up 90% of the screen width */
        max-width: 300px; /* Limit the maximum width for readability */
        height: auto; /* Allow the height to adjust to content */
        bottom: auto; /* Remove fixed positioning for better flexibility */
        right: auto; /* Remove right offset */
        left: 50%; /* Center horizontally */
        top: 20%; /* Position near the top of the screen */
        transform: translateX(-50%); /* Center the card horizontally */
        padding: 15px; /* Reduce padding for smaller screens */
        border-radius: 15px; /* Slightly smaller border radius */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
        z-index: 1000;
    }
    
    .word-card img {
        width: 100px; /* Smaller image for mobile screens */
        margin-bottom: 15px; /* Add some spacing below the image */
    }
    
    .word-card p {
        font-size: 16px; /* Reduce font size for smaller screens */
        margin: 10px 0;
        line-height: 1.5; /* Adjust line height for readability */
    }
    
    #playAudioButton {
        margin-top: 15px; /* Adjust spacing above the play button */
    }
    
    #playAudioButton img {
        width: 40px; /* Smaller play button size for mobile */
        height: 40px;
    }
    
    .close-button {
        width: 40px; /* Smaller close button */
        height: 40px;
        font-size: 16px;
        line-height: 40px;
    }
    
}




.logged-in #authSection {
    display: none;       /* disappear once the user is authenticated */
  }

  #protectedContent { display: none; }     /* hidden by default */

  /* === LOGIN AREA ========================================================= */

  #authSection {
    position: fixed;
    inset: 0; 
    display: flex;
    place-items: center;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    direction: rtl;
    background: linear-gradient(to top right, #fbe7d0, #fcdada);
    font-family: 'Noto Sans Arabic', sans-serif;
    overflow: hidden;
    padding: 30px;
  }
  
  .auth-glass {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: fadeIn 1s ease forwards;
  }
  
  .auth-glass h2 {
    font-size: 1.7rem;
    color: #4b2e2e;
    margin-bottom: 5px;
  }
  
  .auth-glass p {
    color: #6c4f4f;
    margin-bottom: 20px;
    font-size: 1rem;
  }
  
  .auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
  }
  
  .auth-form input {
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 12px;
    border: 1px solid #d9b8b8;
    background: #fffaf6;
    text-align: right;
    transition: border 0.2s ease;
  }
  
  .auth-form input:focus {
    border-color: #a65c5c;
    outline: none;
  }
  
  .auth-form button {
    padding: 12px;
    font-size: 1rem;
    background-color: #a65c5c;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .auth-form button:hover {
    background-color: #7d4545;
  }
  
  .auth-glass .or {
    font-weight: bold;
    margin: 10px 0;
    color: #b66;
  }
  
  .auth-icon {
    width: 60px;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
  }
  
  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
  }
  