:root {
  --color: rgb(215, 210, 204);
  --bg: #1c1c1c;
  --darker-bg: #111111;
  --dark-grey: rgb(51, 51, 51);
  --grey: #686868;
  --lighter-grey: #9c9c9c;
  --scroll-bar-color: var(--grey);
  --scroll-bar-bg-color: var(--dark-grey);
}

body {
  background-color: var(--bg);
  color: var(--color);
  font-family: "Segoe UI", Consolas, Tahoma, sans-serif;
  width: 320px;
  font-size: 12px;
  margin: 0;
  height: 100%;
  overflow-y: hidden;
}

main {
  max-height: 300px;
  padding: 8px;
  overflow-y: auto;
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-bar-bg-color);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scroll-bar-color);
  border-radius: 20px;
  border: 3px solid var(--scroll-bar-bg-color);
}

.title {
  text-align: center;
  margin: .5em;
}

.title img {
  position: relative;
  top: 5px;
  margin-right: 5px;
  width: 24px;
  height: 24px;
}

.icon {
  margin-right: 0.5em;
  padding-top: -23px;
  top: 2px;
  position: relative;
}

#engines {
  height: fit-content;
  position: relative;
}

.engine .icon {
  width: 16px;
  height: 16px;
  display: block;
  text-align: center;
  margin: auto;
  padding-right: 2px;
  padding-bottom: 5px;
}

.engine {
  display: inline-block;
  margin-left: 0.5rem;
  cursor: pointer;

  vertical-align: top;
  opacity: 0;

  animation: dropIn 1s ease forwards;
  animation-delay: calc(var(--order) * 100ms);
}

@keyframes dropIn {
  from {
    transform: translateY(-2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

ul {
  list-style-type: none;
  padding-inline-start: 0px;
}

body > ul {
  padding-inline-start: 0px;
}

#version {
  font-size: 11px;
}

.menu {
  margin: 5px;
}

.menu_title {
  display: block;
  white-space: nowrap;
  font-weight: bold;
  user-select: none;
  font-size: x-small;
  overflow: hidden;
  display: flex;
  width: 100%;
  margin-bottom: 1em;
  margin-top: 1em;
}

.menu_title > span {
  padding: 0 2em;
  flex: 1 1 100px;
  text-align: center;
}

.menu_title > span > span {
  vertical-align: top;
}

.ad {
  display: block;
  text-align: center;
  margin: 1em 0;
}

hr {
  border-color: rgb(38, 44, 46);
  height: 0.5px;
}

hr.flexchild {
  display: inline-block;
  flex: 1 1 200px;
}

label.setting {
  /* user-select: none; */
  overflow: hidden;
}

label.setting > :last-child {
  vertical-align: top;
}

.setting-title {
  display: inline-block;
  text-align: right;
  width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 10px;
  position: relative;
}

.setting-title .input {
  margin-left: 20px;
}

.checkbox {
  height: 15px;
  width: 15px;
  cursor: pointer;
}

a {
  text-decoration: none;
  color: #4590c5;
}

a:hover {
  text-decoration: underline;
}

select,
input {
  background-color: var(--dark-grey);
  color: var(--color);
  border-radius: 2px;
  padding: 2px 5px;
  cursor: pointer;
}

select:focus,
input:focus {
  outline: none;
}

/*** FOOTER ***/

footer {
  margin: auto;
  width: 100%;
  background-color: var(--bg);
  box-shadow: 0px 1px 20px 0px black;
}

.footlinks-container {
  display: flex;
  justify-content: space-evenly;
}

.footlinks-container a {
  margin: 0 8px;
}

.grid {
  display: grid;
  justify-content: center;
}

/*** UPGRADE BUTTON ***/

#premium {
  width: 100%;
  height: 1.5rem;
  margin: 10px 0;
  padding: 5px 5px;
}

.premium-link {
  display: block;
  text-align: center;
  font-size: 0.9em;
  margin-bottom: 10px;
  color: var(--lighter-grey);
}

.upgrade-button {
  border-radius: 3px;

  cursor: pointer;

  color: #fff;
  background-color: #EB9B05;;

  text-align: center;

  transition: 0.3s;
  opacity: 0.9;
}

.upgrade-button:hover {
  opacity: 1;
}

.upgrade-button > span {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.2em;
  font-size: 1.3em;
  font-weight: bold;
}

.anim-right {
  animation: slideInFromRight 0.5s ease forwards;
  grid-column: 3 /4;
  opacity: 0;
}
.anim-left {
  animation: slideInFromLeft 0.5s ease forwards;
  grid-column: 1 /2;
  opacity: 0;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(+5em);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideInFromLeft {
  from {
    transform: translateX(-5em);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* GPX Follower ad */

#gpxfollower {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align items to the start (left) */
  background-color: var(--darker-bg);
  padding: 0.8em 1em;
  margin-top: 1em;
  text-decoration: none;
}

#gpxfollower > #also-from {
  font-size: 0.9em;
  color: var(--lighter-grey);
  margin-bottom: .5em; /* Spacing below "Also from OptiSearch" */
}

.gpxfollower-app {
  display: flex;
  align-items: center;
}

.gpxfollower-app img {
  width: 72px; /* Adjust as needed */
  height: auto;
  border-radius: 20%;
}

#gpxfollower:hover .text-app span:first-child {
  text-decoration: underline;
}

.text-app span:first-child {
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 0.4em;
}
.text-app {
  display: flex;
  flex-direction: column;
  padding: .5em;
}

.text-app span:last-child {
  color: var(--lighter-grey);
}

.icon-container {
  position: relative;
  display: inline-block; /* Ensure the container wraps around the icon and text */
}

.new-text {
  position: absolute;
  top: 0;
  right: 0;
  font-weight: bold;
  color: var(--color);
  padding: 3px 5px; /* Adjust as needed */
  background-color: red; /* Adjust as needed */
  animation: bounce 0.5s infinite alternate; /* Adjust duration and timing as needed */
}

@keyframes bounce {
  0% {
    transform: translate(20%, 20%) rotate(40deg) scale(0.8); /* Initial scale */
  }
  100% {
    transform: translate(20%, 20%) rotate(40deg) scale(.9); /* Scale at the peak of the bounce */
  }
}
