/**
 * Poke Royale - Status Effects Styles
 * Section 6: Status Effect Styles
 * Contains: Burn, poison, paralyzed, frozen, sleep, haunted, intimidated, bleeding effects
 */

/* ===== STATUS EFFECTS ===== */

/* Burn Status - red/orange glow with flame particles */
.pokemon.status-burn .pokemon-sprite {
    filter: drop-shadow(0 0 8px #ff6b35) drop-shadow(0 0 15px #dc2626) brightness(1.1);
    animation: status-burn 0.5s ease-in-out infinite !important;
}

@keyframes status-burn {
    0%, 100% { filter: drop-shadow(0 0 8px #ff6b35) drop-shadow(0 0 15px #dc2626) brightness(1.1); }
    50% { filter: drop-shadow(0 0 12px #ff8c00) drop-shadow(0 0 20px #ef4444) brightness(1.3); }
}

.pokemon.status-burn::after {
    content: '🔥';
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 16px;
    animation: burn-icon 0.4s ease-in-out infinite;
    z-index: 100;
}

@keyframes burn-icon {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.2); }
}

/* Poison Status - purple bubbles */
.pokemon.status-poison .pokemon-sprite {
    filter: drop-shadow(0 0 8px #a855f7) drop-shadow(0 0 12px #7c3aed) hue-rotate(40deg) brightness(0.9);
    animation: status-poison 0.6s ease-in-out infinite !important;
}

@keyframes status-poison {
    0%, 100% { filter: drop-shadow(0 0 8px #a855f7) hue-rotate(40deg) brightness(0.9); }
    50% { filter: drop-shadow(0 0 15px #c084fc) hue-rotate(50deg) brightness(0.8); }
}

.pokemon.status-poison::after {
    content: '☠️';
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 14px;
    animation: poison-icon 0.8s ease-in-out infinite;
    z-index: 100;
}

@keyframes poison-icon {
    0%, 100% { transform: scale(1) rotate(-5deg); opacity: 1; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.7; }
}

/* Paralysis Status - yellow sparks, slowed */
.pokemon.status-paralyzed .pokemon-sprite {
    filter: drop-shadow(0 0 10px #fcd34d) drop-shadow(0 0 15px #fbbf24) brightness(1.2);
    animation: status-paralyzed 0.15s linear infinite !important;
}

@keyframes status-paralyzed {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    75% { transform: translateX(-1px); }
}

.pokemon.status-paralyzed::after {
    content: '⚡';
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 16px;
    animation: paralyzed-icon 0.3s linear infinite;
    z-index: 100;
}

@keyframes paralyzed-icon {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Freeze Status - blue ice crystal */
.pokemon.status-frozen .pokemon-sprite {
    filter: drop-shadow(0 0 10px #93c5fd) drop-shadow(0 0 20px #3b82f6) brightness(1.3) saturate(0.5);
    animation: none !important;
}

.pokemon.status-frozen::after {
    content: '❄️';
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 16px;
    animation: frozen-icon 1s ease-in-out infinite;
    z-index: 100;
}

.pokemon.status-frozen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    background: radial-gradient(ellipse, rgba(147, 197, 253, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes frozen-icon {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.1); }
}

/* Sleep Status - Zzz */
.pokemon.status-sleep .pokemon-sprite {
    filter: drop-shadow(0 0 5px #a1a1aa) brightness(0.7) grayscale(0.3);
    animation: status-sleep 2s ease-in-out infinite !important;
}

@keyframes status-sleep {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.pokemon.status-sleep::after {
    content: '💤';
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 18px;
    animation: sleep-icon 1.5s ease-in-out infinite;
    z-index: 100;
}

@keyframes sleep-icon {
    0% { transform: translateY(0) scale(0.8); opacity: 0.5; }
    50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
    100% { transform: translateY(0) scale(0.8); opacity: 0; }
}

/* Haunting Status - Ghost fear effect */
.pokemon.status-haunted .pokemon-sprite {
    filter: drop-shadow(0 0 15px #6d28d9) drop-shadow(0 0 25px #4c1d95) brightness(0.6) saturate(0.5);
    animation: status-haunted 0.8s ease-in-out infinite !important;
}

@keyframes status-haunted {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(0.95); opacity: 0.5; }
}

.pokemon.status-haunted::after {
    content: '👻';
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 16px;
    animation: haunted-icon 1s ease-in-out infinite;
    z-index: 100;
}

@keyframes haunted-icon {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-8px) scale(1.2); opacity: 1; }
}

/* Intimidation Status - Fear/slowdown */
.pokemon.status-intimidated .pokemon-sprite {
    filter: drop-shadow(0 0 10px #374151) brightness(0.7);
    animation: status-intimidated 0.5s ease-in-out infinite !important;
}

@keyframes status-intimidated {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.9); }
}

.pokemon.status-intimidated::after {
    content: '😨';
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 14px;
    animation: intimidated-icon 0.6s ease-in-out infinite;
    z-index: 100;
}

@keyframes intimidated-icon {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.2) rotate(5deg); }
}

/* Bleeding Status - Red dripping damage */
.pokemon.status-bleeding .pokemon-sprite {
    filter: drop-shadow(0 0 8px #dc2626) drop-shadow(0 0 15px #991b1b) brightness(0.9);
    animation: status-bleeding 0.4s ease-in-out infinite !important;
}

@keyframes status-bleeding {
    0%, 100% { filter: drop-shadow(0 0 8px #dc2626) brightness(0.9); }
    50% { filter: drop-shadow(0 0 12px #b91c1c) brightness(0.8); }
}

.pokemon.status-bleeding::after {
    content: '🩸';
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 14px;
    animation: bleeding-icon 0.5s ease-in-out infinite;
    z-index: 100;
}

@keyframes bleeding-icon {
    0% { transform: translateY(-5px); opacity: 0.5; }
    50% { transform: translateY(5px); opacity: 1; }
    100% { transform: translateY(-20px) scale(0.8); opacity: 0; }
}

/* ===== Status Damage Tick Effect ===== */
.status-damage-tick {
    position: absolute;
    font-family: 'Bangers', cursive;
    font-size: 18px;
    pointer-events: none;
    z-index: 60;
    animation: status-tick-float 0.8s ease-out forwards;
}

.status-damage-tick.burn { color: #ff6b35; text-shadow: 0 0 5px #dc2626; }
.status-damage-tick.poison { color: #a855f7; text-shadow: 0 0 5px #7c3aed; }
.status-damage-tick.haunted { color: #8b5cf6; text-shadow: 0 0 5px #6d28d9; }
.status-damage-tick.fear { color: #6b7280; text-shadow: 0 0 5px #374151; }
.status-damage-tick.bleeding { color: #dc2626; text-shadow: 0 0 5px #991b1b; }

@keyframes status-tick-float {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-40px) scale(0.7); opacity: 0; }
}

/* ===== Status Bar Under HP Bar ===== */
.pokemon-status-bar {
    width: 50px;
    height: 4px;
    margin-top: 2px;
    border-radius: 2px;
    overflow: hidden;
}

.pokemon-status-bar.burn { background: linear-gradient(90deg, #ff6b35, #dc2626); }
.pokemon-status-bar.poison { background: linear-gradient(90deg, #a855f7, #7c3aed); }
.pokemon-status-bar.paralyzed { background: linear-gradient(90deg, #fcd34d, #fbbf24); }
.pokemon-status-bar.frozen { background: linear-gradient(90deg, #93c5fd, #3b82f6); }
.pokemon-status-bar.sleep { background: linear-gradient(90deg, #a1a1aa, #71717a); }

/* ===== General Effects ===== */
.effect {
    position: absolute;
    pointer-events: none;
    z-index: 30;
}

/* Pokeball throw animation */
.pokeball-throw {
    position: absolute;
    width: 48px;
    height: 48px;
    z-index: 100;
    pointer-events: none;
}

.pokeball-throw img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.pokeball-throw.throwing {
    animation: pokeball-arc 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes pokeball-arc {
    0% { 
        transform: translate(-50%, 100px) scale(0.3) rotate(0deg); 
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, -30px) scale(1.2) rotate(360deg); 
    }
    80% { 
        transform: translate(-50%, -50%) scale(1) rotate(540deg); 
    }
    100% { 
        transform: translate(-50%, -50%) scale(0.8) rotate(720deg); 
        opacity: 1;
    }
}

.pokeball-throw.opening {
    animation: pokeball-open 0.4s ease-out forwards;
}

@keyframes pokeball-open {
    0% { 
        transform: translate(-50%, -50%) scale(0.8); 
        opacity: 1;
    }
    30% { 
        transform: translate(-50%, -50%) scale(1.3); 
        filter: brightness(2) drop-shadow(0 0 30px white);
    }
    100% { 
        transform: translate(-50%, -50%) scale(2); 
        opacity: 0;
    }
}

/* Tunnel animations for Diglett */
@keyframes tunnel-start {
    0% { 
        transform: translate(-50%, -50%) scale(0.5); 
        opacity: 0;
    }
    30% { 
        transform: translate(-50%, -50%) scale(1.5); 
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) scale(0.3) rotate(180deg); 
        opacity: 0;
    }
}

@keyframes tunnel-emerge {
    0% { 
        transform: translate(-50%, -50%) scale(0); 
        opacity: 0;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.5); 
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) scale(2); 
        opacity: 0;
    }
}

/* Enemy pokeball arc (comes from top) */
@keyframes pokeball-arc-enemy {
    0% { 
        transform: translate(-50%, -100px) scale(0.3) rotate(0deg); 
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, 30px) scale(1.2) rotate(-360deg); 
    }
    80% { 
        transform: translate(-50%, -50%) scale(1) rotate(-540deg); 
    }
    100% { 
        transform: translate(-50%, -50%) scale(0.8) rotate(-720deg); 
        opacity: 1;
    }
}

/* Spawn flash effect */
.spawn-effect {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 20%, rgba(100,200,255,0.5) 50%, transparent 70%);
    animation: spawn-flash 0.6s ease-out forwards;
}

@keyframes spawn-flash {
    0% { transform: scale(0.3); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}
