/* Add a CSS reset to the top of your CSS file */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* General Styles for Main Content */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2em;
}

p {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.2em;
}

form {
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

#search-form {
  display: flex;
  flex-direction: column;
}

.form-row {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #333;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

input[type="text"]:focus {
  border-color: #f57224;
  outline: none;
}

button {
  background-color: #f57224;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

button:hover {
  background-color: #e65c00;
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  button {
    width: 100%;
  }
}

body {
  font-family: Copperplate;
  margin: 0;
  padding: 0;

  background-image: url("cosmicyoga.png"); /* Replace with your background image path */
  background-size: 100%; /* Adjust the percentage to zoom in or out */
  background-color: hsla(210, 40%, 94%, 0.8);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-blend-mode: overlay;
  background-position: center;

  font-size: large;
  touch-action: none;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }

  nav ul li button {
    padding: 15px;
    font-size: 16px;
  }
}
.sanskrit-text {
  font-family: "Noto Sans Devanagari", sans-serif; /* Apply the Noto Sans Devanagari font */
}

.styled-text {
  font-family: "Georgia", serif; /* Change font-family as needed */
  font-size: 20px; /* Adjust font size */
  line-height: 1.6; /* Adjust line height for better readability */
  font-style: italic; /* Change to 'normal' if you want regular text */
  font-weight: bold; /* Change to 'normal' if you want regular weight */
  color: #333; /* Change text color if needed */
  text-align: justify; /* Adjust text alignment if needed */
}

/* Header Styling */
header {
  color: #dbe2ef;
  text-align: center;
  padding: 20px 0;
  position: relative; /* To position the Home and Details links */
}

/* Home and Details Links Styling */
.header-left {
  position: absolute;
  top: 20px;
  left: 20px;
}

.header-left a {
  text-decoration: none;
  color: black; /* Coral color matching the h1 */
  font-size: 1.2em;
  font-weight: bold;
  margin-right: 20px; /* Space between the links */
  transition: color 0.3s ease;
}

.header-left a:hover {
  color: #4a90e2; /* Light blue on hover */
}

/* Header Main Title Styling */
header h1 {
  font-size: 3em; /* Increased size for better prominence */
  margin: 0;
  color: #942C2B; /* A warm coral color for a vibrant look */
  /* font-family: "Arial", sans-serif; Updated font for a modern feel */
  font-family:myFirstFont;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Adding a subtle shadow for depth */
}

/* Header Subtitle Styling */
header h2 {
  font-size: 1.5em; /* Slightly larger size for better hierarchy */
  margin: 10px 0;
  color: #E56E1E; /* A soothing blue color for a clean look */
  font-family: "Arial", sans-serif; /* Consistent font with h1 */
}

/* Language Selector Styling */
header select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #4a90e2; /* Light blue border */
  font-size: 1em;
  color: #024950;
  background-color: #dbe2ef;

  /* Position on top-right */
  position: absolute;
  top: 10px;       /* Adjust spacing from top */
  right: 20px;     /* Adjust spacing from right */
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-around; /* Ensure equal spacing */
  background-color: transparent; /* (earlier it was Darker) transparent shade for a modern look */
}

nav ul li {
  position: relative;
  margin: 0; /* Remove margin from list items */
}

nav ul li button {
  background: transparent;
  border: none;
  padding: 15px 25px; /* Adjusted padding for better fit */
  display: block;
  color: #1e2a38; /* Light color for text */
  font-size: 18px; /* Adjusted font size */
  cursor: pointer;
  font-family: "Arial", sans-serif; /* Updated font for consistency */
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for hover effects */
  border-radius: 5px; /* Rounded corners for a modern touch */
  box-shadow: 0px 10px 20px rgba(71, 70, 70, 0.334);
}

nav ul li button:hover {
  background-color: #b8d39f; /* Coral color for hover effect */
  color: #ffffff; /* White text color on hover for contrast */
  font-family: "Arial", sans-serif; /* Consistent font on hover */
}

/* Dropdown Menu Styling */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff; /* White background for a clean look */
  border: 1px solid #ddd; /* Light gray border for definition */
  border-radius: 8px; /* Rounded corners for a modern touch */
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15); /* Enhanced shadow for depth */
  z-index: 1;
  opacity: 0; /* Initially hidden with opacity */
  transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth transition for visibility and animation */
  transform: translateY(10px); /* Slight downward shift initially */
}

.dropdown-content li {
  border-bottom: 1px solid #eee; /* Light border between items */
}

.dropdown-content li:last-child {
  border-bottom: none; /* Remove border from the last item */
}

.dropdown-content li a {
  padding: 15px 25px; /* Adjusted padding for better fit */
  text-decoration: none;
  display: block;
  color: #333; /* Dark text color for better readability */
  font-size: 18px; /* Slightly smaller font size for better fit */
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease; /* Smooth transition for hover effects */
  border-radius: 4px; /* Rounded corners for each item */
}

.dropdown-content li a:hover {
  background-color: #f4f4f9; /* Light gray background on hover */
  color: #ff6f61; /* Coral text color on hover for a striking contrast */
  transform: scale(1.05); /* Slight zoom effect */
}

nav ul li:hover > .dropdown-content {
  display: block;
  opacity: 1; /* Make visible */
  transform: translateY(0); /* Slide up to original position */
  animation: fadeIn 0.3s ease-out; /* Animation for showing the dropdown */
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
  transform: rotateX(-90deg);
  transition: opacity 0.5s ease;
  opacity: 0;
}

nav ul li:hover > .dropdown-content {
  display: block;
  opacity: 1;
  transform: rotateX(0deg);
}

.dropdown-content li a {
  padding: 15px 25px;
  text-decoration: none;
  display: block;
  color: #333;
  font-size: 18px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-content li a:hover {
  background-color: #e0e0e0;
  color: #ff6f61;
}

/* Button Styling */
.dropbtn {
  display: inline-block;
  padding: 20px 40px;
  border: none;
  background: none;
  cursor: pointer;
  transition: transform 0.5s ease, background-color 0.3s ease, color 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3); /* Default shadow for floating effect */
}

/* Animated Background */
@keyframes bgColorChange {
  0% {
    background-color: #d8eebd;
  }
  50% {
    background-color: #d8eebd;
  }
  100% {
    background-color: #d8eebd;
  }
}

.dropbtn:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
  z-index: -1;
}

.dropbtn:hover {
  animation: bgColorChange 1s infinite;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3); /* Enhanced shadow for floating effect on hover */
}

/* Specific Button Styles */
.dropbtn.sambhasha {
  font-family: "Arial", sans-serif;
  font-weight: bold;
  color: transparent;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.dropbtn.sambhasha:hover {
  background-color: #ff6f61;
}

.dropbtn.yogasutram-text {
  font-family: "Georgia", serif;
  font-style: italic;
  color: #4a90e2;
}

.dropbtn.yogasutram-text:hover {
  background-color: #e3f2fd;
}

.dropbtn.yogasutra-bhashyas {
  font-family: "Courier New", monospace;
  font-weight: normal;
  text-transform: uppercase;
  color: #3f72af;
}

.dropbtn.yogasutra-bhashyas:hover {
  background-color: #c5cae9;
}

.dropbtn.word-inflection {
  font-family: "Verdana", sans-serif;
  font-weight: light;
  color: #8e44ad;  
}

.dropbtn.word-inflection:hover {
  background-color: #e1bee7;
}

.dropbtn.e-yogasutram {
  font-family: "Times New Roman", serif;
  font-style: oblique;
  color: #27ae60;
}

.dropbtn.e-yogasutram:hover {
  background-color: #dcedc8;
}

.dropbtn.yogashastram-editions {
  font-family: "Tahoma", sans-serif;
  font-weight: bolder;
  color: #e67e22;
}

.dropbtn.yogashastram-editions:hover {
  background-color: #f9a825;
}

.dropbtn.statistics {
  font-family: "Helvetica", sans-serif;
  font-style: normal;
  color: #3498db;
}

.dropbtn.statistics:hover {
  background-color: #b3e5fc;
}

/* Main content container */
main {
  max-width: 90%; /* Increase width to cover more screen space */
  margin: 20px auto; /* Center the content */
  padding: 20px;

  border-radius: 8px; /* Rounded corners for a smoother appearance */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* Slight shadow for depth */
}

/* Heading styling */
/* Header styling */
main h1 {
  font-size: 2.8em; /* Larger font size for prominence */
  color: #2c3e50; /* Darker, more refined color */
  margin-bottom: 15px; /* Slightly increased spacing below heading */
  text-align: center; /* Center-align the heading */
  font-family: "Roboto", sans-serif; /* Modern, clean font */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
}

/* Paragraph styling */
/* Paragraph styling */
main p {
  font-size: 1em; /* Adjusted font size for readability */
  line-height: 1; /* Increased line height for better readability */
  color: #2c3e50; /* Darker text color for better contrast and readability */
  margin-bottom: 25px; /* Adjusted spacing below paragraph */
  text-align: justify; /* Justify text for a more formal look */
  font-family: "Lora", serif; /* Elegant serif font with good readability */
  text-indent: 1em; /* Indent the first line of the paragraph for a polished look */
}

/* Form styling */
/* Form Container Styling */
/* Form Styling */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 50px auto;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Enhanced shadow for depth */
}

/* Label Styling */
form label {
  font-size: 1.2em;
  margin-bottom: 12px;
  color: #2c3e50; /* Dark navy blue */
  font-weight: 600;
}

/* Input Box Styling */
form input {
  padding: 20px 25px; /* Increased padding */
  font-size: 1.5em; /* Increased font size */
  border: 2px solid #3498db; /* Light blue border */
  border-radius: 15px;
  margin-bottom: 25px;
  width: 100%;
  background-color: #f9f9f9; /* Slightly off-white background */
  color: #2c3e50; /* Dark text */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form input:focus {
  border-color: #2980b9; /* Darker blue on focus */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  outline: none;
}

/* Submit Button Styling */
form button {
  padding: 14px 28px;
  font-size: 1.1em;
  background-color: #3498db; /* Light blue background */
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

form button:hover {
  background-color: #2980b9; /* Darker blue on hover */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

form button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.6s, opacity 0.6s;
  pointer-events: none;
}

form button:focus::after,
form button:active::after {
  transform: scale(1);
  opacity: 0;
}

/* Result Box Styling */
/* Initial Result Box Styling */
#result-box {
  padding: 20px;
  background-color: rgba(227, 242, 253, 0.8); /* Light blue with 80% opacity */
  border: 2px solid rgba(144, 202, 249, 0.8); /* Soft blue border with 80% opacity */
  border-radius: 12px; /* Rounded corners */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* Floating effect */
  max-width: 500px; /* Maximum width */
  margin: 20px auto; /* Center the box */
  overflow: hidden; /* Ensure content doesn't overflow */
  position: relative; /* For positioning animations */
  opacity: 1; /* Start visible */
  transform: scale(1); /* Full size */
  transition: opacity 0.6s ease, transform 0.6s ease; /* Smooth transition */
}

/* Show Result Box Animation */
#result-box.show {
  opacity: 1;
  transform: scale(1); /* Scale to full size */
}

/* Placeholder Text Styling */
#result-placeholder {
  font-size: 1.5em; /* Larger font size */
  color: #1976d2; /* Blue color for placeholder */
  text-align: center; /* Center-align text */
  margin-bottom: 15px; /* Space below placeholder */
  font-weight: bold; /* Bold text */
  font-family: "Roboto", sans-serif; /* Modern sans-serif font */
}

/* Result Content Styling */
#result {
  padding: 15px;
  font-size: 1.2em; /* Slightly larger font size for better readability */
  color: #0d47a1; /* Dark blue text color */
  line-height: 1.6; /* Improved readability */
  border-top: 2px solid rgba(144, 202, 249, 0.8); /* Soft blue border on top with 80% opacity */
  background-color: rgba(
    255,
    255,
    255,
    0.9
  ); /* White background with 90% opacity */
  border-radius: 8px; /* Rounded corners */
  opacity: 0; /* Start hidden for animation */
  transform: translateY(20px); /* Start slightly below */
  transition: opacity 0.6s ease, transform 0.6s ease; /* Smooth transition */
  font-family: "Lora", serif; /* Elegant serif font for results */
}

/* Show Result Content Animation */
#result.show {
  opacity: 1;
  transform: translateY(0); /* Move to its final position */
}

/* Animation Keyframes for Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation Keyframes for Slide In */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.dropdown {
            position: relative;
            display: inline-block;
        }

.popover {
  position: absolute;
  background: white;
  color: black;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 9999;
  font-size: 16px;
  line-height: 1.5;
}

    .node {
      background: transparent;
      padding: 10px 20px;
      border-radius: 20px;
      text-align: center;
      font-size: 20px;
      color: rgb(0, 0, 0);
      cursor: pointer;
      transition: all 0.3s ease-in-out;
      box-shadow: 0 2px 5px rgba(0,0,0,0.3);
      margin-top: 5%;
    }

    .node:hover {
      background: #3e8e41;
    }

 .tree {
            margin: 20px auto;
            max-width: 1000px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-top: -30%;
            margin-left: 5%;
        }

        .node {
            background: linear-gradient(145deg, #ffffff, #f0f0f0);
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            padding: 12px 16px;
            margin: 5px 0;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
            color: #333;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            position: relative;
        }

        .node:hover {
            background: linear-gradient(145deg, #f8f9fa, #e9ecef);
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
            border-color: #007bff;
        }

        .node:active {
            transform: translateY(0);
        }

        .children {
            margin-left: 30px;
            border-left: 2px dashed rgba(255, 255, 255, 0.3);
            padding-left: 20px;
            display: none;
            flex-direction: column;
            gap: 8px;
        }

        .children.show {
            display: flex;
        }

        .branch {
            margin-bottom: 20px;
        }

        .branch > div {
            margin-bottom: 15px;
        }

        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(3px);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .overlay.show {
            opacity: 1;
            visibility: visible;
        }

        .popover {
            position: fixed;
            width: 400px;
            max-height: 500px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: scale(0.9) translateY(-10px);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            overflow: hidden;
        }

        .popover.show {
            opacity: 1;
            visibility: visible;
            transform: scale(1) translateY(0);
        }

        .popover-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .popover-title {
            margin: 0;
            font-size: 1.5em;
            font-weight: 600;
        }

        .close-btn {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s;
        }

        .close-btn:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }

        .popover-content {
            padding: 20px;
            max-height: 400px;
            overflow-y: auto;
        }

        .example-label {
            font-weight: bold;
            color: #667eea;
            margin-bottom: 10px;
            font-size: 1.1em;
        }

        .example {
            background: #f8f9fa;
            border-left: 4px solid #667eea;
            padding: 15px;
            margin: 10px 0;
            border-radius: 4px;
            font-family: 'Noto Sans Devanagari', serif;
            font-size: 1.1em;
            line-height: 1.6;
        }

        /* Root node styling */
        .tree > .node {
            background: linear-gradient(145deg, #cbc4bc, #d0d0c6);
            color: rgb(0, 0, 0);
            font-size: 1.2em;
            font-weight: bold;
            text-align: center;
        }

        .tree > .node:hover {
            background: linear-gradient(145deg,#cbc9bc, #d0cfc6);
        }

        /* Expand/collapse indicator */
        .node::after {
            content: '';
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            width: 0;
            height: 0;
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-top: 8px solid #666;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .node.expandable::after {
            opacity: 1;
        }

        .node.expanded::after {
            transform: translateY(-50%) rotate(180deg);
        }

    .branch {
      position: relative;
      display: flex;
      justify-content: center;
      gap: 50px;
    }

    .branch::before {
      content: "";
      position: absolute;
      top: -20px;
      left: 50%;
      width: 0;
      height: 20px;
      border-left: 2px solid white;
    }

    .branch .node::before {
      content: "";
      position: absolute;
      top: -20px;
      left: 50%;
      height: 20px;
      width: 2px;
      background: white;
    }

        .dropdown-content {
            display: none;
            position: absolute;
            background-color: #f1f1f1;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
            z-index: 1;
            list-style: none;
            padding: 0;
            margin: 0;
        }
.node.clickable {
            
            color: rgb(0, 0, 0);
            border-color: #ff6b6b;
        }

        .node.clickable:hover {
            background: linear-gradient(45deg, #52ff86, #40ff00);
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
        }
@keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .branch {
            margin: 10px 0;
        }

        /* Popover Styles */
        .popover {
            position: fixed;
            background: white;
            border: 1px solid #ddd;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
            padding: 24px;
            z-index: 1000;
            max-width: 400px;
            min-width: 300px;
            display: none;
            animation: popoverFadeIn 0.3s ease-out;
        }

        @keyframes popoverFadeIn {
            from {
                opacity: 0;
                transform: scale(0.9) translateY(-10px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .popover.show {
            display: block;
        }

        .popover-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid #f1f3f4;
        }

        .popover-title {
            font-size: 18px;
            font-weight: bold;
            color: #333;
            margin: 0;
        }

        .close-btn {
            background: #ff4757;
            color: white;
            border: none;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .close-btn:hover {
            background: #ff3742;
            transform: scale(1.1);
        }

        .popover-content {
            color: #555;
            line-height: 1.6;
        }

        .example {
            background: #f8f9fa;
            border-left: 4px solid #007bff;
            padding: 12px 16px;
            margin: 12px 0;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            color: #2c3e50;
        }

        .example-label {
            font-weight: bold;
            color: #007bff;
            margin-bottom: 8px;
            font-family: Arial, sans-serif;
        }

       /* Popover Styles */
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 999;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .overlay.show {
            display: block;
            opacity: 1;
        }


        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .dropdown-content li {
            position: relative;
        }

        .dropdown-content a {
            color: black;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
        }

        .dropdown-content a:hover {
            background-color: #ddd;
        }

        .dropdown:hover .dropdown-content {
            display: block;
        }

        .dropdown:hover .dropbtn {
            background-color: #3e8e41;
        }

        /* Popover styles */
        .popover {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: white;
            border: 2px solid #ccc;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            z-index: 1000;
            width: 600px;
            max-width: 90vw;
            max-height: 80vh;
            overflow-y: auto;
        }

        .popover-header {
            background-color: #dca0a0;
            color: white;
            padding: 15px 20px;
            margin: 0;
            border-radius: 6px 6px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
.popover {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.8);
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            z-index: 1000;
            display: none;
            max-width: 500px;
            width: 90%;
            max-height: 70vh;
            overflow-y: auto;
            transition: all 0.3s ease;
        }

        .popover.show {
            display: block;
            transform: translate(-50%, -50%) scale(1);
        }

        .popover-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px 0 24px;
            border-bottom: 1px solid #e9ecef;
            margin-bottom: 20px;
        }

        .popover-title {
            margin: 0;
            font-size: 20px;
            font-weight: 600;
            color: #495057;
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #6c757d;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
        }

        .close-btn:hover {
            background-color: #f8f9fa;
            color: #495057;
        }

        .popover-content {
            padding: 0 24px 24px 24px;
            line-height: 1.8;
            font-size: 16px;
        }

        .sanskrit-text {
            font-size: 18px;
            font-weight: 500;
            color: #6f42c1;
            margin-bottom: 10px;
            text-align: center;
            padding: 15px;
            background-color: #f8f9ff;
            border-radius: 8px;
            border-left: 4px solid #6f42c1;
        }

        .verse-number {
            font-size: 14px;
            color: #6c757d;
            font-weight: normal;
        }

        .description {
            color: #495057;
            margin-top: 15px;
        }

        /* Responsive */
        @media (max-width: 600px) {
            .popover {
                width: 95%;
                max-height: 80vh;
            }
            
            .popover-header {
                padding: 15px 20px 0 20px;
            }
            
            .popover-content {
                padding: 0 20px 20px 20px;
            }
        }
        .popover-close {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .popover-close:hover {
            background-color: rgba(255,255,255,0.2);
            border-radius: 50%;
        }

        .popover-content {
            padding: 20px;
        }

        .commentary-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .commentary-list li {
            margin-bottom: 10px;
            padding: 10px;
            border: 1px solid #eee;
            border-radius: 4px;
            transition: background-color 0.3s;
        }

        .commentary-list li:hover {
            background-color: #f8f9fa;
        }

        .commentary-list a {
            color: #2c3e50;
            text-decoration: none;
            font-weight: 500;
            line-height: 1.4;
        }

        .commentary-list a:hover {
            color: #3498DB;
            text-decoration: underline;
        }

        .overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            z-index: 999;
        }
        
/* Footer styling */
footer {
  display: flex; /* Use flexbox for layout */
  justify-content: center; /* Center align items horizontally */
  align-items: center; /* Center align items vertically */
  padding: 5px;
  background-color: transparent; /* Dark background for footer */
  color: black; /* White text color */
  font-size: 0.875em; /* Slightly smaller font size */
}

footer p {
  margin: 0; /* Remove default margin */
}

/* Section Heading */
.section-heading {
  font-size: 24px; /* Larger font size for more impact */
  font-weight: bold;
  margin-bottom: 15px;
  color: black;
  text-align: center;
}

/* Scrollable Slokas */
.scrollable-slokas {
  max-height: 450px;
  overflow-y: scroll;
  width: 100%;
  padding: 0px;
  background-color: #f9f9f9;
  font-size: 14px;
  line-height: 1.4;
  border-radius: 10px;
  box-sizing: border-box;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* Hover effect for scrollable area */
.scrollable-slokas:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Container layout */
.details-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 1.5rem;
}

/* Detail Blocks */
.details-flex div {
  flex: 1 1 50%;
  padding: 7px;
  background-color: #f8f8f8;
  border-radius: 10px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  text-align: left;
}

/* Color-coded text spans */
.blue {
  color: #007bff;
  font-weight: 600;
}

.green {
  color: #28a745;
  font-weight: 600;
}

.orange {
  color: #fd7e14;
  font-weight: 600;
}

.purple {
  color: #6f42c1;
  font-weight: 600;
}

.cyan {
  color: #17a2b8;
  font-weight: 600;
}

.brown {
  color: #964b00;
  font-weight: 500;
}

.gray {
  color: #6c757d;
  font-weight: 500;
}

.teal {
  color: #20c997;
  font-weight: 500;
}

/* Toggle links */
.clickable {
  cursor: pointer;
  color: #000000;
  font-weight: bold;
  display: inline-block;
  margin: 0.5rem 0;
  transition: color 0.3s ease;
}

.clickable:hover {
  text-decoration: underline;
  color: #007bff;
}

/* Hidden content toggle */
.hidden {
  display: none;
  margin-top: 0.5rem;
  padding: 10px;
  background-color: #f0f8ff;
  border-radius: 6px;
  border: 1px solid #dcdcdc;
  font-size: 0.9rem;
}

/* Content container layout */
.content-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: 20px 0;
}

/* Sloka Text */
.sloka-text {
  color: black;  /* Keeping black */
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;  /* Remove underline */
  transition: transform 0.2s ease, color 0.2s ease;  /* Smooth transition for color and scale */
}

/* Clickable Sloka Link */
.clickable-sloka {
  color: inherit;  /* Inherit the color from .sloka-text */
  text-decoration: none;  /* Remove underline */
  cursor: pointer;  /* Indicate the element is clickable */
  display: inline-block;  /* Ensure it's inline-block for better effects */
  padding: 2px 0;  /* Subtle padding */
  border-radius: 3px;  /* Rounded corners */
}

/* Hover Effect - Subtle */
.clickable-sloka:hover {
  color: #b94c4c;  /* Slightly darker shade of red */
  transform: scale(1.05);  /* Slightly enlarge the text */
  text-decoration: underline;  /* Add a soft underline */
}

/* Active Click Effect */
.clickable-sloka:active {
  color: #c0392b;  /* Even darker red when clicked */
  transform: scale(0.98);  /* Shrink slightly to simulate pressing */
  text-decoration: none;  /* Remove underline when clicked */
}

/* Sloka container */
.sloka-container {
  width: 48%;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px; /* Reduced padding to reduce height */
  border-radius: 10px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  color: #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-height: 400px; /* Set a max height */
  overflow: hidden; /* Prevent overflow */
  margin-left: 5%;
}

.sloka-container:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Details container */
.details-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  color: #333;
}

/* VyasaBhashyam and Bhojavruthihi */
.vyasabhashyam,
.bhojavruthihi {
  margin-top: 15px;
  background: #f1f1f1;
  padding: 15px;
  border-left: 4px solid #333;
}

.vyasabhashyam {
  background: #e1e1e1;
}

.bhojavruthihi {
  background: #d1f7d1;
}


/* Content Rows */
.content-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease-out;
}

/* Column Styling */
.column {
  flex: 1;
  min-width: 500px;
  max-width: 500px;
  height: 200px;
  padding: 15px;
  box-sizing: border-box;
  border: 1px solid #b3e5fc;
  border-radius: 10px;
  background: linear-gradient(135deg, #e0f7fa 30%, #b3e5fc 100%);
  margin: 0 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.3s ease;
}

/* Remove Hover Scale Effect */
.column:hover {
  background-color: #b3e5fc;
}

/* Column Title */
.column-title {
  font-weight: bold;
  font-size: 1.5em;
  color: #01579b;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: textColorChange 4s infinite;
}

/* Sloka Text and Padacheda Text */
.sloka-text{
  margin: 5px 0;
}

/* Details Box */
.details-box {
  border-top: 1px solid #b3e5fc;
  padding-top: 15px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.5s ease-in-out;
}

/* Button Container */
.button-container {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease-out;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes textColorChange {
  0% {
    color: #01579b;
  }
  25% {
    color: #0097a7;
  }
  50% {
    color: #00acc1;
  }
  75% {
    color: #00838f;
  }
  100% {
    color: #01579b;
  }
}

/* Hover effect for main buttons */
main button:hover {
  background-color: #112d4e; /* Deep blue for main button hover */
}
/* Ensure dropdown content is initially hidden */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* Style for dropdown items */
.dropdown-content button {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-content button:hover {
  background-color: #f1f1f1;
}

/* Show the dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Style for the nested dropdown menu */
.nested-dropdown-content {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background-color: #f1f1f1; 
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.dropdown-content li:hover > .nested-dropdown-content {
  display: block;
}

.nested-dropdown-content li a {
  padding: 20px 30px; /* Adjust as needed */
  text-decoration: none;
  display: block;
  color: black;
  font-size: 20px; /* Increased font size */
}

.nested-dropdown-content li a:hover {
  background-color: transparent; /* Darker orange with transparency */
}

.dropbtn a {
  text-decoration: none; /* Remove underline */
}

.dropdown-content a {
  text-decoration: none; /* Remove underline from dropdown links */
  display: block;
  padding: 5px 10px;
}

.main {
  flex-grow: 1;
  padding: 20px;
}

.section-title {
  text-align: center;
  font-size: 2em;

  margin-bottom: 0.5em;
  color: #3f72af; /* Orange color for the title */
}


.title {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
}

/* CSS for increasing the font size of specific text */
/* Modal Container */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.8); /* Black w/ opacity */
}

/* Modal Content (Image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

/* Caption of Modal Image */
.modal-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

/* The Close Button */
.close {
  position: absolute;
  top: 0;
  right: 25px;
  color: #f1f1f1;
  font-size: 35px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

#languageSelector {
  padding: 5px;
}

#letterList span {
  cursor: pointer;
  margin-right: 5px;
  color: blue;
}
#letterList span:hover {
  text-decoration: underline;
}
#letterList span {
  cursor: pointer;
  margin: 0 5px;
  padding: 5px;
  display: inline-block;
}
#letterList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* Space between letters */
}

#letterList span {
  display: inline-block;
  padding: 10px;
  font-size: 18px;
  color: #0066cc; /* Color of the letter */
  cursor: pointer; /* Pointer cursor on hover */
  border-radius: 4px; /* Rounded corners */
  transition: background-color 0.3s, color 0.3s;
}

#letterList span:hover {
  color: #004d99; /* Darker color on hover */
  background-color: #e6f0ff; /* Light background color on hover */
}
.clickable-shloka{
  color: black;
}
#letterList span:active {
  color: #003366; /* Even darker color when clicked */
  background-color: #cce0ff; /* Slightly darker background when clicked */
}
#result-box a.word-link {
  display: block;
  padding: 10px;
  font-size: 18px;
  color: #0066cc; /* Link color */
  text-decoration: none; /* Remove underline */
  border-radius: 4px; /* Rounded corners */
  margin: 5px 0; /* Space between links */
  transition: background-color 0.3s, color 0.3s;
}

#result-box a.word-link:hover {
  color: #004d99; /* Darker color on hover */
  background-color: #e6f0ff; /* Light background color on hover */
}

#result-box a.word-link:active {
  color: #003366; /* Even darker color when clicked */
  background-color: #cce0ff; /* Slightly darker background when clicked */
}
#letterList span {
  cursor: pointer;
  margin: 0 5px;
  font-size: 18px;
  display: inline-block;
}
#letterList span:hover {
  color: #007bff;
}
#result {
  margin-top: 20px;
}
a.word-link {
  color: #007bff;
  text-decoration: none;
}
a.word-link:hover {
  text-decoration: underline;
}
/* Main content styling to ensure the form is attached properly */
#mainContent {
  padding: 20px;
  max-width: 800px; /* Adjust width as needed */
  margin: 0 auto; /* Center align */
}

/* Letter list styles */
#letterList {
  margin-bottom: 20px;
}

.letter-span {
  display: inline-block;
  padding: 12px 18px; /* Adjusted padding */
  margin: 0 8px; /* Adjusted margin */
  cursor: pointer;
  border: 2px solid #007bff; /* Border color for non-highlighted state */
  border-radius: 10px; /* More rounded corners */
  background-color: #e0e0e0; /* Light gray background color */
  color: #333; /* Dark text color */
  font-size: 1.3em; /* Slightly larger font size */
  transition: all 0.3s ease; /* Smooth transition for highlight effect */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.letter-span:hover {
  background-color: #e7f0ff; /* Light blue background on hover */
  color: #0056b3; /* Darker blue text on hover */
  border-color: #0056b3; /* Darker border on hover */
  transform: translateY(-3px); /* Slight lift effect on hover */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Slightly more shadow on hover */
}

.letter-span.highlighted {
  background-color: #007bff; /* Blue background color for highlighted state */
  color: #fff; /* White text color */
  border-color: #0056b3; /* Darker blue border color */
  font-weight: bold; /* Bold text */
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* More prominent shadow */
  transform: scale(1.05); /* Slightly enlarge the highlighted letter */
}

/* Word columns styles */
.word-columns {
  display: flex;

  flex-wrap: wrap; /* Allow wrapping if needed */
  gap: 40px; /* Increased gap between columns */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.word-column {
  flex: 1 1 0; /* Flex grow and shrink with base size of 0 */
  max-width: 200px; /* Set a max width for each column */
  margin: 0 10px; /* Spacing between columns */
  text-align: center; /* Center text within the column */
}
/* Center the content if only one column is present */
.word-columns.single-column {
  grid-template-columns: 1fr; /* Only one column */
  justify-content: center; /* Center the column */
}

#wordDetails {
  background-color: #f0f8ff; /* Light blue background */
  border: 1px solid #ddd; /* Light gray border */
  padding: 10px;
  margin-top: 20px;
  border-radius: 5px;
}

/* Style for the practice form */
#practiceFormContainer {
  margin-top: 20px;
}

#practiceForm table {
  width: 100%;
  border-collapse: collapse;
}

#practiceForm th,
#practiceForm td {
  border: 1px solid #ddd;
  padding: 8px;
}

#practiceForm th {
  background-color: #f2f2f2;
}

#practiceMessage {
  margin-top: 10px;
  font-weight: bold;
  color: #d9534f; /* Red color for error messages */
}
/* Container for the grid */

/* Container for the word list */
.word-list-container {
  width: 90%;
  max-width: 900px;
  background-color: #34495e;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* Title styling */
.word-list-title {
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  color: black; /* Set title text color to black */
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: transparent; /* Transparent background */
}

/* Word columns for horizontal alignment */
.word-columns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 80px; /* Increased gap between columns */
}

.word-column {
  text-align: center;
}

.word-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* Adds space between words */
}

.word-link {
  width: calc(100% / 6 - 20px); /* Ensure 6 words per row, adjusting for gap */
  text-align: center;
  margin: 5px;
}

/* Word link styling with blue to black transition */
.word-link {
  display: block;
  padding: 15px 20px;
  margin: 10px 0;
  text-decoration: none;
  font-size: 22px;
  font-weight: 500;
  color: blue; /* Start color as blue */
  background-color: rgba(
    255,
    255,
    255,
    0.8
  ); /* Semi-transparent white background */
  border-radius: 8px;
  text-align: center;
  width: fit-content;
  transition: color 1s ease-in-out, transform 0.3s, text-shadow 0.3s; /* Transition effect */
}

/* After loading, transition the word color to black */
.word-link {
  animation: colorChange 1.5s forwards; /* Gradually change from blue to black */
}

@keyframes colorChange {
  0% {
    color: blue;
  }
  100% {
    color: black; /* End color black */
  }
}

/* Hover effect: keep text black but add a shadow for emphasis */
.word-link:hover {
  color: black; /* Ensure the text remains black */
  background-color: rgba(255, 255, 255, 1); /* Full white background */
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Add a shadow to the text */
  transform: scale(1.05); /* Slightly increase size on hover */
}

/* Result and details styles */
#result p {
  font-weight: bold;
}

#wordDetails {
  border-top: 1px solid #ddd;
  padding-top: 10px;
}
/* Container for the main content */

/* Main content container */
#mainContent {
  width: 90%;
  max-width: 10000x;
  min-width: 10000px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f0f4f8; /* Light grey background for contrast */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  position: relative; /* Ensure relative positioning */
}

/* Form styling */
#wordInflectionForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
  background-color: #2c3e50; /* Darker background color */
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* Form labels */
#wordInflectionForm label {
  font-size: 18px;
  color: #ecf0f1; /* Light color for contrast */
  margin-bottom: 5px;
}

/* Form input and select */
#wordInflectionForm input,
#wordInflectionForm select {
  font-size: 16px;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #34495e; /* Border color */
  transition: border-color 0.3s, box-shadow 0.3s;
}

#wordInflectionForm input::placeholder {
  color: #bdc3c7; /* Placeholder color */
}

/* Focus effect for input and select */
#wordInflectionForm input:focus,
#wordInflectionForm select:focus {
  border-color: #1abc9c; /* Teal color for focus */
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  outline: none;
}

/* Submit button styling */
#wordInflectionForm button {
  padding: 10px 20px;
  font-size: 16px;
  color: #ffffff;
  background-color: #3498db; /* Blue color for button */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

/* Button hover effect */
#wordInflectionForm button:hover {
  background-color: #2980b9; /* Darker blue for hover */
  transform: scale(1.05);
}

/* Letter list styling */
#letterList {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

#letterList span {
  display: inline-block;
  padding: 10px 15px;
  font-size: 18px;
  background-color: #1abc9c; /* Teal color for letters */
  color: #ffffff;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

#letterList span:hover {
  background-color: #16a085; /* Darker teal for hover */
  transform: scale(1.1);
}

/* Results section styling */
#result {
  margin-bottom: 30px;
}

/* Word details section styling */
#wordDetails {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Loader Styles */
.loader {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Transparent black background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Ensure it's on top of other content */
  transition: opacity 1s ease-out; /* Fade-out effect */
}

/* Ring animation with glow effect */
.ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 10px solid rgba(255, 255, 255, 0.3);
  border-top: 10px solid #fff; /* White color for the ring */
  border-radius: 50%;
  animation: spin 2s linear infinite; /* Spinning animation */
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
    /* Light shadow */ 0 0 50px rgba(255, 255, 255, 0.4),
    /* Outer glow effect */ 0 0 100px rgba(255, 255, 255, 0.2); /* Stronger outer glow */
}

/* GIF in the foreground with glow effect */
.loading-gif {
  position: relative;
  width: 150px; /* Adjust size of the GIF */
  height: auto;
  z-index: 1; /* Ensure GIF is above the ring */
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.8),
    /* Shadow for the GIF */ 0 0 20px rgba(255, 255, 255, 0.6),
    /* Glow effect */ 0 0 50px rgba(255, 255, 255, 0.4); /* Stronger outer glow */
  border-radius: 10px; /* Optional: Rounded corners */
}

/* Spinning animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hide the loader after 3 seconds */
.loader.fade-out {
  opacity: 0;
  visibility: hidden;
}
/* Container styling */
#wordDetailsContainer {
  padding: 20px;
  background-color: #e0f7fa; /* Light cyan background for the container */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  overflow: auto;
}

/* Stylish table */
#wordDetailsContainer table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: gray; /* White background for the table */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Table headers (First Row) */
#wordDetailsContainer th {
  background-color: #2196f3; /* Blue background for headers */
  color: black; /* White text color for headers */
  padding: 12px 15px;
  text-align: center;
  font-size: 16px;
  border-bottom: 2px solid #bbdefb; /* Light blue border */
}

/* Table cells */
#wordDetailsContainer td {
  padding: 10px 15px;
  text-align: center;
  font-size: 15px;
  color: #333333; /* Dark grey text color for table cells */
  border-bottom: 1px solid #bbdefb; /* Light blue border */
}

/* First Row Styling */
#wordDetailsContainer tr:first-child th {
  background-color: #f44336; /* Red background for the first row */
  color: black; /* White text color for the first row */
}

/* First Column Styling */
#wordDetailsContainer td:first-child {
  background-color: #2196f3; /* Blue background for the first column */
  color: black; /* White text color for the first column */
  font-weight: bold;
}

/* Alternate row background */
#wordDetailsContainer tr:nth-child(odd) {
  background-color: #f1f8e9; /* Light green for odd rows */
}

#wordDetailsContainer tr:nth-child(even) {
  background-color: #ffffff; /* White background for even rows */
}

/* Hover effect for rows */
#wordDetailsContainer tr:hover {
  background-color: #e3f2fd; /* Light blue on hover */
}

/* Links inside the table */
#wordDetailsContainer a {
  color: #2196f3; /* Blue text color for links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

#wordDetailsContainer a:hover {
  color: #f44336; /* Red text color for links on hover */
}

/* Paragraphs */
#wordDetailsContainer p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #333333; /* Dark grey text color for paragraphs */
}

/* Button styling */
#practiceButton {
  background-color: #2196f3; /* Blue button */
  color: white; /* White text color for the button */
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
  display: block;
  margin: 20px auto 0 auto;
}

#practiceButton:hover {
  background-color: #1976d2; /* Darker blue on hover */
}
/* Modal Background Overlay */
#modalOverlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  z-index: 1000;
  opacity: 0; /* Initial opacity for fade-in effect */
  transition: opacity 0.3s ease; /* Smooth fade-in and fade-out */
}

/* Modal Content */
#modalContent {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9); /* Initial scale for zoom effect */
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 80%;
  max-width: 600px;
  z-index: 1001;
  opacity: 0; /* Initial opacity for fade-in effect */
  transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth fade-in and zoom */
}

/* Modal Content Visible */
#modalContent.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1); /* Final scale for zoom effect */
}

/* Modal Background Overlay Visible */
#modalOverlay.show {
  display: block;
  opacity: 1;
}

/* Modal Content Hidden */
#modalContent.hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9); /* Scale down effect for closing */
}

/* Modal Background Overlay Hidden */
#modalOverlay.hide {
  opacity: 0;
}
            .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 40px 20px;
        }
     
        h1 {
            font-size: 2.5em;
            text-align: center;
            margin-bottom: 30px;
            font-family: 'Times New Roman', Times, serif;
            color: rgb(0, 0, 0);
        }
        
        h2 {
            font-family: 'Times New Roman', Times, serif;
            margin-bottom: 15px;
            color: rgb(0, 0, 0);
        }
        
        select {
            padding: 10px;
            border-radius: 4px;
            border: 1px solid #ddd;
            font-size: 16px;
            margin-bottom: 20px;
            width: 200px;
        }
        
        .back-link {
            display: inline-block;
            margin-top: 20px;
            color: white;
            text-decoration: none;
        }
        
        .back-link:hover {
            text-decoration: underline;
        }
        
        /* Modal/Popup Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.7);
        }
        
        .modal-content {
            position: relative;
            background-color: #fefefe;
            margin: 5% auto;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
            width: 80%;
            max-width: 900px;
            color: #333;
            max-height: 80vh;
            overflow-y: auto;
        }
        
        .close-btn {
            position: absolute;
            top: 10px;
            right: 20px;
            color: #aaa;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }
        
        .close-btn:hover {
            color: #333;
        }
        
        .modal-header {
            border-bottom: 1px solid #e0e0e0;
            padding-bottom: 15px;
            margin-bottom: 20px;
        }
        
        .book-list {
            list-style-type: none;
            padding: 0;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 15px;
        }
        
        .book-item {
            padding: 15px;
            background-color: #f9f9f9;
            border-radius: 4px;
            border-left: 4px solid #984205;
            transition: all 0.3s ease;
            height: 100%;
        }
        
        .book-item:hover {
            background-color: #f1f1f1;
            transform: translateX(5px);
        }
        
        .book-item a {
            text-decoration: none;
            color: #333;
            font-weight: bold;
            display: block;
        }
        
        .book-item a:hover {
            color: #9b6001;
        }
        
        footer {
            text-align: center;
            margin-top: 100px;
            padding: 20px;
            font-size: 0.9em;
            color: #000000;
        }

        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            background-color: #f9f9f9;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
            z-index: 1;
            border-radius: 4px;
        }

        .dropdown-content a {
            color: black;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
        }

        .dropdown-content a:hover {
            background-color: #f1f1f1;
        }

        /* Add this to your CSS */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    top: 100%;
    left: 0;
    margin-top: -1px;
    border-radius: 5px;
}

.dropdown-content li {
    display: block;
}

.dropdown-content li a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content li a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/*new search*/
/* Container for Search */
.search-container {
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 1000px;
  padding: 10px;
  display: flex;
  justify-content: space-between; /* Align items horizontally */
  align-items: center; /* Vertically center the items */
  gap: 15px;
}

/* Search Wrapper */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between the elements */
  width: 100%;
}

/* Dropdown Styling */
.dropdown-container {
  flex-shrink: 0; /* Prevent the dropdown from shrinking */
}

.dropdown-select {
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #f9f9f9;
  color: #333;
  transition: all 0.3s ease;
  width: 180px; /* Set a fixed width */
}

.dropdown-select:focus {
  border-color: #5c6bc0;
  outline: none;
  box-shadow: 0 0 5px rgba(92, 107, 192, 0.5);
}

/* Search Input */
.suggestions-container {
  flex-grow: 1; /* Let the input field grow to take available space */
  width: 10px;
}

.search-input {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #f9f9f9;
  opacity: 80%;
  color: #333;
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: #aaa;
}

.search-input:focus {
  border-color: #5c6bc0;
  outline: none;
  box-shadow: 0 0 5px rgba(92, 107, 192, 0.5);
}

/* Search Button */
.search-button {
  background-color: #5c6bc0;
  color: #fff;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-button:hover {
  background-color: #3f51b5;
}

/* Details Container */
.details-containerr {
  margin-top: 20px;
  padding: 15px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-height: 500px; /* Adjust the height as per your need */
  overflow-y: auto; /* Makes the content scrollable */
  width: 50%;
}

.details-containerr::-webkit-scrollbar {
  width: 8px;
}

.details-containerr::-webkit-scrollbar-thumb {
  background-color: rgba(92, 107, 192, 0.5);
  border-radius: 4px;
}

.details-containerr::-webkit-scrollbar-thumb:hover {
  background-color: rgba(92, 107, 192, 0.8);
}

.details-containerr.active {
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-container {
    flex-direction: column; /* Stack vertically on smaller screens */
    gap: 10px;
  }

  .dropdown-select,
  .search-input,
  .search-button {
    font-size: 14px;
  }
}