/* Reset and Basic Styles */
body {
    font-family: "Times New Roman", Times, serif;
    margin: 0;
    background-color: #f5f5f5;
    text-align: center;
}

#resultsList li {
    font-family: Poppins, "Times New Roman", Times, serif;
}

/* Header */
header {
    background-color: #021f42;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: relative;
}

header img.logo {
    height: 35px;
    display: block;
}

/* Menu Container */
.menu-container {
    position: relative;
}

/* Menu Icon */
.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    padding-left: 5px;
}

.menu-icon span {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background-color: #021f42;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
}

.dropdown-menu a:hover {
    color: #ff8c00;
}

@media (min-width: 769px) {
    .dropdown-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .dropdown-menu {
        width: 150px;
    }
}

/* Search Section */
.search-section {
    text-align: center;
    margin-bottom: 10px;
    padding: 0 10px;
    padding-top: 25px;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 480px) {
  #search-section {
    text-align: center;
    padding-top: 4px;
    padding-bottom: 10px;
  }
}

.search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin: auto;
}

/* Search Input Container */
.search-input-container {
    position: relative;
    flex: 1;
    padding-right: 30px;
}

.search-input-container input[type="text"] {
  width: 100%;
  padding-right: 20px;
}

/* Clear Button */
.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    color: #021f42;
}

input[type="text"] {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

button {
    background-color: #021f42;
    color: white;
    border: none;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 8px;
}

#searchBtn:hover {
    background-color: #e66c00;
}

/* Responsive Search Fix */
@media (max-width: 480px) {
    .search-bar {
        flex-wrap: nowrap;
        width: 100%;
    }

    input[type="text"] {
        width: calc(100% - 60px);
    }

    button {
        width: 50px;
        padding: 12px;
    }
}

/* Suggestions */
.suggestions {
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
    margin-top: 3px;
    background-color: #fff;
    border-bottom: 0px solid #ccc;
    border-right: 1px solid #ccc;
    border-left: 1px solid #ccc;
    display: none;
    text-align: left;
    border-radius: 8px;
    overflow: hidden;
    flex-wrap: nowrap;
}

/* Center Suggestions */
.suggestions div {
    padding: 7px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* Alternating Background Colors */
.suggestions div:nth-child(odd) {
    background-color: #f0f8ff;
}

.suggestions div:nth-child(even) {
    background-color: white;
}

.suggestions div:hover {
    background-color: #dceefb;
}

/* Browse by Letter */
.alphabet-section {
    text-align: center;
    margin-top: 10px;
}

.alphabet-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 500px;
    margin: auto;
}

.alphabet-buttons button {
    background-color: #021f42;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.alphabet-buttons button:hover {
    background-color: #e66c00;
}

@media (max-width: 600px) {
    .alphabet-buttons {
        gap: 5px;
        justify-content: center;
    }

    .alphabet-buttons button {
        padding: 8px;
        font-size: 14px;
    }
}

/* Word of the Day */
.word-of-day {
    margin: 50px 0;
    width: 80%;
    max-width: 500px;
    border: 1px solid #ccc;
    display: inline-block;
    border-radius: 8px;
    margin: auto;
    margin-top: 30px;
    margin-bottom: 40px;
}

/* Search Results Section */
#resultsSection {
    text-align: center;
}

.show-more-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
}

#showMoreBtn {
    background-color: #021f42;
    color: white;
    border: none;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 8px;
    width: 110px;
    padding-top: 10px;
    padding-bottom: 10px;
}

#showMoreBtn:hover {
    background-color: #e66c00;
}

/* Back to Top Button */
#backToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #021f42;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    font-size: 20px;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#backToTopBtn:hover {
    background-color: #e66c00;
}

/* Share Icons */
.share-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.share-icons span {
    font-size: 16px;
    font-weight: normal;
}

.share-icons svg {
    width: 25px;
    height: 25px;
}

.share-icons a {
    text-decoration: none;
}

/* Footer */
footer {
    background-color: #021f42;
    color: #eaeded;
    text-align: center;
    padding: 20px;
}

::marker {
    content: none;
}

ul {
    padding-left: 0;
    list-style: none;
    width: 95%;
    max-width: 600px;
    margin: 10px auto;
    margin-top: 3px;
}

li {
    padding: 5px 10px;
    font-size: 19px;
    background-color: #fff;
    border: none; 
    border-bottom: 1px solid #ddd;
    text-align: left;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0;
    letter-spacing: normal;
    line-height: 1.5;
    font-style: normal;
    font-weight: 400;
    color: #333;
}

li strong.word {
    font-weight: bold;
}

li em.abbreviation {
    font-style: italic;
}

/* Responsive Section Styling */
.preface-section,
.foreword-section,
.about-section {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    text-align: centre;
}

.dictionary,
.contact-info {
    width: 100%;
}

.play-store {
    max-width: 100%;
    height: auto;
    width: 200px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Search Icon */
.search-icon {
    fill: #ffffff;
    width: 24px;
    height: 20px;
    transition: fill 0.3s;
}

button#searchBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background-color: #021f42;
    border-radius: 8px;
    cursor: pointer;
    border: none;
}

button#searchBtn:hover {
    background-color: #e66c00;
}

/* Word of the Day Section */
.word-of-day {
    margin: 50px 0;
    width: 80%;
    max-width: 500px;
    border: 1px solid #ccc;
    display: inline-block;
    border-radius: 8px;
    margin: auto;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Base styling for the Word of the Day content */
#wordOfDay {
    font-size: 20px;
    line-height: 1.6;
    padding: 10px;
    color: #333;
    margin-bottom: 10px;
    margin-top: 10px;
}

/* Style for the word (bold) */
#wordOfDay strong {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

/* Style for the abbreviation (italic) */
#wordOfDay em {
    font-size: 18px;
    font-style: italic;
    color: #333;
}

/* Style for the source */
#wordOfDay small {
    font-size: 14px;
    color: #666;
}

/* Ensure the meaning (plain text) inherits the base font size */
#wordOfDay br {
    margin-bottom: 5px;
}
/* Current Date */
#currentDate {
    font-size: 18px;
    color: #666;
    margin: 5px 0;
}

/* Install Popup */
.install-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.popup-content h3 {
  margin: 0 0 10px;
  color: #021f42;
  font-size: 1.2em;
}

.popup-content p {
  margin: 0 0 15px;
  color: #666;
  font-size: 0.9em;
}

/* Button container to ensure proper alignment */
.popup-content .button-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Updated button styles */
.popup-content button {
  background-color: #021f42;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.popup-content button:hover {
  background-color: #e66c00;
}

/* Underline for Browse by Letter */
#alphabetNav h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 5px;
}

/* Create the underline using a pseudo-element */
#alphabetNav h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #021f42;
}

/* Underline for Word of the Day */
#wordOfDaySection h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 5px;
  margin-top: 10px;
}

/* Create the underline using a pseudo-element */
#wordOfDaySection h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #021f42;
}

/* Welcome Heading */
#welcomeHeading {
  font-size: 24px;
  color: #021f42;
  margin: 0;
  padding-top: 0px;
  padding-bottom: 15px;
  text-align: center;
  display: block; /* Ensure it’s visible by default */
}

/* Responsive adjustment for smaller screens */
@media (max-width: 480px) {
  #welcomeHeading {
    font-size: 20px;
    padding-top: 4px;
    padding-bottom: 10px;
  }
}