/* Style général */
body {
    margin: 0;
    padding: 0;
    background: url('holiday-background.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Arial', sans-serif;
    color: #fff;
    min-height: 100vh;
}

#background {
    width: 100%;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.music-control:hover {
    transform: scale(1.1);
}

h1 {
    font-size: 3rem;
    margin-top: 20px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ff0000; }
    to { text-shadow: 0 0 20px #fff, 0 0 30px #ff0000, 0 0 40px #ff0000; }
}

p {
    text-align: center;
    font-size: 1.5rem;
    text-shadow: 0 0 5px #000;
}

/* Instructions */
.instructions {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px 20px;
    font-size: 1.2rem;
    line-height: 1.6;
    text-align: center;
    text-shadow: 0 0 5px #000;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Calendar Container */
.calendar-container {
    position: relative;
    width: 650px;
    height: 800px;
    margin: 0 auto;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    box-sizing: border-box;
}

/* Doors */
.door {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 15px;
    background: linear-gradient(145deg, #ff3333, #2b2b2b);
    text-align: center;
    color: white;
    font-size: 2rem;
    line-height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.door:hover {
    transform: scale(1.1);
    background: linear-gradient(145deg, #2b2b2b, #ff3333);
}

.door.opening {
    animation: openDoor 0.5s ease-in-out;
}

@keyframes openDoor {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.date {
    font-size: 0.8rem;
    line-height: 1;
    position: absolute;
    bottom: 5px;
    width: 100%;
    text-align: center;
}

/* Stars */
.star-box {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 15px;
    background: linear-gradient(145deg, #ffd700, #daa520);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.star-box:hover {
    transform: scale(1.1);
    background: linear-gradient(145deg, #daa520, #ffd700);
}

.star-shape {
    font-size: 50px;
    color: white;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    line-height: 1;
}

.star-date {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.star-number {
    font-size: 24px;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.star-month {
    font-size: 12px;
    color: white;
    text-shadow: 1px 1px 2px black;
}

/* Snowflakes */
.snowflake {
    position: absolute;
    width: 20px;
    height: 20px;
    background-image: url('snowflake.png');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    animation: fall linear infinite;
}

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

/* Elves */
.dancing-elf {
    position: fixed;
    bottom: 10px;
    width: 80px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
}

.elf-type-1 { background-image: url('elf.png'); }
.elf-type-2 { background-image: url('elf2.png'); }
.elf-type-3 { background-image: url('elf3.png'); }
.elf-type-4 { background-image: url('elf4.png'); }

.elf-left {
    left: -80px;
    animation: moveLeft 15s linear infinite, jumpElf 1s ease-in-out infinite;
}

.elf-right {
    right: -80px;
    transform: scaleX(-1);
    animation: moveRight 15s linear infinite, jumpElf 1s ease-in-out infinite;
}

@keyframes moveLeft {
    from { left: -80px; }
    to { left: 100%; }
}

@keyframes moveRight {
    from { right: -80px; }
    to { right: 100%; }
}

@keyframes jumpElf {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    width: 80%;
    max-width: 500px;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
    color: #ff3333;
}

#message {
    color: #000;
    font-size: 1.2rem;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-container {
        width: 90%;
        height: auto;
        padding: 20px;
        margin: 0 auto;
        transform: scale(0.8);
        transform-origin: top center;
    }

    h1 { font-size: 2rem; }
    p { font-size: 1.2rem; }

    .door, .star-box {
        position: relative !important;
        margin: 10px auto;
        top: auto !important;
        left: auto !important;
    }

    .instructions {
        font-size: 1rem;
        margin: 15px;
        padding: 10px;
    }
}