/* =======================
   GLOBAL FIX
======================= */
* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #1f2937;
  padding-bottom: 50px;
}

/* =======================
   LOGIN
======================= */
.login-body {
  background: #0f172a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-box {
  background: white;
  padding: 28px;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 16px;
}

.error {
  color: #dc2626;
  margin-top: 10px;
}

/* =======================
   HEADER
======================= */
header {
  background: #111827;
  color: white;
  padding: 16px;

  display: flex;
  flex-direction: column;

  align-items: center;   /* horizontal zentriert */
  justify-content: flex-start; /* bleibt oben */
}

/* =======================
   CONTAINER
======================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* =======================
   INPUTS
======================= */
.input {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
}

/* =======================
   BUTTONS
======================= */
button {
  background: #111827;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

button:hover {
  background: #1f2937;
}

.lightbox.show {
  display: flex;
}

.container-img {
  position: relative;

  width: 100%;
  max-width: 600px;

  min-height: 400px;

  background-image: url("img/TM0_9613.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;

  padding: 20px;
  border-radius: 16px;
  overflow: hidden;
}

/* optional: dunkle/helle Überlagerung für bessere Lesbarkeit */
.container-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4); /* helles Overlay */
  /* alternativ dunkel:
  background: rgba(0, 0, 0, 0.3);
  */
}

.right {
  position: relative; /* damit es über dem Overlay liegt */
  color: black;
  max-width: 250px;
  text-align: left;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

  background: #111827;
  color: white;
  text-align: center;

  padding: 10px;
  z-index: 1000;
}

.footer a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.footer a:hover {
  text-decoration: underline;
}

/* =======================
   MASONRY GRID (FIXED)
======================= */
.messages-grid {
  column-count: 1;
  column-gap: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (min-width: 600px) {
  .messages-grid { column-count: 2; }
}

@media (min-width: 900px) {
  .messages-grid { column-count: 3; }
}

@media (min-width: 1200px) {
  .messages-grid { column-count: 3; }
}

/* =======================
   CARD (FIXED WIDTH ISSUE)
======================= */
.card {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 16px;

  background: white;
  border-radius: 14px;
  padding: 12px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.08);

  break-inside: avoid;
  overflow: hidden;
}

/* Hover Effekt */
.card:hover {
  transform: translateY(-2px);
  transition: 0.2s ease;
}

/* =======================
   MEDIA
======================= */
img, video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin-top: 8px;
}

audio {
  width: 100%;
  margin-top: 8px;
}

/* =======================
   CHECKBOX ROW
======================= */
.public-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #374151;
}

/* =======================
   TYPO HELPERS
======================= */
h2 {
  margin-top: 20px;
}

/* =======================
   LIGHTBOX
======================= */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: 0.2s ease;
}

