:root {
  --accent: #d37a5a;
  --accent-strong: #b25a2b;
  --page-bg: #f5dfc4;
  --page-bg-2: #d8b18d;
  --beach-tint: rgba(255, 229, 190, 0.34);
  --beach-shade: rgba(84, 52, 31, 0.32);
  --nav-bg: rgba(58, 54, 54, 0.84);
  --menu-bg: rgba(31, 30, 30, 0.58);
  --surface: rgba(255, 250, 242, 0.93);
  --surface-strong: #fff8ee;
  --card-bg: rgba(255, 248, 238, 0.94);
  --card-title: #3a3636;
  --text: #252323;
  --text-inverted: #ffffff;
  --muted: #6d6461;
  --shadow: rgba(0, 0, 0, 0.18);
  --overlay: rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] {
  --page-bg: #242121;
  --page-bg-2: #3a3636;
  --beach-tint: rgba(58, 54, 54, 0.28);
  --beach-shade: rgba(0, 0, 0, 0.68);
  --nav-bg: rgba(22, 21, 21, 0.9);
  --menu-bg: rgba(0, 0, 0, 0.34);
  --surface: rgba(58, 54, 54, 0.88);
  --surface-strong: #3a3636;
  --card-bg: rgba(58, 54, 54, 0.92);
  --card-title: #ffffff;
  --text: #f7f1ef;
  --text-inverted: #ffffff;
  --muted: #d2c6c2;
  --shadow: rgba(0, 0, 0, 0.36);
  --overlay: rgba(0, 0, 0, 0.55);
}

html {
  overflow-x: hidden;
  touch-action: pan-y;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  padding-top: 80px;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(var(--beach-shade), var(--beach-shade)),
    linear-gradient(var(--beach-tint), var(--beach-tint)),
    url("/Bilder/weg am Strand.jpg"),
    linear-gradient(135deg, var(--page-bg), var(--page-bg-2));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Hintergrund */
.Front-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  filter: brightness(0.74) saturate(1.05) sepia(0.12);
  z-index: 0;
}

:root[data-theme="dark"] .Front-page {
  filter: brightness(0.36) saturate(0.78);
}

/* NAVBAR */
.container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  padding: 10px 32px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  z-index: 1000;

  background: var(--nav-bg);
  backdrop-filter: blur(10px);
}

/* Menü */
.menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;

  margin-left: auto;

  background: var(--menu-bg);
  padding: 12px 18px;
  border-radius: 14px;

  overflow: hidden;
}

/* Links */
.menu-link {
  position: relative;
  z-index: 2;

  color: white;
  text-decoration: none;

  font-size: 16px;
  padding: 10px 14px;

  transition: 0.2s;
}

.menu-link:hover {
  transform: translateY(-2px);
  color: var(--text-inverted);
}

/* Highlight */
.highlight {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;

  background: var(--accent);
  border-radius: 10px;

  transition: none;
  z-index: 1;
}

.highlight.ready {
  transition: all 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  margin-left: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--accent);
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px var(--shadow);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: white;
}

.theme-toggle.theme-toggle-floating {
  position: fixed;
  top: 20px;
  left: 30px;
  z-index: 1000;
  margin-left: 0;
}

body.has-photo-bg {
  background-image:
    linear-gradient(var(--beach-shade), var(--beach-shade)),
    linear-gradient(var(--beach-tint), var(--beach-tint)),
    url("/Bilder/weg am Strand.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.form-box {
  background: var(--surface);
  backdrop-filter: blur(10px);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: -1;
}

/* ========================
   BURGER-MENÜ
   ======================== */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 1001;
  margin-left: 12px;
  flex-shrink: 0;
}

.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========================
   RESPONSIVE / MOBILE
   ======================== */

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  .container {
    padding: 10px 20px;
  }

  .burger {
    display: flex;
  }

  .menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    border-radius: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 999;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px var(--shadow);
  }

  .menu.open {
    display: flex;
  }

  .menu-link {
    width: 100%;
    padding: 16px 28px;
    font-size: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
  }

  .menu-link:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.06);
  }

  .highlight {
    display: none;
  }

  .theme-toggle {
    margin-left: 8px;
    width: 36px;
    height: 36px;
    font-size: 17px;
  }
}

/* ========================
   ADMIN-ELEMENTE (Zeitplan)
   ======================== */

.admin-link-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--surface-strong);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 4px 12px var(--shadow);
}

.admin-link-btn:hover {
  background: var(--accent);
  color: white;
}

.admin-banner {
  display: none;
  background: rgba(211, 122, 90, 0.14);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 12px 20px;
  margin: 12px auto;
  max-width: 900px;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--text);
  font-weight: 500;
}

.admin-banner a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.admin-banner a:hover {
  text-decoration: underline;
}

.admin-logout-inline {
  padding: 7px 16px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  border: 1px solid var(--accent-strong);
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.admin-logout-inline:hover {
  background: var(--accent-strong);
  color: white;
}

/* ========================
   KLEINER ADMIN-BUTTON (Home)
   ======================== */

.admin-corner-btn {
  position: fixed;
  bottom: 16px;
  right: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  z-index: 999;
  background: rgba(0, 0, 0, 0.52);
  padding: 7px 14px;
  border-radius: 7px;
  transition: color 0.2s, background 0.2s;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  letter-spacing: 0.01em;
}

.admin-corner-btn:hover {
  color: white;
  background: rgba(0, 0, 0, 0.75);
}

/* ========================
   DIV-OVERLAY (Modal-Basis)
   ======================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.58);
  z-index: 9900;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-box {
  background: var(--surface);
  border-radius: 14px;
  padding: 28px;
  width: min(480px, 100%);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-family: "Roboto", sans-serif;
}

.modal-box h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--text);
}

/* CAPTCHA-Overlay liegt über allen anderen Overlays */
.captcha-overlay {
  z-index: 9950;
}

/* ========================
   GLOBALE BUTTONS (für CAPTCHA auf allen Seiten)
   ======================== */

.request-button {
  padding: 12px 26px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.request-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  padding: 12px 20px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.secondary-button:hover {
  background: var(--accent);
  color: white;
}

/* ========================
   AMPEL-CAPTCHA
   ======================== */

.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.captcha-cell {
  font-size: 42px;
  text-align: center;
  padding: 14px 8px;
  border-radius: 10px;
  background: var(--surface-strong);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.18s, background 0.18s, transform 0.1s;
  user-select: none;
  line-height: 1;
}

.captcha-cell:hover {
  transform: scale(1.06);
}

.captcha-cell.selected {
  border-color: var(--accent);
  background: rgba(211, 122, 90, 0.22);
}

.captcha-instruction {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 15px;
}

.captcha-error {
  color: #c2413d;
  font-size: 14px;
  min-height: 20px;
  margin: 4px 0 0;
}

/* ========================
   ERFOLGS-ANIMATION (grüner Haken)
   ======================== */

.send-success-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  background: rgba(34, 139, 68, 0.96);
  border-radius: 22px;
  padding: 44px 56px;
  text-align: center;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.send-success-overlay.show {
  animation: successAppear 2.8s ease-out forwards;
}

.send-success-overlay .success-check {
  font-size: 80px;
  line-height: 1;
  display: block;
  color: white;
  animation: checkBounce 0.5s ease-out 0.15s both;
}

.send-success-overlay .success-msg {
  color: white;
  font-size: 20px;
  font-weight: 700;
  margin-top: 14px;
  letter-spacing: 0.01em;
}

@keyframes successAppear {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  12%  { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  72%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
}

@keyframes checkBounce {
  0%   { transform: scale(0.4) rotate(-15deg); }
  60%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}
