* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Georgia', 'Times New Roman', serif;
    overflow-x: hidden;
    color: #fff;
}
#content-flex {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(180deg, #0a1628 0%, #1a2a4a 50%, #0d1f3c 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
    position: relative;
}
.snowflakes {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.snowflake {
    position: absolute; top: -10px; color: #fff; font-size: 1em;
    animation: fall linear infinite; opacity: 0.8;
}
@keyframes fall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0.3; }
}
.announcement {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; min-height: 100vh; padding: 2rem;
    text-align: center; position: relative; z-index: 1;
}
.announcement h1 {
    font-size: 3.5rem; color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.5), 0 0 40px rgba(255,215,0,0.3);
    margin-bottom: 1.5rem; animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255,215,0,0.5), 0 0 40px rgba(255,215,0,0.3); }
    to { text-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 60px rgba(255,215,0,0.5), 0 0 80px rgba(255,215,0,0.3); }
}
.announcement p {
    font-size: 1.5rem; color: #e0e0e0; max-width: 600px; line-height: 1.8;
}
.announcement .icon { font-size: 5rem; margin-bottom: 1rem; animation: bounce 2s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
.calendar-container {
    display: block; padding: 0; max-width: 100%; margin: 0;
    position: relative; z-index: 1;
}
.calendar-title {
    text-align: center; font-size: 3rem; color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.5); margin-bottom: 2rem;
    animation: glow 2s ease-in-out infinite alternate;
}
.calendar-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 1rem; padding: 1rem;
}
.door {
    aspect-ratio: 1; position: relative; cursor: pointer; border-radius: 12px;
    overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.door:hover:not(.locked) { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,215,0,0.4); }
.door .door-front {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: bold; color: #ffd700;
    background: linear-gradient(135deg, #8B0000 0%, #c41e3a 50%, #8B0000 100%);
    border: 3px solid #ffd700; border-radius: 12px;
    transition: opacity 0.5s ease;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 4px 10px rgba(0,0,0,0.3);
}
.door .door-front::before {
    content: ''; position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 2px solid rgba(255,215,0,0.4); border-radius: 8px; pointer-events: none;
}
.door .door-front::after {
    content: '\2744'; position: absolute; font-size: 1.2rem;
    color: rgba(255,215,0,0.3); top: 8px; right: 8px;
}
.door .door-image {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 12px; opacity: 0;
    transition: opacity 0.5s ease; border: 3px solid #ffd700;
}
.door.opened .door-front { opacity: 0; pointer-events: none; }
.door.opened .door-image { opacity: 1; }
.door.locked { cursor: not-allowed; opacity: 0.4; }
.door.locked .door-front {
    background: linear-gradient(135deg, #2a2a3a 0%, #3a3a4a 50%, #2a2a3a 100%);
    border-color: #555; color: #777;
}
.door.locked .door-front::after { content: '\1F512'; font-size: 1.5rem; color: rgba(100,100,100,0.5); }
.door.locked .door-front span { display: none; }
.door.today .door-front { animation: todayPulse 2s ease-in-out infinite; }
@keyframes todayPulse {
    0%, 100% { box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 4px 10px rgba(0,0,0,0.3); }
    50% { box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 0 25px rgba(255,215,0,0.8), 0 0 50px rgba(255,215,0,0.4); }
}
.lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 1000;
    align-items: center; justify-content: center; cursor: pointer;
    padding: 1rem;
}
.lightbox.active { display: flex; }
.lightbox-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}
.lightbox img {
    max-width: calc(100vw - 3rem);
    max-height: calc(100vh - 5rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 5px solid #ffd700;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(255,215,0,0.3);
}
.lightbox .close-hint {
    position: absolute; top: 1rem; left: 50%; transform: translateX(-50%);
    color: #ffd700; font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
    white-space: nowrap;
}
@media (max-width: 900px) {
    #calendarDtab {
        width: 100% !important;
    }
    #head {
        white-space: normal !important;
    }
    .calendar-container {
        padding: 1rem;
    }
    .calendar-grid { grid-template-columns: repeat(4, 1fr); }
    .calendar-title { font-size: 2rem; }
    .announcement h1 { font-size: 2.5rem; }
    .announcement p { font-size: 1.2rem; }
}
@media (min-width: 901px) {
    .calendar-container {
        padding: 2rem;
    }
}
@media (max-width: 600px) {
    .calendar-container {
        padding: 0.5rem;
    }
    .calendar-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        padding: 0.25rem;
    }
    .door .door-front { font-size: 1.5rem; }
    .calendar-title { font-size: 1.5rem; }
    .announcement h1 { font-size: 2rem; }
    .announcement p { font-size: 1rem; }
    .lightbox {
        padding: 0.5rem;
    }
    .lightbox img {
        border-width: 3px;
        border-radius: 8px;
    }
    .lightbox .close-hint {
        font-size: 0.9rem;
        top: 0.7rem;
    }
}
@media (max-width: 400px) {
    .lightbox {
        padding: 0.25rem;
    }
    .lightbox img {
        border-radius: 6px;
    }
    .lightbox .close-hint {
        font-size: 0.8rem;
        top: 0.5rem;
    }
}
