@font-face {
    font-family: 'ComspotBold';
    src: url('assets/fonts/Comspot-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'ComspotBold', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('assets/CS_Weinachten1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#calendar {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    padding: 40px;
    box-sizing: border-box;
}

/* Adventskalender Türchen */
.door {
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 15px 0 rgba(0,0,0,0.08);
    transition: transform 0.3s ease, background-color 0.3s ease;
    overflow: hidden;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.door:hover {
    background-color: rgba(255,255,255,0.32);
    transform: scale(1.05);
}

.door.opened {
    background-color: #db0812;
    color: #fff;
    border: 2px solid #fff;
    cursor: default;
}

/* Türinhalt, tooltip-artig */
.door-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.door.opened .door-content {
    opacity: 1;
    visibility: visible;
}

/* Overlay für vergrößerte Tür */
.door-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 300px;
    height: 300px;
    max-width: 90vw;
    max-height: 70vh;
    padding: 20px;
    background-color: #000000;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

/* Schließen-Button im Overlay */
.close-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    color: #db0812;
    border: none;
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
}

#muteButton {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px;
    font-size: 1em;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.snowflake {
    position: absolute;
    top: -10px;
    font-size: 1em;
    color: white;
    opacity: 0.8;
    pointer-events: none;
    animation: fall linear infinite;
}

/* Stil für das geöffnete Icon, zentriert in der kleinen Tür */
.open-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    color: #db0812;
    pointer-events: none;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

/* Responsive: 4 Spalten ab 700px, optimiert für Mobil */
@media (max-width: 700px) {
    #calendar {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(6, 1fr);
        padding: 8px;
        gap: 8px;
        height: 98vh; /* Hauch kleiner als 100vh, verhindert das letzte Pixel Abschneiden */
    }
    .door {
        font-size: 1.1em;
        border-radius: 10px;
    }
}


/* Ultra-small screens: Mehr Gap, größere Schrift */
@media (max-width: 420px) {
    #calendar {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(6, 1fr);
        padding: 2px;
        gap: 5px;
    }
    .door {
        font-size: 0.95em;
        border-radius: 12px;
    }
}

/* Optional: Touch-Optimierung für große Buttons */
@media (pointer: coarse) and (max-width: 700px) {
    .door {
        min-height: 48px;
    }
}

