:root {
    /* FARBPALETTE: Modern & Warm */
    --bg-dark: #1a0505; /* Tiefes Rot-Schwarz */
    --bg-gradient: radial-gradient(circle at 50% 0%, #4a0e0e 0%, #1a0505 100%);
    
    --card-bg: rgba(255, 235, 235, 0.05); /* Rötliches Glas */
    --card-border: rgba(255, 215, 215, 0.15);
    
    --text-white: #fffaf4; /* Cremeweiß */
    --text-muted: #d6c0c0;
    
    /* Akzente */
    --xmas-red: #dc2626;
    --xmas-green: #15803d;
    --xmas-gold: #fbbf24;
    
    --font-heading: 'Mountains of Christmas', cursive;
    --font-main: 'Outfit', sans-serif;
    --radius-m: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    display: flex; flex-direction: column; overflow-x: hidden;
}

/* --- HINTERGRUND --- */
.background-xmas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: var(--bg-gradient);
}

/* Schnee Partikel */
.particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.particle {
    position: absolute; background: #fffaf4; border-radius: 50%; opacity: 0.4;
    animation: fall linear infinite;
}
@keyframes fall { from { transform: translateY(-10vh); } to { transform: translateY(110vh); } }

/* --- HEADER --- */
header {
    padding: 50px 20px 30px; text-align: center; position: relative; z-index: 2;
}

.badge {
    display: inline-block; padding: 6px 14px;
    background: rgba(220, 38, 38, 0.2);
    border-radius: 20px; font-size: 0.85rem; font-weight: 600;
    letter-spacing: 1px; text-transform: uppercase; color: var(--xmas-gold);
    margin-bottom: 15px; backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

header h1 {
    font-family: var(--font-heading);
    font-size: 3.8rem; line-height: 1.1; font-weight: 700;
    color: var(--xmas-gold);
    text-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
    margin-bottom: 15px;
}

.countdown { color: var(--text-muted); font-weight: 500; }

/* --- GRID --- */
.calendar-wrapper {
    flex: 1; padding: 0 20px 100px; display: flex; justify-content: center; z-index: 2;
}
.calendar-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 12px; width: 100%; max-width: 500px;
}

/* --- TÜRCHEN --- */
.door {
    aspect-ratio: 1/1;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-m);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* SVG Hintergründe (Baum, Stern, Geschenk im Wechsel) */
.door:nth-child(3n+1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2L2 22h20L12 2z'/%3E%3Cpath d='M12 12l4 10'/%3E%3Cpath d='M12 12l-4 10'/%3E%3C/svg%3E"); }
.door:nth-child(3n+2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E"); }
.door:nth-child(3n+3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13'/%3E%3Cpath d='M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7'/%3E%3Cpath d='M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5'/%3E%3C/svg%3E"); }

.door::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 60%; height: 60%;
    transform: translate(-50%, -50%) rotate(-10deg);
    background-repeat: no-repeat; background-position: center; background-size: contain;
    opacity: 0.5; z-index: 1; transition: all 0.3s;
}

.door span {
    font-family: var(--font-heading);
    font-size: 1.8rem; font-weight: 700; color: var(--text-white);
    z-index: 2; text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.door:active { transform: scale(0.95); }
.door:active::before { transform: translate(-50%, -50%) rotate(0deg) scale(1.2); opacity: 0.8; }

/* STATUS: LOCKED */
.door.locked { opacity: 0.6; background: rgba(20, 5, 5, 0.3); }
.door.locked span { color: var(--text-muted); }

/* STATUS: HEUTE (Active) */
.door.active {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--xmas-red);
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.4);
}
.door.active span { color: var(--xmas-gold); }
.door.active::after {
    content: ''; position: absolute; top: 12px; right: 12px;
    width: 8px; height: 8px; background: var(--xmas-red);
    border-radius: 50%; box-shadow: 0 0 10px var(--xmas-red);
    animation: pulseDot 2s infinite; z-index: 3;
}
@keyframes pulseDot { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }

/* STATUS: OPENED */
.door.opened {
    background: rgba(21, 128, 61, 0.15); /* Grüner Schimmer */
    border-color: var(--xmas-green);
}
.door.opened span { color: var(--text-muted); }

/* TAG 24 Special */
.door:last-child {
    grid-column: span 2; aspect-ratio: auto;
    background: linear-gradient(135deg, var(--xmas-red), var(--xmas-gold));
    border: none;
}
.door:last-child span { font-size: 3rem; color: white; }
.door:last-child::before { display: none; }

/* --- BOTTOM SHEET --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    z-index: 100; opacity: 0; visibility: hidden; transition: 0.3s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-sheet {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #2a0a0a;
    border-radius: 30px 30px 0 0;
    z-index: 101; transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    border-top: 1px solid rgba(255,215,215,0.1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
    overflow: hidden;
}
.modal-sheet.show { transform: translateY(0); }

/* Zuckerstangen-Leiste */
.sheet-deco-bar {
    height: 12px; width: 100%;
    background: repeating-linear-gradient(45deg, var(--xmas-red), var(--xmas-red) 10px, #fff 10px, #fff 20px);
}

.sheet-handle {
    width: 40px; height: 4px; background: rgba(255,255,255,0.2);
    border-radius: 2px; margin: 15px auto 25px;
}
.sheet-content { padding: 0 25px 40px; position: relative; }

.close-btn-round {
    position: absolute; top: 0; right: 20px;
    background: rgba(255,255,255,0.1); border: none;
    width: 32px; height: 32px; border-radius: 50%;
    color: white; font-size: 1.2rem; cursor: pointer;
}

.sheet-tag {
    display: inline-block; font-size: 0.9rem; font-weight: 700;
    text-transform: uppercase; color: var(--xmas-gold); letter-spacing: 1px;
    margin-bottom: 10px; font-family: var(--font-heading);
}

#modal-title { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 20px; line-height: 1.1; color: var(--text-white); }
#modal-text { font-size: 1.15rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 30px; }

/* Action Button */
.action-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 18px;
    background: linear-gradient(to right, #25D366, #128C7E);
    color: white; text-decoration: none; border-radius: 18px;
    font-weight: 700; font-size: 1.1rem; transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.action-btn:active { transform: scale(0.98); }

/* --- TOAST --- */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px);
    background: rgba(220, 38, 38, 0.9); color: white;
    padding: 12px 24px; border-radius: 30px; font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); z-index: 200;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.shake { animation: shake 0.4s ease-in-out; }
@keyframes shake { 0%,100% {transform: translateX(0);} 25% {transform: translateX(-5px);} 75% {transform: translateX(5px);} }