body {
  margin: 0;
  height: 100vh;
  background: linear-gradient(270deg, #ff512f, #dd2476, #24c6dc, #514a9d);
  background-size: 800% 800%;
  animation: vividFlow 30s ease infinite;
}

@keyframes vividFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/*Horizontales Scrollen vermeiden (Sicherheitsnetz)*/
html, body { overflow-x: hidden; }

/* ===================== */
/* Sprach-Auswahlleisten */
/* ===================== */

/* Links oben fixiert, mit Abstand zum Home-Button */
.continent-bar {
  position: fixed;
  top: 10px;
  left: 120px;           /* Platz für Home-Button links */
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 1000;
  width: auto;
  box-sizing: border-box;
  padding: 0;
}

/* „Button“ für jeden Kontinent */
.continent {
  position: relative;
}
.continent-trigger {
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
}

/* Panel mit Flaggen (anfangs unsichtbar) */
/* An die linke Kante des Buttons andocken */
.flags {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  transform: translateY(6px);

  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;

  max-width: min(420px, calc(100vw - 24px));
  min-width: 220px;

  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);

  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

/* Anzeigen bei Hover/Fokus */
.continent:hover .flags,
.continent:focus-within .flags {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Einzelne Flaggen-Links */
.flags a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  border-radius: 4px;
  text-decoration: none;
  line-height: 0;
}
.flags a:hover { outline: 1px solid #ddd; }

/* Flaggen selbst – Größe */
.flags .fi {
  width: 32px;
  height: 24px;
}

/* ===================== */
/* Inhalt & Layout       */
/* ===================== */

.center-container {
  display: flex;
  align-items: center;   /* gleiche Höhe */
  justify-content: center; /*  alles mittig ausrichten */
  gap: 90px;             /* Abstand zwischen Bildern und Box */
  flex-wrap: wrap;       /* für kleinere Screens */
}

/* Text Formatierung */
.middle-box {
  text-align: center;   /* Text horizontal zentrieren */
}


/* ================================
   BOXEN-GRUNDSTIL
   ================================ */

/* Grundlayout der mittleren Boxen */
.middle-box {
  position: relative;         /* ermöglicht absolute Positionierung von Elementen (z. B. Figuren) innerhalb der Box */
  width: 200px;               /* feste Breite der Box */
  height: 200px;              /* feste Höhe der Box */
  background: #f0f0f0;        /* helle Hintergrundfarbe */
  border: 2px solid #ccc;     /* dezenter grauer Rahmen */
  display: flex;              /* Flexbox-Layout aktivieren */
  align-items: center;        /* Inhalt vertikal zentrieren */
  justify-content: center;    /* Inhalt horizontal zentrieren */
  margin-top: 70px;           /* Abstand zur nächsten Box oben */
  box-sizing: border-box;     /* padding und border werden in Gesamtgröße einbezogen */
  overflow: hidden;           /* Inhalt, der übersteht, wird abgeschnitten */
}

/* Text in der Box */
.middle-box p {
  margin: 0;                  /* Standardabstand entfernen */
  text-align: center;         /* Text zentrieren */
  font-size: 0.9rem;          /* etwas kleinere Schrift */
  z-index: 1;                 /* sicherstellen, dass der Text vor anderen Elementen (z. B. SVG-Figuren) bleibt */
  transition: color 0.3s ease, text-shadow 0.3s ease; /* sanfte Übergänge für Farbe und Leuchteffekt */
}

/* ================================
   SCRAMBLE-EFFEKT (bei Sprachwechsel)
   ================================ */

/* Standardzustand – keine Änderungen an Farbe, aber Übergänge aktiv (oben definiert) */

/* Aktiv während des digitalen Scramble-Effekts */
.middle-box p.scrambling {
  color: #0f0;                /* neongrüne Farbe – passend zum Matrix-Look */
  text-shadow: 0 0 8px #0f0;  /* sanfter grüner Leuchteffekt */
}

.stickmen {
  position: absolute;
  bottom: 2px;                /* ganz unten */
  left: 50%;
  transform: translateX(-50%); /* zentrieren */
  display: flex;
  gap: 4px;                   /* kleiner Abstand */
  z-index: 0;                 /* hinter dem Text */
}

.stickman {
  width: 18px;   /* kleiner, damit 10 Stück reinpassen */
  height: 18px;
  animation: lift 1.5s infinite ease-in-out;
  transform-origin: center bottom; /* wackeln von unten */
}
/* Animation: Arme hoch/runter */
@keyframes lift {
  0%, 100% { transform: scaleY(1) translateY(0); }
  50%      { transform: scaleY(0.95) translateY(-2px); }
}
/* leichte Zeitverschiebung pro Figur */
.stickman:nth-child(odd) {
  animation-delay: 0.3s;
}
.stickman:nth-child(3n) {
  animation-delay: 0.6s;
}

/* Bilder links & rechts */
.side-image {
  width: 450px;          /* Rechteckig, anpassbar */
  margin-top: 50px;      /* Abstand nach oben */
  height: 200px;
  object-fit: cover;     /* Bild füllt Rechteck sauber */
  border: 2px solid #ccc;
  background: #fff;      /* falls Bild nicht geladen wird */
  max-width: 100%;
  width: min(450px, 100%);
  height: auto;
}

/* Hauptinhalt */
#content {
  flex: 1;
  padding: 20px;
}

/* Home-Button (rechts oben) */
.home-button {
  position: fixed;
  top: 10px;
  right: 10px;   /* statt left */
  padding: 8px 14px;
  background: #2fb24f;
  color: white;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s, transform 0.2s;
  z-index: 1000;
}

.home-button:hover {
  background: #24913d;
  transform: scale(1.05);
}

/* ===================== */
/* Footer: Email Capture */
/* ===================== */

.email-section {
  width: 100%;
  max-width: 900px;
  margin: 40px auto 24px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  box-sizing: border-box;
}

.email-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.15rem;
}

.email-capture {
  display: grid;
  gap: 10px;
}

.email-capture label {
  color: #fff;
  font-size: 0.95rem;
}

.email-capture input[type="email"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}
.email-capture input[type="email"]:focus {
  border-color: #2fb24f;
}

.email-capture .consent {
  color: #eee;
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.3;
}

.email-submit {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  background: #2fb24f;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.email-submit:hover { background: #24913d; transform: scale(1.02); }

.email-status {
  margin: 4px 0 0;
  color: #fff;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ===================== */
/* Responsive Anpassung  */
/* ===================== */

/* Tablet und kleiner */
@media (max-width: 768px) {
  .center-container {
    gap: 24px;
  }
  .side-image {
    width: 100%;
  }
  .middle-box, #top-box {
    width: 100%;
    margin-top: 12px;
  }
}

/* Handy */
@media (max-width: 480px) {
  body {
    align-items: stretch;      /* volle Breite nutzen */
  }

  .center-container {
    flex-direction: column;    /* untereinander statt nebeneinander */
    gap: 12px;
    padding: 0 12px;
  }

  /* Auf Mobil: Leiste nicht fix, damit nichts überlappt */
  .continent-bar {
    position: static;
    margin: 8px 12px 0;
    justify-content: flex-start;  /* linksbündig */
  }

    .email-section {
    margin: 16px 12px;
    padding: 12px;
    border-radius: 8px;
  }

  .email-title {
    font-size: 1rem;
    text-align: center;
  }

  .email-capture { gap: 8px; }
  .email-capture input[type="email"],
  .email-submit {
    font-size: 1rem;
    padding: 12px;
  }
  .email-status { font-size: 0.85rem; text-align: center; }

  /* Flags auf Handy: vollbreit */
  .flags {
    left: 0;
    right: 0;
    transform: translateY(6px);
    width: 100vw;
    max-width: none;
    border-radius: 0;
    box-sizing: border-box;
  }
  .continent:hover .flags,
  .continent:focus-within .flags {
    transform: translateY(0);
  }
}
 /* Fehlermeldung Email Formular */
 
 .email-status {
  font-size: 1rem;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  opacity: 1;
}
 /* Sprachänderung toter bildschirm */
 
