:root {
  --bg-color: #f4f4f4;
  --text-color: #333;
  --toggle-color-light: #4caf50; /* Light theme toggle color */
  --toggle-color-dark: #0056b3; /* Dark theme toggle color */
  --toggle-color: var(--toggle-color-light); /* Light theme toggle color */
  --toggle-color-toggle: var(--toggle-color-dark); /* Dark theme toggle color */
  /*--toggle-color: #4caf50; /* Light theme toggle color */
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition:
    background-color 0.3s,
    color 0.3s;
  margin: 0;
  padding: 0;
}

header {
  padding: 20px;
  text-align: center;
  position: relative;
}

h1 {
  margin: 0;
}

#languageToggle {
  position: absolute;
  top: 20px;
  right: 70px; /* Adjust as needed */
  display: flex;
  align-items: center;
  gap: 5px;
}

.lang-button {
  background-color: var(--toggle-color);
  border: none;
  color: white;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 5px;
}

.lang-button:hover {
  background-color: var(--btn-hover-color);
}

/* Button hover color based on theme */
body:not(.dark-mode) .lang-button:hover {
  background-color: #45a049;
}

body.dark-mode .lang-button:hover {
  background-color: #003d82;
}

.lang-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

.lang-button[aria-label]:hover::after {
  content: attr(aria-label);
  position: absolute;
  background: #000;
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1;
  top: 40px;
  left: 0;
  opacity: 0.8;
}

#themeToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  background-color: var(--toggle-color-toggle);
  border: none;
  transition: background-color 0.3s;
}

/* ... previous styles ... */

/* Custom tooltip only */

#themeToggle[aria-label]:hover::after {
  content: attr(aria-label);
  position: absolute;
  background: #000;
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1;
  top: 50px;
  right: 10px;
  opacity: 0.8;
}

/* Hide the default tooltip */
/*#themeToggle[aria-label] {
  position: relative;
}*/

/*
#themeToggle[aria-label]:hover::before {
  display: none;
}
*/

/* Dark Mode */
body.dark-mode {
  --bg-color: #333;
  --text-color: #f4f4f4;
  --toggle-color: var(--toggle-color-dark); /* Dark theme toggle color */
  --toggle-color-toggle: var(
    --toggle-color-light
  ); /* Light theme toggle color */
}

body.de {
  /* Styles for German language */
}

body.en {
  /* Styles for English language */
}

main {
  padding: 20px;
  text-align: center;
}

a,
button {
  background-color: var(--toggle-color);
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  transition: background-color 0.3s;
}

a:hover,
button:hover {
  background-color: var(--btn-hover-color);
}

/* Button hover color based on theme */
body:not(.dark-mode) a:hover,
button:hover {
  background-color: #45a049;
}

body.dark-mode a:hover,
button:hover {
  background-color: #003d82;
}

/* For accessibility, add a focus style */
#themeToggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}
