body {
  background-color: #3a3636;
  color: #E0E0E0;
  font-family: 'Radio Canada', sans-serif;
  margin: 0;
  padding: 0;
  text-align: center;
}

.menu {
  background-color: #1E1E1E;
  padding: 0;
  /* Removed padding here, will add to li/a */
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  /* Subtle shadow for depth */
}

/* Styles for the main menu ul */
.menu ul {
  list-style: none;
  /* Remove bullet points */
  padding: 0;
  margin: 0;
  display: flex;
  /* Arrange list items horizontally */
  justify-content: center;
  /* Centre the menu items */
  flex-wrap: wrap;
  /* Allow items to wrap on smaller screens */
}

/* Styles for main menu list items */
.menu li {
  margin: 0;
  /* Remove margin, spacing will be handled by padding on links */
  position: relative;
  /* Needed for absolute positioning of the sub-menu */
  /* Optional: Add a subtle border between items */
  /* border-right: 1px solid #2b2b2b; */
}

/* Remove border from the last item if added */
/* .menu li:last-child {
    border-right: none;
} */


/* Styles for menu links (both main and sub-menu) */
.menu a {
  color: #BB86FC;
  text-decoration: none;
  font-size: 18px;
  padding: 15px 20px;
  /* Increased padding for larger click area and spacing */
  display: block;
  /* Make links block level */
  transition: color 0.3s ease, background-color 0.3s ease;
  /* Smooth transitions */
}

/* Hover effect for main menu links */
.menu>ul>li>a:hover {
  color: #03DAC6;
  background-color: #2a2a2a;
  /* Slight background change on hover */
}

/* Add a small indicator for items with sub-menus */
.menu li:has(ul)>a:after {
  content: ' ▼';
  /* Unicode down arrow */
  font-size: 0.8em;
  margin-left: 5px;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

/* Rotate arrow on hover */
.menu li:hover:has(ul)>a:after {
  transform: rotate(180deg);
}


/* Styles for the sub-menu ul */
.menu ul ul {
  visibility: hidden;
  /* Use visibility for smooth fade-in with opacity */
  opacity: 0;
  /* Start hidden */
  position: absolute;
  /* Position it relative to the parent li */
  top: 100%;
  /* Place it directly below the parent li */
  left: 0;
  /* Align to the left of the parent li */
  background-color: #1E1E1E;
  /* Background for the dropdown */
  padding: 10px 0;
  /* Padding inside the dropdown box */
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.4);
  /* Stronger shadow */
  z-index: 1;
  /* Ensure it appears above other content */
  text-align: left;
  /* Align sub-menu text to the left */
  min-width: 200px;
  /* Give the dropdown a minimum width */
  transition: visibility 0s linear 0.3s, opacity 0.3s ease;
  /* Fade-in transition */
  border-top: 2px solid #03DAC6;
  /* Add a colourful top border */
}

/* Show the sub-menu when the parent list item is hovered */
.menu li:hover>ul {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
  /* Show immediately on hover */
}

/* Styles for sub-menu list items */
.menu ul ul li {
  margin: 0;
  /* Remove margin from sub-menu list items */
  width: 100%;
  /* Make sub-menu items take full width of the dropdown */
}

/* Styles for sub-menu links */
.menu ul ul li a {
  padding: 10px 20px;
  /* Padding for links inside the dropdown */
  font-size: 16px;
  /* Slightly smaller font for sub-menu */
  color: #BB86FC;
  /* Ensure sub-menu links have the primary text colour */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover effect for sub-menu links */
.menu ul ul li a:hover {
  background-color: #2a2a2a;
  /* Highlight sub-menu item on hover */
  color: #03DAC6;
  /* Change text colour on hover */
}


/* --- Existing CSS below (kept for completeness) --- */

.container {
  padding: 50px 20px;
}

.logo img {
  margin-top: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  font-size: 36px;
  color: #BB86FC;
}

.description p {
  font-size: 18px;
  max-width: 800px;
  margin: 20px auto;
  line-height: 1.6;
}

.screenshot {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.screenshot img {
  width: 80%;
  max-width: 800px;
  border-radius: 10px;
}

.download-button {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.download-button a {
  display: inline-block;
  background-color: #03DAC6;
  color: #121212;
  padding: 12px 25px;
  font-size: 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.download-button a:hover {
  background-color: #BB86FC;
}

/* Base styling for content container (used on contact and tools pages) */
.leftindent {
  margin: 50px auto;
  padding: 20px;
  text-align: center;
  font-family: "Radio Canada";
  max-width: 800px;
  /* Increased width */
}

.leftindent .logo {
  margin-bottom: 20px;
}

div.elem-group {
  margin: 20px 0;
  text-align: left;
  /* Aligns labels and inputs to the left within this group */
}

label {
  display: block;
  padding-bottom: 4px;
  font-size: 1em;
}

/* General styling for form inputs */
input,
select,
textarea {
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-size: 1em;
  width: 100%;
  padding: 10px;
  background-color: #1E1E1E;
  color: #E0E0E0;
}

/* Specific style for the password length dropdown to make it smaller */
#passLength {
  width: 100px;
}

/* Styles for the main password checkbox options container to create two columns */
.char-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  text-align: left;
  margin-top: 15px;
}

.char-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.char-options input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
  box-sizing: content-box;
}

/* Style for the basic password options container (length dropdown) */
.basic-options {
  margin-bottom: 15px;
  text-align: left;
}

.basic-options label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  text-align: left;
  width: auto;
}

/* Ensure the select input within this specific label doesn't have conflicting styles */
.basic-options label select {
  margin: 0;
}

/* Style for the separator interval dropdown */
#separatorInterval {
  width: auto;
  /* Allow dropdown to size based on content */
  padding: 5px 10px;
  /* Adjust padding to fit inline */
  margin-left: 5px;
  /* Small gap before the dropdown */
  margin-right: 5px;
  /* Small gap after the dropdown */
  display: inline-block;
  /* Ensure it sits inline */
  vertical-align: middle;
  /* Align vertically with text */
  /* Inherits other styles like border, border-radius, background, color from general select rule */
}


/* Style for the advanced options container to make items go side-by-side */
.advanced-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  margin-top: 15px;
}

.advanced-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.advanced-options input[type="checkbox"],
.advanced-options select {
  width: auto;
  margin: 0;
  padding: 5px 10px;
  box-sizing: border-box;
}


/* Adjust the custom pattern label/input within the flex container */
#customPatternLabel {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

#customPatternInput {
  width: auto !important;
  max-width: 325px;
}


/* Style for the password strength bar container and the bar itself */
#passwordStrengthContainer {
  width: 100%;
  max-width: 400px;
  height: 10px;
  background-color: #555;
  border-radius: 5px;
  margin: 10px auto;
  overflow: hidden;
}

#passwordStrengthBar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
}


button {
  background-color: #03DAC6;
  color: #121212;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 18px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, background-color 0.3s;
  margin-top: 10px;
  margin-right: 5px;
  margin-left: 5px;
}

button:hover {
  transform: scale(1.05);
  background-color: #BB86FC;
}

/* Style for the <pre> elements used for output */
pre {
  background-color: #1E1E1E;
  color: #BB86FC;
  padding: 15px;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 15px auto;
  max-width: 100%;
  text-align: left;
  border: 1px solid #3a3636;
}

/* Add some styling for the .section divs */
.section {
  background-color: #1E1E1E;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 8px;
  text-align: center;
  /* Content inside sections is centred by default */
  border: 1px solid #3a3636;
}

.section h2 {
  color: #03DAC6;
  margin-top: 0;
  margin-bottom: 20px;
}

.section h3 {
  color: #BB86FC;
  margin-top: 20px;
  margin-bottom: 10px;
}

.section .options {
  margin-bottom: 15px;
  /* Add space below options divs */
}

/* Ensure text alignment is left for input groups within sections */
.section .elem-group {
  text-align: left;
}


/* Media Query for Mobile Devices */
@media screen and (max-width: 768px) {

  /* Adjusted breakpoint slightly for better tablet view */
  /* Ensure main menu stacks on smaller screens */
  .menu ul {
    flex-direction: column;
    align-items: stretch;
    /* Stretch items to fill width */
  }

  .menu li {
    margin: 0;
    /* Remove margin when stacked */
    border-bottom: 1px solid #2b2b2b;
    /* Add a separator line */
  }

  .menu li:last-child {
    border-bottom: none;
  }

  .menu a {
    padding: 10px 15px;
    /* Adjust padding for stacked items */
    text-align: center;
    /* Centre text in stacked items */
  }

  /* Adjust indicator arrow for stacked menu */
  .menu li:has(ul)>a:after {
    content: ' ▼';
    margin-left: 10px;
    /* Space out the arrow */
    float: right;
    /* Float arrow to the right */
    transform: rotate(0deg);
    /* Reset rotation */
  }

  /* Rotate arrow when stacked item with sub-menu is hovered */
  .menu li:hover:has(ul)>a:after {
    transform: rotate(180deg);
  }


  /* Adjust sub-menu positioning and appearance for stacked main menu */
  .menu ul ul {
    position: static;
    /* Static positioning when main menu is stacked */
    box-shadow: none;
    /* Remove shadow */
    padding: 0 15px 10px 15px;
    /* Adjust padding, add bottom padding */
    min-width: auto;
    /* Auto width */
    text-align: left;
    /* Keep sub-menu text left-aligned */
    border-top: none;
    /* Remove top border */
    background-color: #2a2a2a;
    /* Slightly different background for sub-menu */
  }

  .menu ul ul li {
    border-bottom: none;
    /* Remove borders from sub-menu items */
  }

  .menu ul ul li a {
    padding: 8px 0;
    /* Adjust sub-menu link padding for stacked layout */
    text-align: left;
    /* Align sub-menu links to the left */
  }


  /* --- Existing Media Query CSS below (kept for completeness) --- */
  .leftindent {
    margin: 20px auto;
    padding: 15px;
  }

  label,
  input,
  textarea,
  button {
    font-size: 16px;
  }

  /* Stack two-column layouts on small screens */
  .char-options {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .advanced-options {
    flex-direction: column;
    gap: 5px;
  }

  .advanced-options label {
    width: 100%;
    justify-content: flex-start;
  }

  #customPatternLabel {
    flex-basis: auto;
    width: 100%;
    margin-top: 5px;
  }

  /* Ensure basic options label is also stacked and left aligned on small screens */
  .basic-options label {
    flex-direction: column;
    /* Stack text and select */
    align-items: flex-start;
    /* Align items to the start (left) */
    gap: 5px;
    /* Adjust gap for stacking */
    width: 100%;
    /* Take full width */
  }

  .basic-options label select {
    width: auto;
    /* Allow auto width for select */
    max-width: 100px;
    /* Prevent it from becoming too wide */
    margin: 0;
    /* Reset margin if stacked */
  }

  /* Adjust separator interval dropdown on small screens if needed */
  #separatorInterval {
    width: auto;
    /* Allow auto width */
    max-width: 80px;
    /* Keep it narrow */
    margin: 0 5px;
    /* Adjust margin */
    vertical-align: middle;
    /* Still try to vertically align if space allows */
  }

  #qrCodeOutput {
    display: flex;
    /* 1. Make this div a Flex container */
    justify-content: center;
    /* 2. Center content horizontally within the flex container */
    align-items: center;
    /* 3. Center content vertically within the flex container (optional, but good practice) */
    /* margin-top: 15px; */
    /* You can keep margin-top here in CSS instead of inline style if you prefer */

  }







}