body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: 1rem; max-width: 700px; margin: 0 auto; position: relative; z-index: 10; }
h2 { text-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 8px rgba(255,255,255,0.8); color: #222; font-size: 1.4rem; line-height: 1.3; }
label { font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.2); }

/* Diashow Hintergrund */
.background-slideshow { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.background-slideshow img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.5s ease-in-out; }
.background-slideshow img.active { opacity: 1; }

/* Halbtransparenter Overlay über Hintergrund für bessere Lesbarkeit */
.background-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.1); z-index: 0; pointer-events: none; }
form { display: grid; gap: .5rem; align-items: center; position: relative; z-index: 10; }
label { font-weight: 600; }
input[type="text"] { padding: .5rem; font-size: 1rem; width: 100%; box-sizing: border-box; }
textarea { padding: .5rem; font-size: 1rem; width: 100%; box-sizing: border-box; resize: vertical; font-family: inherit; }
button { padding: .65rem .85rem; font-size: 1rem; cursor: pointer; background: #2ecc71; color: #fff; border: none; border-radius: 4px; font-weight: 500; transition: opacity 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 0 12px rgba(255,255,255,0.4); min-height: 44px; }
button:hover { opacity: 0.9; box-shadow: 0 3px 8px rgba(0,0,0,0.4), 0 0 16px rgba(255,255,255,0.5); }
button[type="button"] { background: #3498db; box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 0 12px rgba(255,255,255,0.4); }
button[type="button"]:hover { opacity: 0.9; box-shadow: 0 3px 8px rgba(0,0,0,0.4), 0 0 16px rgba(255,255,255,0.5); }
#adminControls { display:flex; align-items:center; gap:.5rem; margin-top:.75rem; position: relative; z-index: 10; flex-wrap: wrap; }
#adminControls button, a.button-link { flex: 1; display:inline-block; padding:.65rem .85rem; font-size:1rem; background:#3498db; color:#fff; text-decoration:none; border-radius:4px; box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 0 12px rgba(255,255,255,0.4); min-height: 44px; line-height: 1.4; text-align: center; }
#adminControls button:hover, a.button-link:hover { opacity:.9; box-shadow: 0 3px 8px rgba(0,0,0,0.4), 0 0 16px rgba(255,255,255,0.5); }
#output { margin-top: 1rem; padding: .5rem; background: rgba(240,240,240,0.75); border-radius: 4px; position: relative; z-index: 10; }

.messages-list { display: grid; gap: .5rem; }
.message-item { padding: .5rem; background: rgba(255,255,255,0.85); border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.15); }
.message-header { display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-bottom:.25rem; }
.message-time { font-size: .8rem; color: #666; }
.message-text { font-size: 1rem; color: #111; white-space: pre-wrap; }
.message-delete { background:#e74c3c; color:#fff; border:none; padding:.25rem .5rem; border-radius:4px; cursor:pointer; font-size:.85rem; }
.message-delete:hover { opacity:.9; }

/* Overlay for initial password gate */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.95); z-index: 1000; }
.overlay-inner { background: #fff; padding: 1.25rem; border-radius: 8px; width: 92%; max-width: 420px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
#accessPassword { width: 100%; padding: .5rem; font-size: 1rem; box-sizing: border-box; margin-top: .25rem; }
#accessSubmit { margin-top: .5rem; }

@media (max-width:420px) { .overlay-inner { margin: 0 12px; } }

/* Mobile Optimierungen */
@media (max-width: 600px) {
  body { padding: 0.75rem; }
  h2 { font-size: 1.2rem; }
  #adminControls { flex-direction: column; align-items: stretch; }
  #adminControls button, #adminControls a.button-link { width: 100%; text-align: center; }
  .message-item { font-size: 0.95rem; }
  textarea { font-size: 16px; } /* Verhindert Zoom auf iOS */
  input[type="password"] { font-size: 16px; }
}

/* Wenn Seite gesperrt ist, verstecke alles außer dem Overlay */
body.locked > *:not(#accessOverlay) { display: none !important; }

