/*
  Layout: mobile-first (Zusatzprompt §15). Auf schmalen Bildschirmen (echtes
  Smartphone) füllt die App den gesamten Viewport. Auf breiteren Bildschirmen
  (Desktop-Browser des Auftraggebers) wird zusätzlich ein Telefonrahmen
  angezeigt, damit die mobile Darstellung trotzdem realistisch erkennbar ist.
*/

html, body {
  height: 100%;
  background: var(--color-bg);
}

.page {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-5) var(--space-3);
}

.phone-frame {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface-alt);
  border-radius: 40px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.demo-footer {
  width: 100%;
  max-width: 400px;
  margin: var(--space-3) auto 0;
  padding: 0 var(--space-2);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: var(--color-text-secondary);
}
.demo-footer a {
  color: inherit;
  text-decoration: underline;
}
/* Im eingebetteten iframe (App-Detailseiten, ?embed=1) ist kein Platz fuer
   einen eigenen Footer - dort verlinken bereits die umgebende Seite's
   eigener Footer sowie das "Demnaechst verfuegbar"-Badge auf Datenschutz/
   Impressum. */
body.is-embed .demo-footer {
  display: none;
}

.phone-frame__notch {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-frame__notch::before {
  content: "";
  width: 90px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.25);
}

.app-shell {
  position: relative;
  height: 780px;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.app-shell__screen {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-shell__content {
  padding: var(--space-4);
  padding-bottom: calc(96px + var(--space-4));
}

@media (max-width: 480px) {
  .page {
    padding: 0;
  }

  .phone-frame {
    max-width: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  .phone-frame__notch {
    display: none;
  }

  .app-shell {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-text);
  color: #fff;
  font-size: 12px;
}

/* Eingebettete Ansicht (?embed=1, siehe js/app.js "Bootstrap"): die
   Entwickler-Werkzeugleiste (Sprache/Design/Zurücksetzen) ist für
   Website-Besucher nicht gedacht. */
body.is-embed .toolbar {
  display: none;
}

/* Nutzer-Feedback: der "Demo-Modus"-Banner oben im (kleinen) Phone-Mockup
   wirkte gedrängt. Der Hinweis, dass nichts dauerhaft gespeichert wird,
   steht stattdessen jetzt gut lesbar auf der Marketing-Seite direkt neben
   dem Mockup (siehe demo.disclaimer in den locales/*.json + _template.html)
   – die Demo bleibt damit weiterhin klar als solche erkennbar (§37).
   Auf der eigenständigen Vorschau-Seite (ohne ?embed=1) bleibt der Banner
   sichtbar. */
body.is-embed .preview-banner {
  display: none;
}

.toolbar select,
.toolbar button {
  font-family: inherit;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
}

.list-container {
  display: flex;
  flex-direction: column;
}

/* ---------- Splash (Referenz-Screen, Panel 1) ---------- */
.splash {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-surface);
  overflow: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.splash__blob--a {
  width: 260px;
  height: 260px;
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(232, 106, 44, 0.22), rgba(232, 106, 44, 0) 70%);
}

.splash__blob--b {
  width: 220px;
  height: 220px;
  bottom: -70px;
  right: -60px;
  background: radial-gradient(circle, rgba(46, 158, 79, 0.14), rgba(46, 158, 79, 0) 70%);
}

.splash__logo {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
}

.splash__wordmark {
  position: relative;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: var(--space-2) 0 0;
  color: var(--color-text);
}

.splash__tagline {
  position: relative;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0;
  text-align: center;
  padding: 0 var(--space-6);
}

.splash__dots {
  position: relative;
  display: flex;
  gap: 6px;
  margin-top: var(--space-5);
}

.splash__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-border);
  animation: splash-dot 1.1s infinite ease-in-out;
}

.splash__dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.splash__dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes splash-dot {
  0%, 80%, 100% {
    background: var(--color-border);
    transform: scale(1);
  }
  40% {
    background: var(--color-primary);
    transform: scale(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash__dots span {
    animation: none;
  }
}
