.language-selector {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Standard Language Button */
#language-toggle {
  background-color: #d4af37;
  color: white;
  padding: 0.5em 1em;
  border: none;
  border-radius: 1em;
  cursor: pointer;
  font-weight: bold;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

#language-toggle:hover {
  transform: scale(1.05);
}

/* Dropdown */
.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1a1a1a;
  border: 0.2vh solid #c9a735;
  border-radius: 0.5em;
  box-shadow: 0 0.5vh 1vh rgba(0, 0, 0, 0.6);
  z-index: 10;
  padding: 0.5em;
  max-height: 30vh;
  overflow-y: auto;
  width: max-content;
  min-width: 10vw;
}

.language-dropdown button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: white;
  text-align: left;
  padding: 0.4em 0.6em;
  cursor: pointer;
  font-size: 0.9em;
}

.language-dropdown button:hover {
  background-color: #333;
}

.hidden {
  display: none;
}

/* ============================= */
/* Language Selector (Desktop)   */
/* ============================= */
.language-selector {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#language-toggle {
  background-color: #d4af37;
  color: white;
  padding: 0.5em 1em;
  border: none;
  border-radius: 1em;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease;
}

#language-toggle:hover {
  background-color: #c19e2d;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1a1a1a;
  border: 0.2vh solid #c9a735;
  border-radius: 0.5em;
  box-shadow: 0 0.5vh 1vh rgba(0, 0, 0, 0.6);
  z-index: 10;
  padding: 0.5em;
  max-height: 30vh;
  overflow-y: auto;
  width: max-content;
  min-width: 10vw;
}

.language-dropdown button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: white;
  text-align: left;
  padding: 0.4em 0.6em;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s ease;
}

.language-dropdown button:hover {
  background-color: #333;
}

.hidden {
  display: none;
}

/* ============================= */
/* Mobile Anpassungen            */
/* ============================= */
@media (max-width: 768px) {
  .language-selector {
    position: absolute !important;
    top: 1vh;
    right: 2vw;
    z-index: 1001;
  }

  /* Nur Icon-Button auf Mobile */
  #language-toggle {
    font-size: 1.2rem;
    padding: 0.4em;
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    text-indent: -9999px;  /* Text verstecken */
    position: relative;
    background-color: #d4af37;
  }

  #language-toggle::before {
    content: "🌐";          /* Nur Icon */
    position: absolute;
    text-indent: 0;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    color: white;
  }

  .language-dropdown {
    left: auto;
    right: 0;
    min-width: 30vw;
    max-height: 35vh;
    font-size: 0.8em;
  }

  .language-dropdown button {
    font-size: 0.85em;
    padding: 0.4em 0.6em;
  }
}

@media (max-width: 768px) {
  #language-toggle {
    color: transparent !important;   /* Textfarbe unsichtbar */
  }

  #language-toggle * {
    display: none !important;        /* Alle Kind-Elemente ausblenden */
  }
}
