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

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 50%, #1a472a 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    position: relative;
}

.title {
    text-align: center;
    color: #ffd700;
    font-size: 2.5rem;
    padding-top: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.9;
}

/* Schneeflocken Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: #fff;
    font-size: 1.5rem;
    animation: fall linear infinite;
    opacity: 0.8;
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: 0s; font-size: 1.2rem; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: 1s; font-size: 1.8rem; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 8s; animation-delay: 2s; font-size: 1rem; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1.5rem; }
.snowflake:nth-child(5) { left: 45%; animation-duration: 9s; animation-delay: 3s; font-size: 2rem; }
.snowflake:nth-child(6) { left: 55%; animation-duration: 11s; animation-delay: 1.5s; font-size: 1.3rem; }
.snowflake:nth-child(7) { left: 65%; animation-duration: 13s; animation-delay: 2.5s; font-size: 1.7rem; }
.snowflake:nth-child(8) { left: 75%; animation-duration: 10s; animation-delay: 4s; font-size: 1.1rem; }
.snowflake:nth-child(9) { left: 85%; animation-duration: 15s; animation-delay: 0.8s; font-size: 1.9rem; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 7s; animation-delay: 2s; font-size: 1.4rem; }

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* Spiel Container */
#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
}

/* Weihnachtskugeln */
.bauble {
    position: absolute;
    width: 80px;
    height: 80px;
    cursor: pointer;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    transition: transform 0.1s ease;
    z-index: 11;
}

.bauble:hover {
    transform: scale(1.2);
}

.bauble.pop {
    animation: pop 0.3s ease-out forwards;
    pointer-events: none;
}

@keyframes pop {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Geschenk */
#gift-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
}

.gift {
    width: 200px;
    height: auto;
    cursor: pointer;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    transition: transform 0.1s ease;
}

.gift:hover {
    transform: scale(1.05);
}

.gift.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10% { transform: translateX(-10px) rotate(-5deg); }
    20% { transform: translateX(10px) rotate(5deg); }
    30% { transform: translateX(-10px) rotate(-5deg); }
    40% { transform: translateX(10px) rotate(5deg); }
    50% { transform: translateX(-10px) rotate(-5deg); }
    60% { transform: translateX(10px) rotate(5deg); }
    70% { transform: translateX(-10px) rotate(-5deg); }
    80% { transform: translateX(10px) rotate(5deg); }
    90% { transform: translateX(-5px) rotate(-2deg); }
}

.gift-hint {
    color: #ffd700;
    font-size: 1.2rem;
    margin-top: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Popup */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#popup {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 3px solid #ffd700;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#popup h2 {
    color: #ffd700;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.popup-text {
    color: #fff;
    font-size: 1.3rem;
    text-align: center;
    line-height: 1.8;
    margin-bottom: 20px;
}

.popup-subtext {
    color: #ffd700;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 20px;
}

#close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#close-popup:hover {
    transform: scale(1.2);
    color: #ffd700;
}

#image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

#image-gallery img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #ffd700;
    transition: transform 0.3s ease;
}

#image-gallery img:hover {
    transform: scale(1.1);
}

.placeholder-text {
    color: #fff;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

/* Hidden Klasse */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 600px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .bauble {
        width: 60px;
        height: 60px;
    }
    
    .gift {
        width: 150px;
    }
    
    #popup {
        padding: 25px;
    }
    
    #popup h2 {
        font-size: 1.5rem;
    }
    
    .popup-text {
        font-size: 1.1rem;
    }
    
    #image-gallery img {
        width: 150px;
        height: 110px;
    }
}
