/* Overlay */
#lang-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: 9998;
}

/* Language Menu */
#lang-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--text-color);
  color: var(--background-color);
  border: 3px solid var(--accent-color);
  z-index: 9999;

  padding: 1em 2em;
  border-radius: 8px;

  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5em;

  width: 50vw;
  height: 50vw;
  pointer-events: auto;
  max-width: 700px;
  max-height: 700px;

  box-sizing: border-box;
}

/* Language Options */
#lang-menu p {
  font-size: 2em;
  margin: 0.2em 0;
  text-align: center;
  text-decoration: underline;
  pointer-events: auto;
}

#lang-menu p:hover {
  cursor: pointer;
}

/* Toggle Button */
#lang-toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  position: absolute;
  right: 24px;
  top: 24px;
  z-index: 10000;
}

#lang-toggle img {
  display: block;
  width: 24px;
  height: 24px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  #lang-menu {
    width: 70vw;
    height: auto;
    padding: 1em 1.5em;
  }

  #lang-menu p {
    font-size: 1.5em;
  }
}

@media (max-width: 600px) {
  #lang-menu {
    width: 90vw;
    padding: 0.8em 1em;
  }

  #lang-menu p {
    font-size: 1.2em;
  }

  #lang-toggle {
    right: 16px;
    top: 16px;
  }
}