/* RESET & SYSTEM FIXES */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  background-color: #000000; /* optional, zur Kontrolle */
}

/* GRID-SETUP mit Fallback für ältere Browser */
main {
  display: grid;
  grid-auto-rows: auto; /* Fallback */
  overflow-x: hidden;
}

/* MODULE-STYLING */
.module {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.module-1 {
  background-color: #ff0000;
  color: #ffffff;
  background-image: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0) 30%,
    rgba(0,0,0,0.3) 100%
  );
  background-size: cover;
  background-repeat: no-repeat;
  /* kein background-blend-mode! */
}

.module-2 {
  background-color: #93b0c9;
}

/* CONTENT-INNERES */
.content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.contentfaq {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
  text-align: center;
  padding: 2rem 2rem
}

/* TYPOGRAFIE */
h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  color: #ffffff;
  margin-bottom: 3rem;
}

h2 {
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: #000000;
  margin-bottom: 2rem;
}

/* COUNTDOWN-ANZEIGE */
#countdown {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 100%;
}

#countdown div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px; /* Verhindert zu starkes Schrumpfen */
}

#countdown span {
  font-size: clamp(3rem, 5vw, 2.5rem);
  font-weight: bold;
  line-height: 1.1;
  color: #ffffff;
}

#countdown small {
  font-size: 0.8rem;
  color: #ffff00;
}

/* Slogan-Animation */
.slogan {
  font-size: clamp(1.8rem, 2.1vw, 1.8rem);
  color: #ffff00;
  margin-bottom: 2rem;
  animation: fadeLoop 2s ease-in-out infinite;
  opacity: 0;
}

@keyframes fadeLoop {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.description {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 2rem;
}

.descriptiondark {
  font-size: 1rem;
  color: #000000;
  margin-bottom: 2rem;
}

/* Countdown Hintergrund mit Symbol */
.countdown-bg {
  position: relative;
  overflow: hidden;
}

.countdown-bg::before {
  content: "🎁";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60vw;
  color: #3399ff;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
  filter: hue-rotate(190deg) saturate(300%) brightness(90%);
  opacity: 0.1;
}

/* Buttons */
.customize-btn {
  padding: 0.5em 1.2em;
  border-radius: 1em;
  border: none;
  background-color: #0071e3;
  color: #ffffff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 3rem;
  margin-bottom: 2rem;
  text-decoration: none
}

.customize-btn:hover {
  background-color: #2288dd;
}

.customize-btn2 {
  padding: 0.5em 1.2em;
  border-radius: 1em;
  border: none;
  background-color: #ffff00;
  color: #000000;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none
}

.customize-btn2:hover {
  background-color: #2288dd;
}



/* Formulare */
.form-row {
  margin-bottom: 0.5rem;
}

.color-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.color-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.color-box label {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  text-align: center;
}

.color-box input[type="color"] {
  width: 3em;
  height: 2em;
  border: none;
  cursor: pointer;
}

input[type="text"],
input[type="number"],
input[type="email"],
textarea,
select {
  font-size: 0.9rem;
}

.form-caption {
  display: inline-block;
  font-size: 1rem;
}

.spacer {
  height: 1rem;
}

.spacer2 {
  height: 2rem;
}

.spacerdesktop {
  height: 0rem;
}

label[for="greeting"] {
  margin-bottom: 0.3rem;
}

/* Popup */
.congrats-popup {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}

.congrats-popup-content {
  background: #fff;
  color: #000000;
  padding: 2rem 2.5rem;
  border-radius: 1.8rem;
  text-align: center;
  position: relative;
}

/* Alternative Systemschrift als Fallback */
body {
  font-family: Arial, Helvetica, "Segoe UI", "Liberation Sans", "Nimbus Sans", sans-serif;
}

/* Modul 3 – Email-Sharing */
.module-3 {
  background-color: #000000;
  color: #ffffff;
  padding: 3rem 0;
  border-top: 2px solid #e3e8f0;
  border-bottom: 2px solid #e3e8f0;
}

.module-3 h2 {
  color: #ffffff;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  margin-bottom: 1.2rem;
}

.module-3 p {
  color: #ffffff;
  font-size: 1.07rem;
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

/* Formular für Email versenden */
form[action="sendmail.php"] {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 350px;
  margin: 0 auto;
}

.module-4 {
  background: #fff;
  color: #111;
  padding: 2rem 0;
}

.module-4 h2 {
  color: #111;
  margin-bottom: 2rem;
  font-size: 2rem;
  text-align: center;
}

.module-4 ol {
  margin: 0 auto;
  padding-left: 1.3em;
  max-width: 700px;
  text-align: left;
}

.module-4 li {
  margin-bottom: 1.5rem;
  font-size: 1.08rem;
  line-height: 1.6;
}

form[action="sendmail.php"] label {
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

form[action="sendmail.php"] input[type="email"],
form[action="sendmail.php"] textarea {
  font-size: 0.9rem;
  padding: 0.4em;
  border: 1px solid #aaaaaa;
  border-radius: 0.3em;
  margin-bottom: 0.2rem;
  width: 100%;
  box-sizing: border-box;
}

form[action="sendmail.php"] button[type="submit"] {
  margin-top: 0.5rem;
  padding: 0.5em 1.2em;
  border-radius: 1em;
  border: none;
  background-color: #0071e3;
  color: #ffffff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

form[action="sendmail.php"] button[type="submit"]:hover {
  background-color: #1769b2;
}

/* --- Celebrity Birthdays Table Styling (smaller font) --- */
.module-birthdays {
  background: #562e75 !important;
  min-height: 360px; 
  padding: 2.5rem 0 2rem 0;
  color: #111;
  border-bottom: 2px solid #e3e8f0;
}

.module-birthdays h2 {
  color: #ffffff;
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 1.6rem;
  letter-spacing: 0.01em;
}

.module-birthdays .content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

#output {
  margin-top: 0.5em;
  min-height: 120px;
}

.module-birthdays table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  margin-top: 0.5rem;
  border-radius: 1em;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.module-birthdays th,
.module-birthdays td {
  padding: 0.4em 0.8em;
  border-bottom: 1px solid #e3e8f0;
  text-align: left;
  font-size: 0.96rem;
}

.module-birthdays th {
  background: #f0f4fa;
  color: #000000;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.96rem;
}

.module-birthdays tr:last-child td {
  border-bottom: none;
}

.module-birthdays td:first-child {
  font-weight: 500;
  color: #333;
  font-size: 0.98rem;
}

.module-birthdays td:last-child {
  color: #444;
  font-size: 0.94rem;
}

.module-birthdays .notfound {
  color: #888;
  font-style: italic;
  text-align: center;
  font-size: 1.03rem;
  margin-top: 1.4rem;
}

.loading-message {
  color: #ffffff;
  font-size: 1rem;
  animation: pulse 1.4s infinite;
}

#world-events-today {
  background: #0b3f44 !important;
}
#world-events-today h2 {
  color: #ffffff !important;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.0; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

#email-form-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto; /* zentriert horizontal im übergeordneten Container */
}

footer {
  background-color: #000000; /* schwarzer Hintergrund */
  color: #ffffff;            /* weiße Schrift */
  font-size: 0.8em;           /* Schriftgröße 1rem */
  padding: 1rem;             /* etwas Innenabstand */
  text-align: center;        /* Text zentriert */
}

/* Responsive Anpassungen */
@media screen and (orientation: landscape) {
  h1 {
    margin-bottom: 0.5rem;
  }

  h2 {
    margin-bottom: 0.5rem;
  }

  #countdown {
    margin-bottom: 0.5rem;
  }

  .slogan {
    margin-bottom: 0.5rem;
  }

  .customize-btn {
    margin-top: 1rem;
  }
}

@media screen and (min-width: 1024px) {
  h1 {
    margin-bottom: 3rem;
  }

  h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 2rem;
  }

  #countdown {
    margin-bottom: 3rem;
  }

  .slogan {
    margin-bottom: 3rem;
  }

  .customize-btn {
    margin-top: 1rem;
  }
  .spacerdesktop {
    height: 12rem;
  }
}
