body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  /*dynamik viewport hight*/
  padding-top: 85px;
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  position: relative;
  overflow-x: hidden;
  background-image: url(hintergrund-tag_mc.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 100dvw;
  background-attachment: fixed;
  background-size: cover;
  background-color: #ffffff;
  transition: background-color 0.5s ease;
  max-width: 100dvw;
}

body.night-mode {
  background-color: #181818;
  background-image: url(hintergrund-nacht_mc.png);
}

/*Header Anfang*/

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 85px;
  box-sizing: border-box;
  z-index: 100;
  color: #222;
  backdrop-filter: blur(4px);
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.233);
  transition: color 0.5s ease, box-shadow 0.5s ease;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #36df6000, #4eac6600);
  z-index: -2;
}

header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: linear-gradient(90deg, #6c706d9d, #49855900);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: opacity;
}

body.night-mode header::after {
  opacity: 1;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-left: 20dvw;
  transition: padding-left 0.4s ease;
}

@media (max-width: 1400px) {
  .header-left {
    padding-left: calc((100vw - 500px) / (1000 - 500) * 10dvw);
  }
}

@media (max-width: 1400px) {
  .header-left {
    padding-left: 0;
  }
}

.header-left a {
  text-decoration: none;
}

header img {
  width: 65px;
  height: auto;
  object-fit: contain;
  background: transparent;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

header img:hover {
  transform: scale(1.15);
}

header h1 {
  margin: 0;
  font-size: 24px;
  user-select: none;
  white-space: nowrap;
  color: #ffffff;
  transition: color 0.7s ease-in;
}

body.night-mode header h1 {
  color: #e5e5e5;
  text-shadow: 0 0 4px #000, 0 0 6px #fff;
}

nav.desktop-nav {
  display: flex;
  gap: 30px;
  font-size: 18px;
  justify-items: center;
  margin-left: -130px;
  position: relative;
  padding: 8px 16px;
  border-radius: 25px;
  z-index: 0;
}

nav.desktop-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(155, 155, 155, 0.164);
  border-radius: 100px;
  z-index: -1;
  transition: background 0.5s ease;
  backdrop-filter: blur(8px);
}

body.night-mode nav.desktop-nav::before {
  background: rgba(48, 48, 48, 0.311);
  text-shadow: 0 0 0px #000, 0 0 0px #fff;
}

nav.desktop-nav a {
  color: #f1f1f1;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: color 0.3s ease;
  white-space: nowrap;
  position: relative;
  padding: 4px 0;
  text-shadow: 0 0 7px #1c1c1c, 0 0 11px #1c1c1c;
}

body.night-mode nav.desktop-nav a {
  text-shadow: 0 0 4px #000, 0 0 6px #fff;
}

nav.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-color: #48c048;
  border-radius: 1px;
  transition: width 0.3s ease-in-out;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 10px;
  padding-right: 20dvw;
  transition: padding-right 0.4s ease;
}

@media (max-width: 1400px) {
  .header-right {
    padding-right: calc((100vw - 500px) / (1000 - 500) * 10dvw);
  }
}

@media (max-width: 1400px) {
  .header-right {
    padding-right: 0;
  }
}

#toggle-theme {
  cursor: pointer;
  background: none;
  border: none;
  color: #ffd700;
  transition: color 0.3s ease;
  transition: transform 0.2s ease;
}

#toggle-theme svg {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
}

#toggle-theme:hover {
  transform: scale(1.20);
}

body.night-mode #toggle-theme {
  color: #ffd700;
}

#toggle-theme:active svg {
  transform: scale(0.9) rotate(20deg);
}

nav.desktop-nav a:hover {
  color: white;
}

nav.desktop-nav a:hover::after {
  width: 100%;
}

body.night-mode nav.desktop-nav a {
  color: #fff;
}

body.night-mode nav.desktop-nav a:hover {
  color: #000;
  text-shadow: 0 0 4px #2f2f2f;
}


.mobile-dropdown {
  position: fixed;
  top: 120px;
  left: 40px;
  right: 40px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  background: linear-gradient(30deg, rgba(62, 74, 83, 0.76), rgba(0, 0, 0, 0));
  color: #222;
  backdrop-filter: blur(3px);
  border-radius: 20px;
  text-align: center;
  transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
  z-index: 100;
}

body.night-mode .mobile-dropdown {
  background: linear-gradient(-20deg, #00000000, #34b35659);
}

.mobile-dropdown.open {
  max-height: 300px;
  opacity: 1;
  padding-top: 10px;
  padding-bottom: 10px;
  transition: 0.3s ease-out;
}

.mobile-dropdown nav {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-dropdown nav a {
  display: block;
  width: 300px;
  margin: 5px 30px;
  padding: 10px;
  text-decoration: none;
  font-weight: 600;
  color: white;
  background: #3442ffa1;
  border-radius: 25px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.mobile-dropdown nav a:hover {
  background-color: #00ff228a;
  color: rgb(24, 25, 26);
  outline: none;
  text-shadow: 0 0 6px #fff;
}

#mobile-menu-button {
  cursor: pointer;
  font-size: 24px;
  background: none;
  border: none;
  display: none;
  color: inherit;
  transition: color 0.3s ease;
  padding: 0;
  transition: transform 0.2s ease;
}

#mobile-menu-button:hover {
  transform: scale(1.25);
}

main {
  margin-top: 150px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding-bottom: 40px;
  width: 100%;
}

.image-container {
  width: 1000px;
  height: 650px;
  border: 2px solid #37f166;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.664);
  margin-top: 20px;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

body.night-mode .image-container {
  background-color: rgba(40, 40, 40, 0.85);
  border-color: #19558a;
}

.image-container img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 15px;
  object-fit: contain;
}

/* Responsive Styles: ab 850px (mobile Ansicht) */
@media (max-width: 865px) {
  header {
    height: 85px;
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .header-left {
    justify-content: center;
    gap: 10px;
  }

  header img {
    max-width: 40px;
    max-height: 40px;
  }

  header h1 {
    font-size: 20px;
    margin-right: 10px;
  }

  /* Desktop-Navigation ausblenden */
  nav.desktop-nav {
    display: none;
  }

  /* Hamburger-Button einblenden */
  #mobile-menu-button {
    display: block;
  }

  /* Hauptinhalt etwas weiter nach unten schieben */
  main {
    margin-top: 120px;
  }
}

#toggle-theme {
  cursor: pointer;
  background: none;
  border: none;
  color: #ffd700;
  transition: color 0.3s ease;
  transition: transform 0.2s ease;
}

#toggle-theme svg {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
}

#toggle-theme:hover {
  transform: scale(1.20);
}

body.night-mode #toggle-theme {
  color: #ffd700;
}

#toggle-theme:active svg {
  transform: scale(0.9) rotate(20deg);
}

footer {
  width: 100%;
  background-color: #222;
  color: #fff;
  padding: 15px 0;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  margin-top: 65px;
  bottom: 0px;
  position: fixed;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  text-decoration: underline;
  color: #bbb;
}