@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: #fff8ec;
  -webkit-tap-highlight-color: transparent;
}

.background {
  position: fixed;
  inset: 0;
  /* kleines, schnell ladendes Bild als Standard (Handys) */
  background-image: url('assets/background-mobile.jpg');
  background-size: cover;
  background-position: center top;
  z-index: 0;
  /* Eigene Compositing-Ebene erzwingen: sonst rendert iOS Safari den
     fixierten Hintergrund nach Aufbau der Blur-Ebene der Karte
     (backdrop-filter) in reduzierter Aufloesung nach -> wirkt nach
     kurzer Zeit ploetzlich "weich". */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

/* ab Tablet/Desktop-Breite die groessere, schaerfere Version laden */
@media (min-width: 700px) {
  .background {
    background-image: url('assets/background.jpg');
  }
}

.overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(15, 20, 45, 0.22) 0%,
    rgba(30, 25, 50, 0.14) 40%,
    rgba(10, 12, 30, 0.32) 100%);
  z-index: 1;
}

#sparkles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Die hoeheren Karten (Frage, Dialekt/Musikstil) etwas tiefer setzen,
   damit der Schriftzug oben nicht angeschnitten wird. Die anderen
   Screens bleiben normal vertikal zentriert. */
#screen-frage {
  margin-top: 6vh;
}
#screen-dialekt-musik {
  margin-top: 10vh;
}

.screen {
  display: none;
  width: 100%;
  max-width: 480px;
}

.screen.active {
  display: flex;
  justify-content: center;
  animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  width: 100%;
  /* Kein Live-Blur mehr: Ein backdrop-filter auf einem grossflaechigen,
     fixierten Hintergrund ist auf vielen Handy-GPUs so teuer, dass
     Browser nach kurzer Zeit auf eine niedriger aufgeloeste Version des
     Hintergrunds umschalten (sichtbar als ploetzliches "Weichwerden").
     Stattdessen eine schlicht dunkle, halbtransparente Flaeche -> optisch
     naeher am Look, aber ohne Nebenwirkungen in jedem Browser.
  */
  background: rgba(18, 16, 30, 0.72);
  border: 1px solid rgba(255, 210, 150, 0.25);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
  background: linear-gradient(90deg, #ffd9a0, #ff9a5a, #ff7a7a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 20px;
  color: #ffe9c7;
}

.sub {
  font-weight: 300;
  opacity: 0.85;
  margin: 0 0 28px;
  font-size: 1rem;
}

.field-label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.75;
  margin: 0 0 8px 2px;
}

input[type="text"], textarea {
  width: 100%;
  border: 1px solid rgba(255, 210, 150, 0.35);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  font-size: 1.05rem;
  font-family: inherit;
  color: #fff8ec;
  margin-bottom: 20px;
  resize: none;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

input[type="text"]::placeholder, textarea::placeholder {
  color: rgba(255, 248, 236, 0.5);
}

input[type="text"]:focus, textarea:focus {
  border-color: #ffb877;
  background: rgba(255, 255, 255, 0.14);
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  color: #241606;
  background: linear-gradient(90deg, #ffd9a0, #ff9a5a);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 24px rgba(255, 154, 90, 0.35);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary + .btn-primary {
  margin-top: 12px;
}

.card-thanks {
  animation: pop 0.5s ease;
}

@keyframes pop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}

.check {
  font-size: 3rem;
  margin-bottom: 8px;
  color: #ffd9a0;
  animation: spin-in 0.7s ease;
  display: inline-block;
}

@keyframes spin-in {
  from { transform: rotate(-90deg) scale(0.3); opacity: 0; }
  to   { transform: rotate(0deg) scale(1); opacity: 1; }
}

@media (max-width: 420px) {
  h1 { font-size: 1.6rem; }
  .card { padding: 32px 22px; }
}
