* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  background-color: #ffffff; /* fallback */
  background-position: center;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
}


.main-container {
  width: 100%;
  padding: 10rem 1rem 6rem; /* Top and bottom spacing */
  display: flex;
  flex-direction: column;
  align-items: center;
}



.site-logo {
  max-width: 100px;
  height: auto;
  margin-bottom: 1rem;
}


h1 {
  font-size: 3rem;
  margin-bottom: 0.2rem;
}

p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.search-wrapper {
  width: 50%;
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 2px;
}

.input-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 14px 40px 14px 20px;
  font-size: 1rem;
  background: white;
  border: none;
  border-radius: 30px;
  outline: none;
  transition: border-radius 0.15s ease;
  z-index: 2;
  position: relative;
}

.search-input.typing {
  border-radius: 30px 30px 4px 4px;
}







.input-container.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 49%;
  z-index: 1000;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-radius: 0;
}

@media (max-width: 600px) {
  .input-container.sticky {
    width: 83%;
  }
}















.clear-button {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  cursor: pointer;
  z-index: 3;
  display: none;
  user-select: none;
  background: none;
  border: none;
}

.clear-button:hover {
  color: #000;
}

.suggestion-box {
  display: none;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.suggestion-box.active {
  display: flex;
}

.suggestion-items-scrollable {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
  transition: max-height 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.suggestion-item {
  height: 48px;
  padding: 14px 20px;
  font-size: 1rem;
  background: white;
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  flex-shrink: 0;
  transition: transform 0.1s;
  position: relative;
}

.suggestion-item:active {
  transform: scale(0.98);
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

.copy-icon {
  font-size: 20px;
  color: #666;
  cursor: pointer;
  user-select: none;
  margin-left: auto;
}

.copy-icon:hover {
  color: #000;
}

body.dark .copy-icon {
  color: #ccc;
}

body.dark .copy-icon:hover {
  color: #fff;
}


.show-all-button {
  height: 48px;
  padding: 14px 20px;
  font-size: 1rem;
  background: white;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px 4px 30px 30px;
  width: 100%;
  cursor: pointer;
  flex-shrink: 0;
}

.show-all-button:hover {
  background-color: #f0f0f0;
}

/* Show max 5 tiles before Show All */
.limited-height {
  max-height: calc((48px + 2px) * 5);
}

.full-height {
  max-height: none;
  overflow-y: hidden;
}

.copied-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  animation: fadeInOut 1s ease;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* top menu */
  /* Hamburger circle button */
    .hamburger-btn {
      position: absolute;
      top: 30px;
      right: 30px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: #f5f5f5;
      box-shadow: 0 1px 4px rgba(0,0,0,0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 1001;
    }

    .hamburger-btn .material-symbols-outlined {
      font-size: 24px;
      color: #333;
    }

    /* Dropdown menu */
    .dropdown-menu {
      position: fixed;
      top: 80px;
      right: 30px;
      width: 180px;
      background-color: #fff;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      border-radius: 8px;
      overflow: hidden;
      display: none;
      z-index: 1000;
    }

    .dropdown-menu.show {
      display: block;
    }

    .dropdown-menu ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .dropdown-menu li {
      padding: 12px 16px;
      font-size: 14px;
      color: #333;
      border-bottom: 1px solid #eee;
      cursor: pointer;
      transition: background 0.2s ease;
    }

    .dropdown-menu li:hover {
      background-color: #f8f8f8;
    }

    .dropdown-menu li:last-child {
      border-bottom: none;
    }





/* Bottom menu */
.footer-menu {
  margin-top: auto;
  position: relative;
  bottom: 16px;
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  color: #555;
  z-index: 10;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}


/* ✅ Mobile Responsive Fix */
@media (max-width: 600px) {


.site-logo {
    max-width: 80px;
 margin-top: 60px; /* ✅ Add spacing for mobile */
  }

  h1 {
    font-size: 1.8rem;
    text-align: center;
  }

  p {
    font-size: 0.9rem;
    text-align: center;
  }

  .search-wrapper {
    width: 90%;
    margin: 0 auto;
  }

  .suggestion-item,
  .search-input,
  .show-all-button {
    height: 42px;
    font-size: 0.95rem;
    padding: 10px 16px;
  }

  .copy-icon {
    width: 18px;
    height: 18px;
  }

  .clear-button {
    font-size: 20px;
    right: 20px;
  }

  .show-all-button {
    border-radius: 4px 4px 20px 20px;
  }
}



/* Light Theme (default) */
body {
  --bg-color: #ffffff;
  --text-color: #000000;
  --box-bg: #ffffff;
  --box-border: #e0e0e0;
  --text-muted: #000000; /* 👈 Add this line */
}

/* Dark Theme */
body.dark {
  --bg-color: #2D2D2D;
  --text-color: #ffffff;
  --box-bg: #3A3A3A;
  --box-border: #444;
  --text-muted: #CCCCCC; /* 👈 Add this line */
}


body, .suggestion-item, .search-input, .show-all-button, .top-menu a, .footer-menu a {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Apply background on fancy tiles too */
.suggestion-item {
  background: var(--box-bg);
  border: 1px solid var(--box-border);
}

.search-input, .show-all-button {
  background-color: var(--box-bg);
  border: 1px solid var(--box-border);
}

/* Optional: Hover and active styles for dark mode */
body.dark .suggestion-item:hover,
body.dark .show-all-button:hover {
  background-color: #333;
}






/* Theme Toggle Circle Animation */
.mode-tog {
  position: absolute;        /* Add this */
  top: 35px;              /* Position from top */
  left: 30px;             /* Position from left */
  width: 30px;
  height: 30px;
  background-color: black;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}


.mode-tog.active {
  background-color: white;
}

.mode-icon {
  font-size: 18px;
  color: white;
  transition: color 0.3s ease;
}

.mode-tog.active .mode-icon {
  color: black;
}



.sun-icon,
.moon-icon {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: opacity 0.3s ease;
}

.sun-icon {
  opacity: 1;
}

.moon-icon {
  opacity: 0;
}

.mode-tog.active .sun-icon {
  opacity: 0;
}

.mode-tog.active .moon-icon {
  opacity: 1;
}


/* Prevent text selection and remove blue focus outline */
#themeToggle,
#modeIcon {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;

  outline: none;
}











#backToTop {
  position: fixed;
  bottom: 50px;
  right: 10px;
  width: 40px;
  height: 40px;
  font-size: 20px;
  background-color: #FF9800;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTop:hover {
  background-color: #000;
}


.footer-menu a {
  text-decoration: none;
}

.footer-menu a:hover {
  text-decoration: none; /* Optional: ensures no underline on hover too */
}





.search-input::placeholder {
  color: #9E9E9E;
  opacity: 1;
}

body.dark .search-input::placeholder {
  color: #a5a3a3;
}

