* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-overlay: rgba(0,0,0,0.45);
  --bg-overlay-strong: rgba(0,0,0,0.65);
  --text: #ffffff;
  --muted: #d1d5db;
  --accent: #5fb3c3; /* cadet-ish */
  --accent-2: #c06f42; /* warm hover */
}

body {
  background-image: url("Bild.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 64px; /* Platz für Footer */
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
}

/* leichte Abdunklung für Lesbarkeit */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  pointer-events: none;
}

.theme-dark::before {
  background: var(--bg-overlay-strong);
}

/* Grundlayout */
.body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 0 16px;
}

h1, h2, h3 {
  font-weight: 700;
}

h1 {
  text-align: center;
  font-size: 28px;
  margin: 16px 0 8px;
}

p {
  font-size: 16px;
  line-height: 1.6;
  margin: 16px 0;
}

/* Navigationsleiste */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,0.6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.topnav a,
.topnav button {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.topnav a:hover, .topnav button:hover {
  color: var(--accent-2);
  background: rgba(255,255,255,0.06);
}

.topnav a.active {
  color: var(--accent);
  background: rgba(255,255,255,0.08);
}

.topnav .spacer {
  flex: 1 1 auto;
}

/* Nav-Gruppierung für mobiles Menü */
.topnav .nav-links {
  display: flex;
  align-items: center;
  width: 100%;
}
.nav-toggle {
  display: none;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
}

/* Karten/Boxen */
.card {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}

.muted { color: var(--muted); }

/* Login-Formular / Modal */
.login-inline {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

input[type="text"], input[type="password"] {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.4);
  color: var(--text);
}

.btn {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  cursor: pointer;
}

.btn.primary {
  border-color: var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal {
  width: min(520px, 92vw);
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.modal-backdrop.show { display: flex; }

/* Scroll-to-top */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 76px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.6);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 20;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* Fußleiste */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0,0,0,0.7);
  color: var(--text);
  text-align: center;
  line-height: 40px;
}

.footer p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.footer span { margin-right: 60px; }

/* Medien & Basistypografie responsiv */
img, video { max-width: 100%; height: auto; }

/* Mobile: Layout und Navigation */
@media (max-width: 720px) {
  body { background-attachment: scroll; }
  h1 { font-size: 24px; }
  p { font-size: 15px; }

  .topnav {
    flex-wrap: wrap;
  }
  .nav-toggle {
    display: inline-block;
  }
  .topnav .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 8px;
  }
  .topnav.open .nav-links { display: flex; }
  .topnav a, .topnav button {
    width: 100%;
    text-align: left;
  }
  .topnav .spacer { display: none; }

  .login-inline { flex-direction: column; }
}
