/**
 * Holiday Events CSS Effects
 * Animationen für verschiedene Holiday-Events
 */

/* ============================================
   SCHNEE-EFFEKT (Weihnachten)
   ============================================ */
.snow-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snow-effect::before,
.snow-effect::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, white 1px, transparent 1px),
        radial-gradient(circle at 60% 80%, white 1px, transparent 1px),
        radial-gradient(circle at 40% 20%, white 1px, transparent 1px),
        radial-gradient(circle at 80% 40%, white 1px, transparent 1px),
        radial-gradient(circle at 10% 90%, white 1px, transparent 1px),
        radial-gradient(circle at 90% 10%, white 1px, transparent 1px),
        radial-gradient(circle at 30% 70%, white 1px, transparent 1px),
        radial-gradient(circle at 70% 30%, white 1px, transparent 1px);
    background-size: 200px 200px, 150px 150px, 180px 180px, 160px 160px, 190px 190px, 170px 170px, 200px 200px, 150px 150px;
    background-position: 0 0, 50px 50px, 100px 100px, 150px 150px, 200px 200px, 250px 250px, 300px 300px, 350px 350px;
    animation: snow-fall 20s linear infinite;
    opacity: 0.8;
}

.snow-effect::after {
    animation-delay: -10s;
    background-size: 180px 180px, 160px 160px, 200px 200px, 140px 140px, 190px 190px, 170px 170px, 150px 150px, 200px 200px;
}

@keyframes snow-fall {
    0% {
        transform: translateY(-100vh);
    }
    100% {
        transform: translateY(100vh);
    }
}

/* ============================================
   KONFETTI-EFFEKT (Silvester)
   ============================================ */
.confetti-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff0000;
    animation: confetti-fall 3s linear infinite;
}

.confetti-piece:nth-child(1) { left: 10%; background: #ff0000; animation-delay: 0s; }
.confetti-piece:nth-child(2) { left: 20%; background: #00ff00; animation-delay: 0.3s; }
.confetti-piece:nth-child(3) { left: 30%; background: #0000ff; animation-delay: 0.6s; }
.confetti-piece:nth-child(4) { left: 40%; background: #ffff00; animation-delay: 0.9s; }
.confetti-piece:nth-child(5) { left: 50%; background: #ff00ff; animation-delay: 1.2s; }
.confetti-piece:nth-child(6) { left: 60%; background: #00ffff; animation-delay: 1.5s; }
.confetti-piece:nth-child(7) { left: 70%; background: #ff8800; animation-delay: 1.8s; }
.confetti-piece:nth-child(8) { left: 80%; background: #8800ff; animation-delay: 2.1s; }
.confetti-piece:nth-child(9) { left: 90%; background: #ff0088; animation-delay: 2.4s; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Konfetti-Generator (wird per JavaScript erstellt) */
.confetti-effect::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 15% 20%, #ff0000 2px, transparent 2px),
        radial-gradient(circle at 35% 40%, #00ff00 2px, transparent 2px),
        radial-gradient(circle at 55% 60%, #0000ff 2px, transparent 2px),
        radial-gradient(circle at 75% 80%, #ffff00 2px, transparent 2px),
        radial-gradient(circle at 25% 30%, #ff00ff 2px, transparent 2px),
        radial-gradient(circle at 45% 50%, #00ffff 2px, transparent 2px),
        radial-gradient(circle at 65% 70%, #ff8800 2px, transparent 2px),
        radial-gradient(circle at 85% 90%, #8800ff 2px, transparent 2px);
    background-size: 200px 200px;
    animation: confetti-fall 4s linear infinite;
    opacity: 0.6;
}

/* ============================================
   EIER-EFFEKT (Ostern)
   ============================================ */
.eggs-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.egg {
    position: absolute;
    width: 30px;
    height: 40px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: egg-bounce 4s ease-in-out infinite;
    opacity: 0.7;
}

.egg:nth-child(1) { left: 10%; background: #ff6b9d; animation-delay: 0s; }
.egg:nth-child(2) { left: 30%; background: #c44569; animation-delay: 0.5s; }
.egg:nth-child(3) { left: 50%; background: #f8b500; animation-delay: 1s; }
.egg:nth-child(4) { left: 70%; background: #6c5ce7; animation-delay: 1.5s; }
.egg:nth-child(5) { left: 90%; background: #00b894; animation-delay: 2s; }

@keyframes egg-bounce {
    0%, 100% {
        transform: translateY(-50px) rotate(0deg);
    }
    25% {
        transform: translateY(calc(100vh - 50px)) rotate(90deg);
    }
    50% {
        transform: translateY(calc(100vh - 100px)) rotate(180deg);
    }
    75% {
        transform: translateY(calc(100vh - 50px)) rotate(270deg);
    }
}

/* ============================================
   FLEDERMAUS-EFFEKT (Halloween)
   ============================================ */
.bats-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.bat {
    position: absolute;
    width: 40px;
    height: 30px;
    background: #1a1a1a;
    clip-path: polygon(50% 0%, 0% 100%, 50% 80%, 100% 100%);
    animation: bat-fly 8s linear infinite;
    opacity: 0.6;
}

.bat:nth-child(1) { top: 10%; animation-delay: 0s; }
.bat:nth-child(2) { top: 30%; animation-delay: 1s; }
.bat:nth-child(3) { top: 50%; animation-delay: 2s; }
.bat:nth-child(4) { top: 70%; animation-delay: 3s; }
.bat:nth-child(5) { top: 90%; animation-delay: 4s; }

@keyframes bat-fly {
    0% {
        left: -50px;
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(-10deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(20px) rotate(10deg);
    }
    100% {
        left: calc(100% + 50px);
        transform: translateY(0) rotate(0deg);
    }
}

/* ============================================
   SONNEN-EFFEKT (Sommerfest)
   ============================================ */
.sun-effect {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    pointer-events: none;
    z-index: 9999;
}

.sun {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #ffd700 30%, #ffa500 70%);
    border-radius: 50%;
    animation: sun-rotate 20s linear infinite;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}

.sun::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 30px;
    background: #ffd700;
    border-radius: 5px;
}

.sun::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 30px;
    background: #ffd700;
    border-radius: 5px;
}

.sun-ray {
    position: absolute;
    width: 4px;
    height: 20px;
    background: #ffd700;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform-origin: center;
    opacity: 0.7;
}

.sun-ray:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateY(-60px); }
.sun-ray:nth-child(2) { transform: translate(-50%, -50%) rotate(45deg) translateY(-60px); }
.sun-ray:nth-child(3) { transform: translate(-50%, -50%) rotate(90deg) translateY(-60px); }
.sun-ray:nth-child(4) { transform: translate(-50%, -50%) rotate(135deg) translateY(-60px); }
.sun-ray:nth-child(5) { transform: translate(-50%, -50%) rotate(180deg) translateY(-60px); }
.sun-ray:nth-child(6) { transform: translate(-50%, -50%) rotate(225deg) translateY(-60px); }
.sun-ray:nth-child(7) { transform: translate(-50%, -50%) rotate(270deg) translateY(-60px); }
.sun-ray:nth-child(8) { transform: translate(-50%, -50%) rotate(315deg) translateY(-60px); }

@keyframes sun-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Performance-Optimierung: Reduziere Animationen auf mobilen Geräten */
/* Entfernt: Effekte sollen auch auf mobilen Geräten funktionieren */
/* @media (max-width: 768px) {
    .snow-effect,
    .confetti-effect,
    .eggs-effect,
    .bats-effect,
    .sun-effect {
        display: none;
    }
} */

/* Option zum Deaktivieren von Effekten */
.holiday-effects-disabled .snow-effect,
.holiday-effects-disabled .confetti-effect,
.holiday-effects-disabled .eggs-effect,
.holiday-effects-disabled .bats-effect,
.holiday-effects-disabled .sun-effect {
    display: none;
}

/* ============================================
   HOLIDAY BANNER
   ============================================ */
.holiday-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.holiday-banner-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.holiday-banner-item {
    font-size: 1.1em;
    font-weight: 500;
}

.holiday-banner-close {
    position: absolute;
    top: -5px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 24px;
    font-weight: bold;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
    z-index: 10001;
}

.holiday-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.holiday-banner-close:active {
    transform: scale(0.95);
}

/* Mobile Anpassungen für Close-Button */
@media (max-width: 768px) {
    .holiday-banner-close {
        width: 28px;
        height: 28px;
        font-size: 20px;
        top: -3px;
        right: -5px;
    }
}

/* ============================================
   HOLIDAY ACTIONS STYLES
   ============================================ */
.holiday-event-section {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.holiday-event-title {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

.holiday-event-narrative {
    color: #aaa;
    font-style: italic;
    margin-bottom: 15px;
}

.holiday-actions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.holiday-action-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
}

.holiday-action-header h4 {
    margin: 0 0 10px 0;
    color: #fff;
}

.holiday-action-description {
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.holiday-action-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.85em;
    color: #aaa;
}

.holiday-action-button {
    width: 100%;
    padding: 10px;
    background: #4a4a4a;
    border: 1px solid #666;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.holiday-action-button:hover {
    background: #5a5a5a;
}

/* ============================================
   HOLIDAY ACTION CARD STYLES (in normalen Aktionen)
   ============================================ */
.action-card-holiday {
    border: 2px solid #6c5ce7;
    position: relative;
}

.action-card-holiday-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
