body {
    font-family: 'Georgia', serif;
    background-color: #2c0001;
    color: #fff;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    z-index: 2;
    position: relative;
}

h1 {
    color: #f1dda4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

/* Grundstyling für das Türchen */
.door {
    border: 2px solid #f1dda4; /* Goldrand */
    border-radius: 8px;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    
    /* Bild-Einstellungen */
    background-color: #8f1d21;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* NEU: Dies ist die "Tür" selbst, die das Bild verdeckt */
.door::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #8f1d21; /* Farbe der geschlossenen Tür */
    transition: opacity 0.6s ease-in-out;
    z-index: 1;
}

/* Hover-Effekt: Nur noch vergrößern und Schatten */
.door:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(241, 221, 164, 0.5);
    z-index: 10; /* Damit das vergrößerte Bild über den anderen liegt */
}

/* Türchen, die bereits geöffnet wurden */
.door.open {
    border-color: #fff; /* Weißer Rand signalisiert "erledigt" */
    cursor: default;
}

/* NEU: Wenn das Türchen offen ist, wird die "Tür" durchsichtig */
.door.open::before {
    opacity: 0;
}

/* NEU: Wenn das Türchen offen ist, wird die Zahl ausgeblendet */
.door.open .door-number {
    opacity: 0;
}

/* Die Zahl liegt über der "Tür" */
.door-number {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(143, 29, 33, 0.9); /* Etwas deckenderes Rot */
    color: #f1dda4;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 2; /* Wichtig, damit die Zahl über der Tür-Abdeckung liegt */
    transition: opacity 0.6s ease-in-out;
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* --- NEU: Das Modal (Popup) Design --- */
.modal {
    display: none; /* Standardmäßig versteckt */
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8); /* Dunkler Hintergrund */
    backdrop-filter: blur(5px); /* Weichzeichner Effekt */
}

.modal-content {
    background-color: #fff;
    color: #333;
    margin: 15% auto;
    padding: 30px;
    border: 4px solid #f1dda4;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from {transform: scale(0.5); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: #000;
}

#modal-text {
    font-size: 1.2rem;
    line-height: 1.6;
    white-space: pre-wrap; /* Erlaubt Zeilenumbrüche */
}

/* --- NEU: Styling für den Modal-Inhalt --- */
.modal-body {
    margin-top: 20px;
    text-align: left;
}

#modal-verse-ref {
    font-weight: bold;
    color: #8f1d21;
    text-align: center;
    font-size: 1.3rem;
}

#modal-verse-text {
    font-style: italic;
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-top: 10px;
    padding: 15px;
    background-color: #fdf6e8;
    border-left: 4px solid #f1dda4;
}

#modal-questions {
    margin-top: 10px;
    font-size: 1.1rem;
}

#modal-extra {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
}

.modal-body hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(143, 29, 33, 0.75), rgba(0, 0, 0, 0));
    margin: 25px 0;
}

/* --- NEU: Passwortabfrage --- */
#password-modal .modal-content {
    background-color: #fdf6e8; /* Ein weicheres Weiß */
}

#password-modal h2 {
    color: #8f1d21;
    margin-bottom: 20px;
}

#password-input {
    width: 80%;
    padding: 10px;
    border: 2px solid #f1dda4;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 1rem;
}

#password-submit {
    background-color: #8f1d21;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#password-submit:hover {
    background-color: #6d1619;
}

.error-message {
    color: #d9534f;
    margin-top: 10px;
    height: 1.2em; /* Platzhalter, damit das Layout nicht springt */
    visibility: hidden; /* Standardmäßig unsichtbar */
}