body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /*background: linear-gradient(180deg, #123, #345);*/
  background: url("img/bg3.png") no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45); /* Abdunklung */
  backdrop-filter: blur(2px);   /* leichter Unschärfe-Effekt */
  z-index: -1;
}

/* Vollbild-Overlay für Passwort */
.password-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.password-box {
  background: #ffffff;
  color: #222;
  padding: 20px 24px;
  border-radius: 10px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.password-box h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.password-box input {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.password-box button {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: #2c7be5;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.password-box button:hover {
  background: #1a5ec0;
}

.error-message {
  margin-top: 6px;
  color: #c00;
  font-size: 0.85rem;
}

.password-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.password-line input[type="password"] {
  flex: 1; /*Passwortfeld nutzt ganze Breite*/
}

.remember-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  color: #333;
  white-space: nowrap;
}

/* ❄️ Canvas-Schnee */
#snowCanvas {
  pointer-events: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  opacity: 0.6;
}

#snowCanvas.hidden {
  display: none;
}

.toggle-snow-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-snow-btn:hover {
  background: white;
}

.calendar-wrapper {
  max-width: 900px;
  width: 100%;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.door {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px;
  cursor: pointer;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
}

.door.openable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  background: rgba(0, 255, 160, 0.15);
}

.door.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.door.opened {
  background: rgba(0, 0, 0, 0.5);
  border-style: dashed;
}

.door-number {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.door-label {
  font-size: 0.8rem;
  opacity: 0.9;
}

.door.locked .door-label::after {
  content: " – gesperrt";
}

.door.openable .door-label::after {
  content: " – öffnen!";
}

.door.opened .door-label::after {
  content: " – geöffnet";
}

/* Popup / Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: #fff;
  color: #222;
  max-width: 500px;
  width: 90%;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  text-align: center;
}

.modal h2 {
  margin-top: 0;
  text-align: center;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
}

.modal-content {
  margin-top: 10px;
  line-height: 1.5;
}

.footer-note {
  text-align: center;
  margin-top: 15px;
  font-size: 0.75rem;
  opacity: 0.7;
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.admin-bar {
  position: fixed;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1500;
}

.admin-badge {
  background: rgba(220, 53, 69, 0.95); /* rot */
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-exit-btn {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  color: #222;
}

.admin-exit-btn:hover {
  background: #fff;
}