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

body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    color: #333;
}

header {
    text-align: center;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    padding: 2rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

#advent-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.loading {
    text-align: center;
    color: white;
    font-size: 1.5rem;
    padding: 4rem 0;
}

/* Kalender Container */
.calendar-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    border: 3px solid #d4af37;
    position: relative;
}

.calendar-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.calendar-header h2 {
    color: #d4af37;
    font-size: 2rem;
    font-weight: bold;
}

/* Wochentage-Header */
.weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1rem;
    background: #d4af37;
    border-radius: 10px;
    overflow: hidden;
}

.weekday-name {
    background: #d4af37;
    color: white;
    padding: 0.8rem;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
}

/* Kalender-Wochen */
.calendar-weeks {
    display: flex;
    flex-direction: column;
    gap: 0px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0px;
    background: #e0e0e0;
    background-color: #411616;
    background-image: url('./hintergrund.jpg');
}

/* Tag-Zellen */
.empty-cell {
    aspect-ratio: 1;
    background: #f8f9fa;
    min-height: 80px;
}

.regular-day {
    aspect-ratio: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    color: #666;
    font-size: 1.2rem;
    font-weight: 500;
    display:none;
}

/* Adventskalender-Türchen */
.advent-door {
    aspect-ratio: 1;
    background: linear-gradient(145deg, #d4af37, #b8941f);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c1810;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.day-number {
    font-size: 1.8rem;
    font-weight: bold;
    z-index: 2;
}

.advent-candle {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2rem;
    animation: flicker 2s infinite alternate;
    z-index: 3;
}

@keyframes flicker {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

.advent-door:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.advent-door.available {
    background: linear-gradient(145deg, #228b22, #1e6b1e);
    color: white;
    animation: pulse 2s infinite;
}

.advent-door.opened {
    background: linear-gradient(145deg, #dc143c, #b71c1c);
    color: white;
}


.advent-door.ticketday {
    background: linear-gradient(145deg, #dc143c, #b71c1c);
    color: white;
}

.advent-door.ticketday::after {
    content: '🎟️';
    position: absolute;
    font-size: 1.5rem;
    top: -7px;
    right: 1px;
    z-index: 3;
}
.advent-door.locked {
    background: linear-gradient(145deg, #696969, #555);
    color: #ccc;
    cursor: not-allowed;
}

.advent-door.locked::after {
    content: '🔒';
    position: absolute;
    font-size: 1rem;
    top: 5px;
    right: 5px;
    z-index: 3;
}

/* Spezielle Styles für Adventssonntage */
.advent-door.advent-sunday {
    /*border: 4px solid #ffd700;*/
    /*box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);*/
}

.advent-door.advent-sunday.available {
    border-color: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 139, 34, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(34, 139, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 139, 34, 0); }
}

/* Modal für Info-Inhalt */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.info-modal-start{
    position: absolute;
    top: 0rem;
    left: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-modal-button{
    position: absolute;
    top: 0rem;
    right: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal für Info-Inhalt */
.anmeldung-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.anmeldung-modal-button{
    position: absolute;
    top: 1rem;
    right: 1rem;
}



/* Modal für Türchen-Inhalt */
.door-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.door-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    text-align: left;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.door-content h2 {
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.door-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
}

.door-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1rem 0;
}

.door-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: #888;
}

/* Test-Panel Styles */
.test-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 0 auto 2rem auto;
    max-width: 1000px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid #d4af37;
}

.test-panel h3 {
    color: #d4af37;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.3rem;
}

.test-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.test-controls label {
    font-weight: bold;
    color: #333;
}

.test-controls input[type="date"] {
    padding: 0.5rem;
    border: 2px solid #d4af37;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.test-controls input[type="date"]:focus {
    outline: none;
    border-color: #b8941f;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.reset-btn, .christmas-btn, .clear-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn {
    background: #4CAF50;
    color: white;
}

.reset-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.christmas-btn {
    background: #dc143c;
    color: white;
}

.christmas-btn:hover {
    background: #b71c1c;
    transform: translateY(-1px);
}

.clear-btn {
    background: #ff4444;
    color: white;
}

.clear-btn:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

.current-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.info-item {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid #e9ecef;
    font-size: 0.85rem;
    text-align: center;
    min-width: fit-content;
}

.december-yes {
    color: #28a745;
    font-weight: bold;
}

.december-no {
    color: #dc3545;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    #advent-app {
        padding: 0 1rem;
    }

    header {
        font-size: 2rem;
        padding: 1rem 0;
    }

    .calendar-container {
        padding: 1rem;
    }

    .calendar-header h2 {
        font-size: 1.5rem;
    }

    .weekday-name {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .day-number {
        font-size: 1.4rem;
    }

    .advent-candle {
        font-size: 1rem;
        top: 3px;
        right: 3px;
    }

    .empty-cell, .regular-day, .advent-door {
        min-height: 60px;
    }

    .door-modal {
        padding: 1rem;
    }

    .door-content {
        padding: 1.5rem;
    }

    .test-panel {
        padding: 1rem;
        margin: 0 0 2rem 0;
    }

    .test-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .test-controls input[type="date"] {
        width: 100%;
    }

    .current-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .day-number {
        font-size: 1.2rem;
    }

    .weekday-name {
        padding: 0.3rem;
        font-size: 0.8rem;
    }

    .empty-cell, .regular-day, .advent-door {
        min-height: 50px;
    }
}

/* Verbesserungen für das Anmeldungsformular */
.anmeldung-modal .form-check-label {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-left: 0.25rem;
}

.anmeldung-modal .form-check-label.small {
    font-size: 0.8rem;
}

.anmeldung-modal .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.anmeldung-modal .form-check-input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Responsive Anpassungen für kleinere Bildschirme */
@media (max-width: 768px) {
    .anmeldung-modal .form-check-label {
        font-size: 0.75rem;
    }

    .anmeldung-modal .door-content {
        padding: 1rem;
    }

    .anmeldung-modal .row {
        margin: 0;
    }

    .anmeldung-modal .col {
        padding: 0.25rem;
    }
}

/* Link-Styling in der Checkbox-Label */
.anmeldung-modal .form-check-label a {
    color: #0066cc;
    text-decoration: underline;
}

.anmeldung-modal .form-check-label a:hover {
    color: #004499;
}



/* Bestehender CSS-Code bleibt unverändert... */

/* Verbesserte Mobile Ansicht für Modals */
@media (max-width: 768px) {
    /* Allgemeine Mobile Anpassungen für alle Modals */
    .door-modal, .info-modal, .anmeldung-modal {
        padding: 1rem;
    }

    .calendar-week {

        grid-template-columns: repeat(3, 1fr);
    }

    .door-content {
        padding: 1rem;
        max-width: calc(100vw - 2rem);
        margin: 0 auto;
    }

    /* Kleinere Schrift für Modal-Inhalte */
    .door-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .door-content p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .door-content .door-footer {
        margin-top: 1rem;
        padding-top: 0.8rem;
    }

    .door-content .door-footer small {
        font-size: 0.75rem;
    }

    /* Anmeldungsformular Mobile */
    .anmeldung-modal .door-content {
        padding: 1rem;
    }

    .anmeldung-modal .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .anmeldung-modal .form-control-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .anmeldung-modal .form-check-label {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .anmeldung-modal .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .anmeldung-modal .row {
        margin: 0 -0.25rem;
    }

    .anmeldung-modal .col {
        padding: 0 0.25rem;
        margin-bottom: 0.5rem;
    }

    .anmeldung-modal .mb-3 {
        margin-bottom: 0.8rem !important;
    }

    /* Quiz-Bereich in Türchen-Modal */
    .door-content .form-check-inline {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .door-content .form-check-label {
        font-size: 0.8rem;
    }

    .door-content .form-check-input {
        margin-right: 0.3rem;
    }

    /* Info-Modal */
    .info-modal .door-content p {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    /* Kalender-Header Mobile */
    .info-modal-start {
        position: relative;
        top: auto;
        left: auto;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 0.7rem !important;
    }

    .info-modal-button {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 1rem;
        text-align: center;
    }

    .calendar-container {
        padding: 1rem;
        position: relative;
    }
}

@media (max-width: 480px) {
    /* Noch kleinere Bildschirme */
    .door-content {
        padding: 0.8rem;
    }

    .door-content h2 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .door-content p {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    /* Anmeldungsformular sehr kleine Bildschirme */
    .anmeldung-modal .form-label {
        font-size: 0.75rem;
    }

    .anmeldung-modal .form-control-sm {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .anmeldung-modal .form-check-label {
        font-size: 0.65rem;
    }

    .anmeldung-modal .btn-sm {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .anmeldung-modal .door-content {
        padding: 0.8rem;
    }

    /* Quiz-Antworten responsiv stapeln */
    .door-content .form-check-inline {
        display: block;
        margin-right: 0;
        margin-bottom: 0.4rem;
    }

    .door-content .form-check-label {
        font-size: 0.75rem;
    }

    /* Info-Modal */
    .info-modal .door-content p {
        font-size: 0.8rem;
    }

    /* Buttons im Modal */
    .door-content .btn-sm {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    /* Alert-Nachrichten */
    .alert {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 360px) {
    /* Sehr kleine Bildschirme (alte Smartphones) */
    .door-content {
        padding: 0.6rem;
        border-radius: 10px;
    }

    .door-content h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .door-content p {
        font-size: 0.75rem;
    }

    .anmeldung-modal .form-label {
        font-size: 0.7rem;
    }

    .anmeldung-modal .form-control-sm {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }

    .anmeldung-modal .form-check-label {
        font-size: 0.6rem;
    }

    .close-btn {
        font-size: 1.2rem;
        width: 25px;
        height: 25px;
    }
}

/* Zusätzliche Verbesserungen für Touch-Bedienung */
@media (max-width: 768px) {
    /* Größere Touch-Targets */
    .door-content .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .close-btn {
        min-height: 44px;
        min-width: 44px;
        top: 0.5rem;
        right: 0.5rem;
    }

    /* Bessere Abstände für Touch */
    .anmeldung-modal .form-check {
        margin-bottom: 1rem;
    }

    .door-content .form-check-inline {
        margin-bottom: 0.8rem;
    }

    /* Scrollbare Modals bei sehr langen Inhalten */
    .door-content {
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }
}
