/* 敵共通スタイル */
.enemy {
    position: absolute;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: transform 0.2s ease;
    z-index: 5;
}

/* バイト型敵 */
.enemy-byte {
    background-color: rgba(0, 255, 200, 0.3);
    border: 2px solid rgba(0, 255, 200, 0.8);
    box-shadow: 0 0 10px rgba(0, 255, 200, 0.5);
    animation: byte-pulse 1.5s infinite alternate;
}

@keyframes byte-pulse {
    0% {
        box-shadow: 0 0 5px rgba(0, 255, 200, 0.5);
    }
    100% {
        box-shadow: 0 0 15px rgba(0, 255, 200, 0.8);
    }
}

/* ブロック型敵 */
.enemy-block {
    background-color: rgba(255, 102, 0, 0.3);
    border: 3px solid rgba(255, 102, 0, 0.8);
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
    border-radius: 20%;
    transform: rotate(45deg);
}

/* クラスター型敵 */
.enemy-cluster {
    background-color: rgba(255, 204, 0, 0.3);
    border: 2px solid rgba(255, 204, 0, 0.8);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: cluster-rotate 4s linear infinite;
}

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

/* ファイアウォール型敵 */
.enemy-firewall {
    background-color: rgba(204, 0, 255, 0.3);
    border: 2px solid rgba(204, 0, 255, 0.8);
    box-shadow: 0 0 10px rgba(204, 0, 255, 0.5);
}

/* ファイアウォールのシールド */
.enemy-shield {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 3px dashed rgba(100, 200, 255, 0.8);
    animation: shield-rotate 5s linear infinite;
    pointer-events: none;
}

.enemy-shield.broken {
    opacity: 0;
    transition: opacity 0.5s;
}

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

/* ボス型敵 */
.enemy-boss {
    background-color: rgba(255, 0, 51, 0.3);
    border: 4px solid rgba(255, 0, 51, 0.8);
    box-shadow: 0 0 20px rgba(255, 0, 51, 0.8);
    clip-path: polygon(50% 0%, 80% 30%, 100% 50%, 80% 70%, 50% 100%, 20% 70%, 0% 50%, 20% 30%);
    animation: boss-pulse 2s infinite alternate;
}

@keyframes boss-pulse {
    0% {
        box-shadow: 0 0 20px rgba(255, 0, 51, 0.5);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 40px rgba(255, 0, 51, 0.8);
        transform: scale(1.05);
    }
}

/* ボスのHPバー */
.enemy-hp-bar {
    position: absolute;
    top: -15px;
    left: -50%;
    width: 200%;
    height: 5px;
    background-color: rgba(50, 50, 50, 0.7);
    border-radius: 2px;
    overflow: hidden;
}

.enemy-hp-fill {
    height: 100%;
    width: 100%;
    background-color: rgba(255, 0, 51, 0.8);
    transition: width 0.3s;
}

/* 敵ヒットエフェクト */
.enemy.hit {
    animation: hit-flash 0.1s;
}

@keyframes hit-flash {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(3);
    }
}

/* 敵消滅エフェクト */
.enemy.destroyed {
    animation: destroy-effect 0.5s forwards;
}

@keyframes destroy-effect {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* 武器エフェクト */
.weapon-effect {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 8;
}

.effect-normal {
    width: 30px;
    height: 30px;
    background-color: rgba(0, 255, 200, 0.1);
    border: 2px solid rgba(0, 255, 200, 0.8);
    border-radius: 50%;
    animation: normal-fire 0.3s forwards;
}

@keyframes normal-fire {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.effect-sniper {
    width: 10px;
    height: 200px;
    background-color: rgba(255, 0, 51, 0.5);
    animation: sniper-fire 0.3s forwards;
}

@keyframes sniper-fire {
    0% {
        transform: translate(-50%, -50%) scaleY(0.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scaleY(1);
        opacity: 0;
    }
}

.effect-radar-pulse {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 204, 0, 0.1);
    border: 2px solid rgba(255, 204, 0, 0.8);
    border-radius: 50%;
    animation: radar-pulse 0.5s forwards;
}

@keyframes radar-pulse {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}