/* events.css - Styles pour les événements spéciaux et animations avancées */

/* Animation d'événement légendaire */
@keyframes legendary-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

@keyframes rainbow-border {
    0% { border-color: red; }
    16.7% { border-color: orange; }
    33.4% { border-color: yellow; }
    50% { border-color: green; }
    66.7% { border-color: blue; }
    83.4% { border-color: indigo; }
    100% { border-color: violet; }
}

@keyframes rainbow-text {
    0% { color: red; }
    16.7% { color: orange; }
    33.4% { color: yellow; }
    50% { color: green; }
    66.7% { color: blue; }
    83.4% { color: indigo; }
    100% { color: violet; }
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

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

@keyframes shine {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
    100% { filter: brightness(1); }
}

/* Classe pour les événements légendaires */
.legendary-event {
    animation: legendary-pulse 2s infinite, shine 2s infinite;
    border: 4px solid gold;
    position: relative;
    overflow: hidden;
}

.legendary-event::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.4) 0%, rgba(255,215,0,0) 70%);
    animation: rotate 10s linear infinite;
    z-index: -1;
}

/* Poulet arc-en-ciel */
.rainbow-chicken {
    animation: rainbow-border 3s linear infinite, rainbow-text 3s linear infinite, floating 3s ease-in-out infinite, pulse 2s infinite;
    border-width: 3px;
    border-style: solid;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

/* Œuf doré */
.golden-egg {
    background-color: gold !important;
    animation: shine 2s infinite, floating 4s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

/* Boost temporel */
.time-boost {
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.7);
    border: 2px solid #00bfff;
    animation: pulse 1.5s infinite;
}

/* Pluie de critiques */
.critical-rain {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.1));
    animation: pulse 1s infinite;
}

/* Notifications légendaires */
.notification.legendary {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: black;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    animation: shine 2s infinite;
}

/* Style pour les succès débloqués récemment */
.achievement.recently-unlocked {
    animation: shine 2s infinite, pulse 2s infinite;
    background: linear-gradient(135deg, rgba(80, 80, 100, 0.9), rgba(50, 50, 70, 0.9));
}

/* Style pour les événements spéciaux */
.special-event-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-size: 24px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
    animation: pulse 1.5s infinite;
    max-width: 400px;
    backdrop-filter: blur(5px);
    border: 2px solid var(--primary-color);
}

/* Overlay pour les effets de climat extrême */
.weather-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9;
    opacity: 0.3;
    transition: opacity 2s ease;
}

.weather-overlay.rainy {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 100, 0.3)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><line x1="10" y1="0" x2="0" y2="50" style="stroke:rgba(100,149,237,0.7);stroke-width:1" /><line x1="30" y1="0" x2="20" y2="50" style="stroke:rgba(100,149,237,0.7);stroke-width:1" /><line x1="50" y1="0" x2="40" y2="50" style="stroke:rgba(100,149,237,0.7);stroke-width:1" /></svg>');
    animation: slide-down 1s linear infinite;
}

.weather-overlay.stormy {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
    animation: flash 5s infinite;
}

.weather-overlay.snowy {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><circle cx="10" cy="10" r="2" fill="white" /><circle cx="30" cy="20" r="1.5" fill="white" /><circle cx="15" cy="30" r="1.8" fill="white" /><circle cx="40" cy="35" r="1.2" fill="white" /><circle cx="25" cy="45" r="2" fill="white" /></svg>');
    animation: slide-down 20s linear infinite;
}

.weather-overlay.heatwave {
    background: linear-gradient(to bottom, rgba(255, 0, 0, 0.1), rgba(255, 165, 0, 0.1));
    animation: heat-pulse 3s infinite;
}

@keyframes slide-down {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

@keyframes flash {
    0%, 90%, 92%, 94%, 96%, 98%, 100% { opacity: 0.3; }
    91%, 93%, 95%, 97%, 99% { opacity: 0.8; }
}

@keyframes heat-pulse {
    0% { opacity: 0.2; }
    50% { opacity: 0.4; }
    100% { opacity: 0.2; }
}

/* Indicateur de CPS */
.cps-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(30, 30, 40, 0.8);
    padding: 10px 15px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-color);
}

.cps-indicator i {
    color: var(--primary-color);
}

.cps-indicator .cps-value {
    font-weight: bold;
    color: var(--gold-color);
}

/* Classe pour le mode clic rapide */
.fast-click-mode {
    border: 2px solid #ff0;
    animation: pulse 0.5s infinite;
    background-color: rgba(255, 255, 0, 0.1);
}

/* Supprimer la sélection de texte pour améliorer l'expérience de clic */
.chicken, .game-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}