/* Drei kinderfreundliche Designs für das Kindertelefon.
   Umschalten unter ⚙️ → Design. Gemeinsam für alle: grün = anrufen, 💤 = gerade keine Zeit. */

body[class*="theme-"] {
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", system-ui, sans-serif;
}

/* ---------- Gemeinsame Bausteine ---------- */
#home .deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
#home .deco i { position: absolute; display: block; }
#home .contacts { position: relative; z-index: 1; }

.contact { position: relative; }
.contact .badge {
  position: absolute; top: 0; right: 1vmin;
  width: 11vmin; height: 11vmin; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 6vmin;
  background: #fff; box-shadow: 0 1vmin 2vmin rgba(0, 0, 0, .15);
  transition: transform .3s;
}
.contact:not(.available) .badge { animation: snooze 3s ease-in-out infinite; }
.contact.available .badge { background: #3ecf6b; animation: ringing 1.2s ease-in-out infinite; }
@keyframes snooze { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-1.2vmin) rotate(6deg); } }
@keyframes ringing {
  0%, 60%, 100% { transform: rotate(0) scale(1); }
  10%, 30%, 50% { transform: rotate(-14deg) scale(1.1); }
  20%, 40% { transform: rotate(14deg) scale(1.1); }
}
.contact.available { animation: hop 1.6s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6vmin); } }

/* =====================================================================
   1) SONNENWIESE – Himmel, Sonne, Wolken, grüne Hügel
   ===================================================================== */
body.theme-wiese #home {
  background:
    radial-gradient(ellipse 80% 40% at 20% 108%, #7ccf5b 60%, transparent 61%),
    radial-gradient(ellipse 90% 45% at 85% 112%, #63bb46 60%, transparent 61%),
    linear-gradient(#7fd3ff, #c9eeff 70%);
}
body.theme-wiese #home .deco i:nth-child(1) { /* Sonne */
  top: -8vmin; left: -8vmin; width: 34vmin; height: 34vmin; border-radius: 50%;
  background: radial-gradient(circle, #ffe66b 45%, #ffd23f 46% 55%, transparent 56%),
    repeating-conic-gradient(from 0deg, #ffd23f 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 70%, transparent 71%);
  mask: radial-gradient(circle, #000 70%, transparent 71%);
  animation: spin-slow 40s linear infinite;
}
body.theme-wiese #home .deco i:nth-child(2),
body.theme-wiese #home .deco i:nth-child(3),
body.theme-wiese #home .deco i:nth-child(4) { /* Wolken */
  width: 22vmin; height: 7vmin; border-radius: 7vmin; background: #fff; opacity: .95;
  box-shadow: 6vmin -3.5vmin 0 1vmin #fff, 12vmin -1vmin 0 0 #fff;
  animation: drift 60s linear infinite;
}
body.theme-wiese #home .deco i:nth-child(2) { top: 10vh; left: 30vw; }
body.theme-wiese #home .deco i:nth-child(3) { top: 22vh; left: 70vw; animation-duration: 80s; transform: scale(.7); }
body.theme-wiese #home .deco i:nth-child(4) { top: 6vh; left: 85vw; animation-duration: 70s; transform: scale(.5); }
body.theme-wiese #home .deco i:nth-child(n+5) { /* Blumen */
  bottom: 3vh; width: 4vmin; height: 4vmin; border-radius: 50%; background: #ffd23f;
  box-shadow: 0 -3vmin 0 -.4vmin #ff7aa8, 0 3vmin 0 -.4vmin #ff7aa8, 3vmin 0 0 -.4vmin #ff7aa8, -3vmin 0 0 -.4vmin #ff7aa8;
}
body.theme-wiese #home .deco i:nth-child(5) { left: 8vw; bottom: 8vh; }
body.theme-wiese #home .deco i:nth-child(6) { left: 30vw; bottom: 4vh; transform: scale(.8); }
body.theme-wiese #home .deco i:nth-child(7) { left: 62vw; bottom: 6vh; }
body.theme-wiese #home .deco i:nth-child(8) { left: 90vw; bottom: 10vh; transform: scale(.7); }
body.theme-wiese .contact .photo { border: 2.4vmin solid #fff; box-shadow: 0 2vmin 0 rgba(0, 0, 0, .12); background-color: #fff3d6; }
body.theme-wiese .contact .name { color: #1d4f7a; font-size: 6vmin; text-shadow: 0 0 1vmin #fff, 0 0 2vmin #fff; }
body.theme-wiese .contact:not(.available) .photo { filter: grayscale(.9) opacity(.75); }
body.theme-wiese .contact.available .photo { border-color: #3ecf6b; filter: none; }
body.theme-wiese .contact.available .name { color: #1f8f45; }
body.theme-wiese .calling { background: linear-gradient(#7fd3ff, #c9eeff); color: #24527a; }
body.theme-wiese #start { background: linear-gradient(#7fd3ff, #c9eeff 70%, #7ccf5b 71%); }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes drift { from { translate: 0 0; } to { translate: -120vw 0; } }

/* =====================================================================
   2) WELTRAUM – Nachthimmel mit Sternen, Fotos als Planeten
   ===================================================================== */
body.theme-weltall #home {
  background:
    radial-gradient(1.5px 1.5px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 30% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 15%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 80% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 85%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 90%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 70% 60%, #fff 50%, transparent 51%),
    radial-gradient(ellipse at 70% 120%, #4b2a8a 0%, transparent 60%),
    linear-gradient(#0c1445, #1c1060);
}
body.theme-weltall #home .deco i { /* funkelnde Sterne */
  width: 3vmin; height: 3vmin; background: #ffe66b;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: twinkle 2.4s ease-in-out infinite;
}
body.theme-weltall #home .deco i:nth-child(1) { top: 8vh; left: 12vw; }
body.theme-weltall #home .deco i:nth-child(2) { top: 18vh; left: 82vw; animation-delay: .6s; transform: scale(1.4); }
body.theme-weltall #home .deco i:nth-child(3) { top: 75vh; left: 8vw; animation-delay: 1.2s; }
body.theme-weltall #home .deco i:nth-child(4) { top: 85vh; left: 75vw; animation-delay: .3s; transform: scale(.8); }
body.theme-weltall #home .deco i:nth-child(5) { top: 45vh; left: 4vw; animation-delay: 1.8s; transform: scale(.6); }
body.theme-weltall #home .deco i:nth-child(6) { /* Mond */
  top: 5vh; right: 6vw; left: auto; width: 14vmin; height: 14vmin; clip-path: none; border-radius: 50%;
  background: transparent; box-shadow: -3vmin 1.5vmin 0 0 #ffe9a8; animation: none;
}
body.theme-weltall #home .deco i:nth-child(7) { /* Rakete */
  top: 80vh; left: -10vw; width: auto; height: auto; clip-path: none; background: none; font-size: 8vmin;
  animation: fly 18s linear infinite;
}
body.theme-weltall #home .deco i:nth-child(7)::before { content: "🚀"; }
body.theme-weltall .contact .photo {
  border: 1.6vmin solid #6c5ce7; background-color: #2d2a6e;
  box-shadow: 0 0 0 2.4vmin rgba(108, 92, 231, .25), 0 0 6vmin rgba(108, 92, 231, .5);
}
body.theme-weltall .contact:not(.available) .photo { filter: grayscale(1) brightness(.7); }
body.theme-weltall .contact.available .photo {
  border-color: #3ecf6b; filter: none;
  box-shadow: 0 0 0 2.4vmin rgba(62, 207, 107, .3), 0 0 10vmin rgba(62, 207, 107, .8);
  animation: none;
}
body.theme-weltall .contact .name { color: #b9b3ff; font-size: 6vmin; }
body.theme-weltall .contact.available .name { color: #7dffa8; }
body.theme-weltall .contact .badge { background: #2d2a6e; color: #fff; }
body.theme-weltall .contact.available .badge { background: #3ecf6b; }
body.theme-weltall .gear { filter: invert(1); }
body.theme-weltall .calling { background: linear-gradient(#0c1445, #1c1060); }
body.theme-weltall #start { background: linear-gradient(#0c1445, #1c1060); color: #fff; }
body.theme-weltall #start .hint { color: #b9b3ff; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes fly { from { translate: 0 0; rotate: 45deg; } to { translate: 130vw -90vh; rotate: 45deg; } }

/* =====================================================================
   3) BONBON – Pastellfarben, Seifenblasen, bunte Kärtchen pro Person
   ===================================================================== */
body.theme-bonbon #home { background: linear-gradient(135deg, #ffe3f1, #e9e1ff 50%, #dff6ff); }
body.theme-bonbon #home .deco i { /* Seifenblasen */
  bottom: -20vmin; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9) 0 8%, rgba(255, 255, 255, .25) 9% 60%, rgba(255, 255, 255, .6) 61% 66%, transparent 67%);
  animation: rise 14s linear infinite;
}
body.theme-bonbon #home .deco i:nth-child(1) { left: 5vw; width: 14vmin; height: 14vmin; }
body.theme-bonbon #home .deco i:nth-child(2) { left: 22vw; width: 8vmin; height: 8vmin; animation-delay: -4s; animation-duration: 10s; }
body.theme-bonbon #home .deco i:nth-child(3) { left: 48vw; width: 18vmin; height: 18vmin; animation-delay: -8s; animation-duration: 18s; }
body.theme-bonbon #home .deco i:nth-child(4) { left: 70vw; width: 10vmin; height: 10vmin; animation-delay: -2s; }
body.theme-bonbon #home .deco i:nth-child(5) { left: 88vw; width: 13vmin; height: 13vmin; animation-delay: -11s; animation-duration: 16s; }
body.theme-bonbon #home .deco i:nth-child(6) { left: 36vw; width: 6vmin; height: 6vmin; animation-delay: -6s; animation-duration: 9s; }
body.theme-bonbon .contact {
  background: var(--c, #ffb3d1); padding: 3vmin 3vmin 2.5vmin; border-radius: 6vmin;
  box-shadow: 0 2vmin 0 rgba(0, 0, 0, .1);
}
body.theme-bonbon .contact .photo { border-radius: 4vmin; border: 1.4vmin solid #fff; width: 30vmin; height: 30vmin; background-color: #fff; }
body.theme-bonbon .contact .name { color: #fff; font-size: 6vmin; text-shadow: 0 .4vmin 0 rgba(0, 0, 0, .15); }
body.theme-bonbon .contact:not(.available) { filter: grayscale(.85); opacity: .7; }
body.theme-bonbon .contact:not(.available) .photo { filter: none; }
body.theme-bonbon .contact.available { box-shadow: 0 0 0 1.6vmin #3ecf6b, 0 2vmin 0 rgba(0, 0, 0, .1); }
body.theme-bonbon .contact.available .photo { border-color: #fff; filter: none; animation: none; }
body.theme-bonbon .contact.available .name { color: #fff; }
body.theme-bonbon .contact .badge { top: -3vmin; right: -3vmin; }
body.theme-bonbon .calling { background: linear-gradient(135deg, #ffb3d1, #c6b5ff); }
body.theme-bonbon #start { background: linear-gradient(135deg, #ffe3f1, #e9e1ff 50%, #dff6ff); }
@keyframes rise { from { translate: 0 0; } to { translate: 0 -130vh; } }

/* ---------- Auswahl in den Einstellungen ---------- */
.theme-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-pick button { padding: 12px 18px; border-radius: 14px; font-size: 17px; background: #efe5d8; border: 3px solid transparent; }
.theme-pick button.active { border-color: #3ecf6b; background: #e6f9ec; }

/* ---------- Anruf-Bildschirm je Design ---------- */
body[class*="theme-"] .calling { font-size: 5vmin; padding-bottom: 24vmin; }
body[class*="theme-"] .calling .photo { width: 46vmin; height: 46vmin; }
body.theme-wiese .calling .photo { border: 2.4vmin solid #fff; box-shadow: 0 0 0 2vmin #3ecf6b; background-color: #fff3d6; }
body.theme-wiese .calling {
  background:
    radial-gradient(ellipse 80% 30% at 20% 110%, #7ccf5b 60%, transparent 61%),
    radial-gradient(ellipse 90% 35% at 85% 114%, #63bb46 60%, transparent 61%),
    linear-gradient(#7fd3ff, #c9eeff 70%);
  color: #1d4f7a;
}
body.theme-weltall .calling .photo { border: 1.6vmin solid #3ecf6b; background-color: #2d2a6e; box-shadow: 0 0 10vmin rgba(62, 207, 107, .8); }
body.theme-weltall .calling {
  background:
    radial-gradient(2px 2px at 15% 25%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 80% 15%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 70% 80%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 25% 85%, #fff 50%, transparent 51%),
    linear-gradient(#0c1445, #1c1060);
}
body.theme-bonbon .calling .photo { border-radius: 6vmin; border: 2vmin solid #fff; background-color: #fff; box-shadow: 0 2vmin 0 rgba(0, 0, 0, .1); }
body.theme-bonbon .calling { text-shadow: 0 .4vmin 0 rgba(0, 0, 0, .15); }

/* Weltraum: Sternschnuppe */
#home .deco .shoot { display: none; }
body.theme-weltall #home .deco .shoot {
  display: block; position: absolute; top: 12vh; left: 60vw; width: 18vmin; height: .5vmin; border-radius: 1vmin;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
  transform: rotate(-25deg); opacity: 0; animation: shoot 9s ease-in 3s infinite;
}
@keyframes shoot {
  0% { opacity: 0; translate: 0 0; }
  2% { opacity: 1; }
  8% { opacity: 0; translate: -40vw 18vh; }
  100% { opacity: 0; translate: -40vw 18vh; }
}
